-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 bug in credential overriding in backup. #4047
Conversation
Right now, the credentials were only being used in a part of the process, which meant the process would fail if the default credentials are invalid or expired. This rewrites the handler to accept the credentials before the process starts. Manually checked that overriding now works as expected by setting the default credentials incorrectly and getting the backup to work by overriding the credentials.
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.
✅ A review job has been created and sent to the PullRequest network.
@martinmr you can click here to see the review status or cancel the code review job.
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.
Nice work! LGTM. This is good clean-up/refactoring. Makes it well-encapsulated and easier to read.
Reviewed with ❤️ by PullRequest
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.
Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @martinmr)
ee/backup/s3_handler.go, line 58 at r1 (raw file):
} func (h *s3Handler) overrideCredentials() bool {
hasCredentials?
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.
Reviewable status: 4 of 5 files reviewed, 1 unresolved discussion (waiting on @manishrjain)
ee/backup/s3_handler.go, line 58 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
hasCredentials?
Done.
Right now, the credentials were only being used in a part of the
process, which meant the process would fail if the default credentials
are invalid or expired.
This rewrites the handler to accept the credentials before the process
starts.
Manually checked that overriding now works as expected by setting the
default credentials incorrectly and getting the backup to work by
overriding the credentials.
Fixes #4044
This change is