-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure token is refreshed on Unauthenticated #5388
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5388 +/- ##
==========================================
- Coverage 61.08% 61.07% -0.02%
==========================================
Files 793 793
Lines 51156 51210 +54
==========================================
+ Hits 31251 31275 +24
- Misses 17033 17059 +26
- Partials 2872 2876 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
111ee95
to
8d6e360
Compare
Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com>
Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com>
Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com>
Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com>
Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com>
513b12b
to
dd47b45
Compare
The docs failures are unrelated. |
edit: I clicked the revert button on github. 😂 |
This reverts commit 1384b32.
* Revert "Revert "Ensure token is refreshed on Unauthenticated (#5388)" (#5404)" This reverts commit 7d2f0d0. Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Using same mutex for condition variable Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Lock the locker in the wait to adher to cond.Wait() semantics Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * comments Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * using noop locker as waitlist add is atomic operation Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Replace Azure AD OIDC URL with correct one (#4075) Signed-off-by: Erwin de Haan <erwin.de.haan@calcasa.nl> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Update the example Dockerfile to run on k8s (#5412) Signed-off-by: Jason Parraga <sovietaced@gmail.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * docs(kubeflow): Fix kubeflow webhook error (#5410) Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * update flytekit version to 1.12.1b2 in monodocs requirements (#5411) Signed-off-by: Samhita Alla <aallasamhita@gmail.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Add supported task types to agent service config and rename (#5402) Signed-off-by: Jason Parraga <sovietaced@gmail.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * update lock file (#5416) Signed-off-by: Samhita Alla <aallasamhita@gmail.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * [monorepo] Fix flytectl install script (#5405) Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * bring in changes for flytecl keyring from PR flytectl/pull/488 Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * typo fix Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> --------- Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> Signed-off-by: Erwin de Haan <erwin.de.haan@calcasa.nl> Signed-off-by: Jason Parraga <sovietaced@gmail.com> Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com> Signed-off-by: Samhita Alla <aallasamhita@gmail.com> Co-authored-by: Erwin de Haan <1627021+EraYaN@users.noreply.github.com> Co-authored-by: Jason Parraga <Sovietaced@gmail.com> Co-authored-by: Chi-Sheng Liu <chishengliu@chishengliu.com> Co-authored-by: Samhita Alla <aallasamhita@gmail.com> Co-authored-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com>
Why change the interface instead of just making the implementation thread safe? |
* Ensure token is refreshed on Unauthenticated Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Using condition broadcast Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * fix unit tests Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * nit Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * nit Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * nit Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * fix go mod entries in flytectl Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * adding a log line when materializing creds Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> --------- Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com>
…flyteorg#5404) This reverts commit 1384b32.
* Revert "Revert "Ensure token is refreshed on Unauthenticated (flyteorg#5388)" (flyteorg#5404)" This reverts commit 7d2f0d0. Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Using same mutex for condition variable Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Lock the locker in the wait to adher to cond.Wait() semantics Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * comments Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * using noop locker as waitlist add is atomic operation Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Replace Azure AD OIDC URL with correct one (flyteorg#4075) Signed-off-by: Erwin de Haan <erwin.de.haan@calcasa.nl> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Update the example Dockerfile to run on k8s (flyteorg#5412) Signed-off-by: Jason Parraga <sovietaced@gmail.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * docs(kubeflow): Fix kubeflow webhook error (flyteorg#5410) Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * update flytekit version to 1.12.1b2 in monodocs requirements (flyteorg#5411) Signed-off-by: Samhita Alla <aallasamhita@gmail.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * Add supported task types to agent service config and rename (flyteorg#5402) Signed-off-by: Jason Parraga <sovietaced@gmail.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * update lock file (flyteorg#5416) Signed-off-by: Samhita Alla <aallasamhita@gmail.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * [monorepo] Fix flytectl install script (flyteorg#5405) Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * bring in changes for flytecl keyring from PR flytectl/pull/488 Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> * typo fix Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> --------- Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com> Signed-off-by: Erwin de Haan <erwin.de.haan@calcasa.nl> Signed-off-by: Jason Parraga <sovietaced@gmail.com> Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com> Signed-off-by: Samhita Alla <aallasamhita@gmail.com> Co-authored-by: Erwin de Haan <1627021+EraYaN@users.noreply.github.com> Co-authored-by: Jason Parraga <Sovietaced@gmail.com> Co-authored-by: Chi-Sheng Liu <chishengliu@chishengliu.com> Co-authored-by: Samhita Alla <aallasamhita@gmail.com> Co-authored-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com>
Tracking issue
#5387
Why are the changes needed?
Fix the unsafe threading behavior of multiple parallel client api trying to get tokens
What changes were proposed in this pull request?
Adding condition variables and mutex locks to serialize the calls
How was this patch tested?
Tested this on internal tenant by sending multiple parallel client requests and verified no issue were observed
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link