acoustic-carpenter-78188
03/03/2023, 6:49 AMClientCredentialsTokenSourceProvider and customTokenSource to use TokenCache so that valid tokens can be reused across TokenSourceProvider instances. This is consistent with other providers.
I considered refactoring FetchTokenFromCacheOrRefreshIt to share the implementation between client credentials and pkce tokens, but there are a few subtle differences between these token types that would have complicated this logic. Instead I kept the refresh logic the separate, as it is today.
Type
☐ Bug Fix
☑︎ Feature
☐ Plugin
Are all requirements met?
☑︎ Code completedx
☐ Smoke tested
☑︎ Unit tests added
☐ Code documentation added
☐ Any pending items have an associated Issue
Complete description
Replaced the existing oauth2.Token instance in customerTokenSource with a reference to the TokenCache originally passed to NewTokenSourceProvider. Overall logic stays the same. If we fail to save a new token to the cache we will warn but continue.
Tracking Issue
NA
Follow-up issue
NA
flyteorg/flyteidl
✅ All checks have passed
22/22 successful checksacoustic-carpenter-78188
03/07/2023, 7:18 PMacoustic-carpenter-78188
03/07/2023, 7:18 PMacoustic-carpenter-78188
03/07/2023, 8:37 PM