Skip to content

Make default region and credential loading lazy. #1068

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

Merged
merged 2 commits into from
Feb 8, 2019

Conversation

millems
Copy link
Contributor

@millems millems commented Feb 7, 2019

The default credentials provider chain and region provider chains will no longer be loaded until they are first used. Further, the profile credentials provider will never raise an exception when it is created. The exception won't be raised until it is first used.

Fixes #1030, #1014, #749

The default credentials provider chain and region provider chains will no longer be loaded until they are first used. Further, the profile credentials provider will never raise an exception when it is created. The exception won't be raised until it is first used.

Fixes #1030, #1014, #749
@millems millems force-pushed the millem/lazy-providers branch from fad9645 to 6a44581 Compare February 7, 2019 23:03
@codecov-io
Copy link

codecov-io commented Feb 7, 2019

Codecov Report

Merging #1068 into master will increase coverage by 0.03%.
The diff coverage is 60.81%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1068      +/-   ##
============================================
+ Coverage     56.15%   56.19%   +0.03%     
- Complexity     4664     4673       +9     
============================================
  Files           820      822       +2     
  Lines         27925    27972      +47     
  Branches       2251     2253       +2     
============================================
+ Hits          15682    15719      +37     
- Misses        11514    11523       +9     
- Partials        729      730       +1
Impacted Files Coverage Δ Complexity Δ
...sdk/core/client/config/SdkClientConfiguration.java 100% <ø> (ø) 7 <0> (ø) ⬇️
...k/auth/credentials/DefaultCredentialsProvider.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...wscore/client/builder/AwsDefaultClientBuilder.java 69.76% <100%> (ø) 14 <1> (ø) ⬇️
...k/auth/credentials/ProfileCredentialsProvider.java 84.21% <100%> (+5.63%) 9 <2> (+1) ⬆️
...edentials/internal/LazyAwsCredentialsProvider.java 56.25% <56.25%> (ø) 4 <4> (?)
...wssdk/regions/providers/LazyAwsRegionProvider.java 61.53% <61.53%> (ø) 3 <3> (?)
...rnal/http/pipeline/stages/AsyncRetryableStage.java 85.5% <0%> (+2.89%) 3% <0%> (ø) ⬇️
...nio/netty/internal/OldConnectionReaperHandler.java 90.9% <0%> (+9.09%) 15% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b337725...c7de145. Read the comment docs.

}

@Override
public Region getRegion() {
Copy link
Contributor

Choose a reason for hiding this comment

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

resolveRegion()? just "region()"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a protected method.

@millems millems merged commit 1fafd9e into master Feb 8, 2019
@millems millems deleted the millem/lazy-providers branch February 8, 2019 00:27
aws-sdk-java-automation added a commit that referenced this pull request Dec 3, 2020
…e73cb900e

Pull request: release <- staging/347970f5-ef30-42cd-a9d2-139e73cb900e
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.

3 participants