Skip to content
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

Merged
merged 3 commits into from
Sep 27, 2019

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Sep 23, 2019

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 Reviewable

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.
@martinmr martinmr requested review from manishrjain and a team as code owners September 23, 2019 19:22
Copy link

@pullrequest pullrequest bot left a 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.

Copy link

@pullrequest pullrequest bot left a 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

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: One comment.

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?

Copy link
Contributor Author

@martinmr martinmr left a 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.

@martinmr martinmr merged commit 33c3158 into master Sep 27, 2019
@martinmr martinmr deleted the martinmr/backup-override-creds branch September 27, 2019 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Backup request does not use overridden credentials
2 participants