-
Notifications
You must be signed in to change notification settings - Fork 2.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(storage): credentials expires after 1 hour #13329
fix(storage): credentials expires after 1 hour #13329
Conversation
packages/storage/__tests__/providers/s3/apis/utils/resolveS3ConfigAndInput.test.ts
Outdated
Show resolved
Hide resolved
packages/storage/__tests__/providers/s3/apis/utils/resolveS3ConfigAndInput.test.ts
Outdated
Show resolved
Hide resolved
packages/storage/src/providers/s3/utils/resolveS3ConfigAndInput.ts
Outdated
Show resolved
Hide resolved
0ba9cf0
to
daf7a88
Compare
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.
Managed to orphan a good chunk of my comments, but mainly LGTM. I was just concerned about the change in functionality between toHaveBeenCalledWith
and 'toBeLastCalledWithConfigAndInput` when we are not asserting the number of times we expect the function to be called in the test classes.
packages/storage/__tests__/providers/s3/apis/uploadData/putObjectJob.test.ts
Show resolved
Hide resolved
packages/storage/__tests__/providers/s3/apis/uploadData/putObjectJob.test.ts
Show resolved
Hide resolved
daf7a88
to
42c90b4
Compare
42c90b4
to
735af87
Compare
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.
LGTM, thanks Allan!
packages/storage/__tests__/providers/s3/apis/uploadData/multipartHandlers.test.ts
Show resolved
Hide resolved
packages/storage/__tests__/providers/s3/apis/uploadData/multipartHandlers.test.ts
Show resolved
Hide resolved
Overall i am not against merging, but i think we should avoid type casting. Why are we casting it? We realized lotta issue because of type casts even in tests during gen2 work. Dont mind a separate followup |
Description of changes
Supply credentials provider instead of resolved static credentials object to the S3 client. As a result, underlying S3 client can always access up-to-dated credentials. This solves the issue for credentials expiration in long-running processes like MPU
Issue #, if available
#13307
Description of how you validated changes
Manual validation
Unit test
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.