Skip to content

Enable endpoint discovery by default for services that support it #1840

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

Closed
wants to merge 2 commits into from

Conversation

bmaizels
Copy link
Contributor

Description

Endpoint discovery allows the SDK to discover an endpoint based on the resource being accessed. This change makes this feature opt-out instead of opt-in for clients of services that support endpoint discovery. An additional call to the endpoint discovery service will be made when an endpoint needs to be discovered, that value is then cached and re-used.

Motivation and Context

There may be services launched in the future that only support endpoint discovery instead of traditional static endpoints. We believe endpoint discovery will provide a better experience for customers, and therefore we want to give them that better experience out of the box without expecting them to know to enable it. Any customers that do not wish to use endpoint discovery may opt-out by setting 'endpointDiscoveryEnabled(false)' on the client builder.

Testing

Ran all unit/functional and mock integration tests. Verified through manual integration testing that endpoint discovery calls were being made.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@bmaizels bmaizels requested a review from millems May 15, 2020 00:27
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
8.1% 8.1% Duplication

@codecov-io
Copy link

codecov-io commented May 15, 2020

Codecov Report

Merging #1840 into master will decrease coverage by 0.07%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1840      +/-   ##
============================================
- Coverage     76.33%   76.26%   -0.08%     
  Complexity      187      187              
============================================
  Files          1074     1074              
  Lines         32487    32513      +26     
  Branches       2558     2558              
============================================
- Hits          24799    24796       -3     
- Misses         6437     6466      +29     
  Partials       1251     1251              
Flag Coverage Δ Complexity Δ
#unittests 76.26% <0.00%> (-0.08%) 187.00 <0.00> (ø)
Impacted Files Coverage Δ Complexity Δ
.../codegen/poet/builder/AsyncClientBuilderClass.java 57.14% <0.00%> (-15.59%) 0.00 <0.00> (ø)
...k/codegen/poet/builder/BaseClientBuilderClass.java 85.23% <0.00%> (ø) 0.00 <0.00> (ø)
...degen/poet/builder/BaseClientBuilderInterface.java 70.00% <0.00%> (-13.34%) 0.00 <0.00> (ø)
...k/codegen/poet/builder/SyncClientBuilderClass.java 57.14% <0.00%> (-15.59%) 0.00 <0.00> (ø)
...very/providers/EndpointDiscoveryProviderChain.java 90.90% <0.00%> (-9.10%) 0.00% <0.00%> (ø%)
.../http/nio/netty/internal/NettyRequestExecutor.java 68.68% <0.00%> (-5.56%) 0.00% <0.00%> (ø%)
...ssdk/core/internal/async/FileAsyncRequestBody.java 84.76% <0.00%> (-2.86%) 0.00% <0.00%> (ø%)
...e/endpointdiscovery/EndpointDiscoveryEndpoint.java 70.58% <0.00%> (+5.88%) 0.00% <0.00%> (ø%)
...ine/stages/ApiCallAttemptTimeoutTrackingStage.java 100.00% <0.00%> (+6.89%) 0.00% <0.00%> (ø%)
...dpointdiscovery/EndpointDiscoveryRefreshCache.java 66.66% <0.00%> (+9.09%) 0.00% <0.00%> (ø%)
... and 2 more

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 b2b805f...ce20ee4. Read the comment docs.

@bmaizels
Copy link
Contributor Author

We've decided not to do this. I'm going to adjust the logic and goals to only enable by default when endpoint discovery is required by the service and post a new PR.

@bmaizels bmaizels closed this May 15, 2020
aws-sdk-java-automation added a commit that referenced this pull request Nov 16, 2021
…d9b800c06

Pull request: release <- staging/71021493-8b85-442e-a669-cddd9b800c06
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