-
Notifications
You must be signed in to change notification settings - Fork 840
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
Request level plugin execution #4518
Request level plugin execution #4518
Conversation
f4fb3e6
to
81d1082
Compare
81d1082
to
b4d643a
Compare
.../resources/software/amazon/awssdk/codegen/poet/model/serviceclientconfiguration-builder.java
Show resolved
Hide resolved
...-core/src/main/java/software/amazon/awssdk/awscore/client/handler/AwsAsyncClientHandler.java
Outdated
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/RequestOverrideConfiguration.java
Outdated
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/AmazonSyncHttpClient.java
Show resolved
Hide resolved
...sources/software/amazon/awssdk/codegen/poet/client/sra/test-aws-json-async-client-class.java
Outdated
Show resolved
Hide resolved
...sources/software/amazon/awssdk/codegen/poet/client/sra/test-aws-json-async-client-class.java
Outdated
Show resolved
Hide resolved
core/aws-core/src/main/java/software/amazon/awssdk/awscore/AwsRequest.java
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/RequestOverrideConfiguration.java
Outdated
Show resolved
Hide resolved
a5d2fc9
to
d2b7722
Compare
d2b7722
to
bdf497b
Compare
…gins-add-plugins-execution-request
…gins-add-plugins-execution-request
@@ -32,7 +32,8 @@ | |||
import software.amazon.awssdk.metrics.MetricPublisher; | |||
import software.amazon.awssdk.profiles.ProfileFileSupplier; | |||
|
|||
@SdkInternalApi | |||
// TODO(sra-plugins) Move this to codegen such that we can actually convert it to @SdkInternalApi | |||
@SdkProtectedApi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an upcoming PR/tracked somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this one SMITHY-2106 to track it, but FWIW, I'm actively working on this change on top of this PR.
…gins-add-plugins-execution-request
…gins-add-plugins-execution-request
5ca9343
to
e14811c
Compare
e14811c
to
1ee010c
Compare
SonarCloud Quality Gate failed. 9 Bugs 85.5% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
9a0d9b8
into
feature/master/sra-identity-auth
Motivation and Context
Request level plugin execution take 2
This change implements the request level plugin execution using the following strategy:
SdkClientConfiguration
.SdkClientConfiguration
will be pass down the pipeline.Request Scoped SdkClientConfiguration
Two uses of the client configuration will be updated to read and use the request scoped client configuration:
HttpClientDependencies
that encapsulates an instance of the configuration and is used to execute the request (currently done here for the async case)Details
ClientExecutionParams will get a new property with type
SdkClientConfiguration
that will be set in the generated clients for each request. For instance,The sync and async client handlers were also updated to handle the request scoped client configuration, (currently done here for the sync case). For this case the client configuration is not exposed directly but instead lives in the parent class inside another class, HttpClientDependencies. The
RequestExecutionBuilder
, sync and async classes were changed to accept an instance ofHttpClientDependencies
instead of using the parent class field value.and the
invoke
methods in the clients handlers will be modfied to take theSdkClientConfiguration
to be used inside theHttpClientDependencies
instance. E.g.,Plugin Execution
The plugins execution happens inside a codegen method with the following signature:
This method is responsible for converting a given request and an client configuration and return back a request scoped client configuration. Internally does so by:
ConfigurationUpdater
overrideConfiguration
For instance for S3:
Modifications
Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License