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

Define default region for STS actions to fix regression introduced in 1.24 #51

Merged
merged 2 commits into from
Feb 24, 2019

Conversation

nathandines
Copy link
Contributor

Fixes #47

Copy link
Contributor

@andresrc andresrc left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, just a small comment.

clientRegion = sdkRegionLookup.getRegion();
}
catch(com.amazonaws.SdkClientException e) {
if (e.getMessage() == "Unable to load region information from any provider in the chain") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Matching in the exception message is pretty weak. In this case I would log the exception and move forward and outside the try block if clientRegion is still null, set it to Regions.DEFAULT_REGION.getName()

@nathandines
Copy link
Contributor Author

@andresrc I've made some changes. Awaiting feedback

@andresrc andresrc merged commit f0a6807 into jenkinsci:master Feb 24, 2019
@nathandines nathandines deleted the bugfix/default-region branch February 24, 2019 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants