Skip to content

Conversation

@ianbotsf
Copy link
Contributor

Issue #

#581

Description of changes

This change removes the eager resolution of region in the profile credentials provider, which is unnecessary and can cause exceptions even when the region isn't needed (e.g., for static profile credentials).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ianbotsf ianbotsf requested review from aajtodd and lucix-aws April 13, 2022 22:47
@ianbotsf ianbotsf requested a review from a team as a code owner April 13, 2022 22:47
@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-fix-unnecessary-region-resolution

@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-fix-unnecessary-region-resolution

Copy link
Contributor

@aajtodd aajtodd left a comment

Choose a reason for hiding this comment

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

Fix and ship!

}

private suspend fun resolveRegionOrThrow(platformProvider: PlatformProvider): String =
runCatching { resolveRegion(platformProvider) }
Copy link
Contributor

Choose a reason for hiding this comment

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

fix

resolveRegion already throws an exception that includes the entire chain that was tried. I think we should keep that behavior rather than throwing a new exception that lacks these details.

@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-fix-unnecessary-region-resolution

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-fix-unnecessary-region-resolution

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.

2 participants