-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix EKS credentials refresh bug #3114
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #3114 +/- ##
========================================
Coverage 93.14% 93.14%
========================================
Files 66 66
Lines 14237 14237
========================================
Hits 13261 13261
Misses 976 976 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, looks good overall! A couple minor comments, after that I think we're good to ship it.
tests/unit/test_credentials.py
Outdated
@@ -3165,6 +3166,45 @@ def test_can_pass_auth_token_from_file(self): | |||
self.assertEqual(creds.token, 'token') | |||
self.assertEqual(creds.method, 'container-role') | |||
|
|||
def test_reloads_auth_token_from_file(self): | |||
token_file_path = os.path.join(self.tempdir, 'token.jwt') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this, we're going to have collisions/race conditions if the tests happen to get run more than once on the same system. It may be a good idea to use temporary_file to ensure we're both isolated and cleaning up immediately.
tests/unit/test_credentials.py
Outdated
"AccessKeyId": "first_key", | ||
"SecretAccessKey": "first_secret", | ||
"Token": "first_token", | ||
"Expiration": (timeobj + timedelta(seconds=2)).isoformat(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit; this could probably we 1s with a 1.5-2s sleep but that may end up creating more noise in the tests with false failures. Something to keep an eye on after release.
* release-1.34.41: Bumping version to 1.34.41 Update to latest partitions and endpoints Update to latest models Fix EKS credentials refresh bug (#3114)
This PR fixes a bug with EKS credentials not properly fetching the token from the token file if the file contents have been updated