Skip to content

Commit 9d0fae4

Browse files
authored
Merge pull request #335 from aws/staging/2.2.0
Pull Request for release 2.2.0
2 parents 508fd8d + 66f4f4f commit 9d0fae4

File tree

258 files changed

+3081
-564
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+3081
-564
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "Amazon S3",
3+
"type": "bugfix",
4+
"description": "S3 putObject API using UrlConnectionHttpClient goes into infinite loop. See https://github.com/aws/aws-sdk-java-v2/pull/942 for more details."
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "Amazon S3",
3+
"type": "bugfix",
4+
"description": "Modify type of S3Object#size member from integer to long. This is a breaking change for customers who are using the size() method currently"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "Netty NIO HTTP Client",
3+
"type": "bugfix",
4+
"description": "Fix a bug where it's possible for an HTTP2 channel pool to be closed while some channels are still being released causing them to be left open and leaked."
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "AWS SDK for Java v2",
3+
"type": "feature",
4+
"description": "Adds the operation name of the calling API to the ExecutionContext class. This exposes a way to get the API name from within an ExecutionInterceptor."
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "AWS SDK for Java v2",
3+
"type": "feature",
4+
"description": "Updated to the latest service models."
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "URLConnection HTTP Client",
3+
"type": "feature",
4+
"description": "Adding a hook to enable custom creation of the initial `HttpURLConnection`. This enables customers to control how a connection is established for a given `URL` including handling any required proxy configuration etc."
5+
}

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ artifact source.
1111

1212
* [SDK Homepage][sdk-website]
1313
* [1.11 to 2.0 Changelog](docs/LaunchChangelog.md)
14+
* [Sample Code](#sample-code)
1415
* [API Docs][docs-api]
1516
* [Developer Guide][docs-guide] ([source][docs-guide-source])
1617
* [Issues][sdk-issues]
@@ -111,13 +112,18 @@ See the [Set up the AWS SDK for Java][docs-setup] section of the developer guide
111112

112113
## Building From Source
113114

114-
Once you check out the code from GitHub, you can build it using Maven. To disable the GPG-signing
115-
in the build, use:
115+
Once you check out the code from GitHub, you can build it using Maven.
116116

117117
```sh
118-
mvn clean install -Dgpg.skip=true
118+
mvn clean install
119119
```
120120

121+
## Sample Code
122+
You can find sample code for v2 in the following places:
123+
124+
* [aws-doc-sdk-examples] repo.
125+
* Integration tests in this repo. They are located in the `it` directory under each service module, eg: [s3-integration-tests]
126+
121127
## Giving Feedback
122128
We need your help in making this SDK great. Please participate in the community and contribute to this effort by submitting issues, participating in discussion forums and submitting pull requests through the following channels.
123129

@@ -145,3 +151,5 @@ We need your help in making this SDK great. Please participate in the community
145151
[support-center]: https://console.aws.amazon.com/support/
146152
[console]: https://console.aws.amazon.com
147153
[bom]: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22software.amazon.awssdk%22%20AND%20a%3A%22bom%22
154+
[aws-doc-sdk-examples]: https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2
155+
[s3-integration-tests]: https://github.com/aws/aws-sdk-java-v2/tree/master/services/s3/src/it/java/software/amazon/awssdk/services/s3

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>software.amazon.awssdk</groupId>
66
<artifactId>aws-sdk-java-pom</artifactId>
7-
<version>2.1.4</version>
7+
<version>2.2.0-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>aws-sdk-java</artifactId>

bom/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>software.amazon.awssdk</groupId>
88
<artifactId>aws-sdk-java-pom</artifactId>
9-
<version>2.1.4</version>
9+
<version>2.2.0-SNAPSHOT</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

@@ -568,6 +568,11 @@
568568
<groupId>software.amazon.awssdk</groupId>
569569
<version>${awsjavasdk.version}</version>
570570
</dependency>
571+
<dependency>
572+
<artifactId>athena</artifactId>
573+
<groupId>software.amazon.awssdk</groupId>
574+
<version>${awsjavasdk.version}</version>
575+
</dependency>
571576
</dependencies>
572577
</dependencyManagement>
573578
</project>

build-tools/src/main/java/software/amazon/awssdk/buildtools/checkstyle/MissingSdkAnnotationCheck.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ public int[] getAcceptableTokens() {
4343
@Override
4444
public int[] getRequiredTokens() {
4545
return new int[] {
46-
TokenTypes.CLASS_DEF
46+
TokenTypes.CLASS_DEF,
47+
TokenTypes.INTERFACE_DEF
4748
};
4849
}
4950

5051
@Override
51-
public void visitToken(final DetailAST ast) {
52+
public void visitToken(DetailAST ast) {
5253
if (!ScopeUtils.isOuterMostType(ast) || SDK_ANNOTATIONS.stream().anyMatch(a -> AnnotationUtility.containsAnnotation
5354
(ast, a))) {
5455
return;

bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.1.4</version>
24+
<version>2.2.0-SNAPSHOT</version>
2525
</parent>
2626
<artifactId>bundle</artifactId>
2727
<packaging>jar</packaging>

codegen-lite-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>software.amazon.awssdk</groupId>
99
<artifactId>aws-sdk-java-pom</artifactId>
10-
<version>2.1.4</version>
10+
<version>2.2.0-SNAPSHOT</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>software.amazon.awssdk</groupId>
88
<artifactId>aws-sdk-java-pom</artifactId>
9-
<version>2.1.4</version>
9+
<version>2.2.0-SNAPSHOT</version>
1010
</parent>
1111
<artifactId>codegen-lite</artifactId>
1212
<name>AWS Java SDK :: Code Generator Lite</name>

codegen-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.1.4</version>
25+
<version>2.2.0-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-maven-plugin</artifactId>

codegen/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.1.4</version>
24+
<version>2.2.0-SNAPSHOT</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

codegen/src/main/java/software/amazon/awssdk/codegen/IntermediateModelBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ public IntermediateModel build() {
111111
Collections.unmodifiableMap(shapes)));
112112
}
113113

114-
// Remove deprecated operations
114+
// Remove deprecated operations and their paginators
115115
operations.entrySet().removeIf(e -> customConfig.getDeprecatedOperations().contains(e.getKey()));
116+
paginators.getPaginators().entrySet().removeIf(e -> customConfig.getDeprecatedOperations().contains(e.getKey()));
116117

117118
log.info("{} shapes found in total.", shapes.size());
118119

codegen/src/main/java/software/amazon/awssdk/codegen/customization/processors/DefaultCustomizationProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public static CodegenCustomizationProcessor getProcessorFor(
2929

3030
return new CodegenCustomizationProcessorChain(
3131
new MetadataModifiersProcessor(config.getCustomServiceMetadata()),
32+
new RenameShapesProcessor(config.getRenameShapes()),
3233
new ShapeModifiersProcessor(config.getShapeModifiers()),
3334
new ShapeSubstitutionsProcessor(config.getShapeSubstitutions()),
3435
new OperationModifiersProcessor(config.getOperationModifiers()),
35-
new RemoveExceptionMessagePropertyProcessor(),
36-
new RenameShapesProcessor(config.getRenameShapes())
36+
new RemoveExceptionMessagePropertyProcessor()
3737
);
3838
}
3939
}

codegen/src/main/java/software/amazon/awssdk/codegen/poet/client/specs/JsonProtocolSpec.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,15 @@ public CodeBlock executionHandler(OperationModel opModel) {
163163
CodeBlock.Builder codeBlock = CodeBlock
164164
.builder()
165165
.add("\n\nreturn clientHandler.execute(new $T<$T, $T>()\n" +
166+
".withOperationName(\"$N\")\n" +
166167
".withResponseHandler($N)\n" +
167168
".withErrorResponseHandler($N)\n" +
168169
hostPrefixExpression(opModel) +
169170
".withInput($L)\n",
170171
ClientExecutionParams.class,
171172
requestType,
172173
responseType,
174+
opModel.getOperationName(),
173175
"responseHandler",
174176
"errorResponseHandler",
175177
opModel.getInput().getVariableName());
@@ -228,6 +230,7 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
228230
String protocolFactory = protocolFactoryLiteral(opModel);
229231
String customerResponseHandler = opModel.hasEventStreamOutput() ? "asyncResponseHandler" : "asyncResponseTransformer";
230232
builder.add("\n\n$L clientHandler.execute(new $T<$T, $T>()\n" +
233+
".withOperationName(\"$N\")\n" +
231234
".withMarshaller(new $T($L))\n" +
232235
"$L" +
233236
"$L" +
@@ -242,6 +245,7 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
242245
ClientExecutionParams.class,
243246
requestType,
244247
opModel.hasEventStreamOutput() && !isRestJson ? SdkResponse.class : pojoResponseType,
248+
opModel.getOperationName(),
245249
marshaller,
246250
protocolFactory,
247251
opModel.hasEventStreamInput() ? CodeBlock.builder()

codegen/src/main/java/software/amazon/awssdk/codegen/poet/client/specs/QueryProtocolSpec.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,15 @@ public CodeBlock executionHandler(OperationModel opModel) {
9696
CodeBlock.Builder codeBlock = CodeBlock
9797
.builder()
9898
.add("\n\nreturn clientHandler.execute(new $T<$T, $T>()" +
99+
".withOperationName(\"$N\")\n" +
99100
".withResponseHandler($N)" +
100101
".withErrorResponseHandler($N)" +
101102
hostPrefixExpression(opModel) +
102103
".withInput($L)",
103104
ClientExecutionParams.class,
104105
requestType,
105106
responseType,
107+
opModel.getOperationName(),
106108
"responseHandler",
107109
"errorResponseHandler",
108110
opModel.getInput().getVariableName());
@@ -126,6 +128,7 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
126128
String asyncRequestBody = opModel.hasStreamingInput() ? ".withAsyncRequestBody(requestBody)"
127129
: "";
128130
return CodeBlock.builder().add("\n\nreturn clientHandler.execute(new $T<$T, $T>()\n" +
131+
".withOperationName(\"$N\")\n" +
129132
".withMarshaller(new $T(protocolFactory))" +
130133
".withResponseHandler(responseHandler)" +
131134
".withErrorResponseHandler($N)\n" +
@@ -135,6 +138,7 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
135138
ClientExecutionParams.class,
136139
requestType,
137140
pojoResponseType,
141+
opModel.getOperationName(),
138142
marshaller,
139143
"errorResponseHandler",
140144
opModel.getInput().getVariableName(),

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/test-async-client-class.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ public CompletableFuture<APostOperationResponse> aPostOperation(APostOperationRe
159159
operationMetadata);
160160

161161
return clientHandler.execute(new ClientExecutionParams<APostOperationRequest, APostOperationResponse>()
162+
.withOperationName("APostOperation")
162163
.withMarshaller(new APostOperationRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler)
163164
.withErrorResponseHandler(errorResponseHandler).hostPrefixExpression(resolvedHostExpression)
164165
.withInput(aPostOperationRequest));
@@ -205,6 +206,7 @@ public CompletableFuture<APostOperationWithOutputResponse> aPostOperationWithOut
205206

206207
return clientHandler
207208
.execute(new ClientExecutionParams<APostOperationWithOutputRequest, APostOperationWithOutputResponse>()
209+
.withOperationName("APostOperationWithOutput")
208210
.withMarshaller(new APostOperationWithOutputRequestMarshaller(protocolFactory))
209211
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
210212
.withInput(aPostOperationWithOutputRequest));
@@ -272,6 +274,7 @@ public CompletableFuture<Void> eventStreamOperation(EventStreamOperationRequest
272274

273275
clientHandler.execute(
274276
new ClientExecutionParams<EventStreamOperationRequest, EventStreamOperationResponse>()
277+
.withOperationName("EventStreamOperation")
275278
.withMarshaller(new EventStreamOperationRequestMarshaller(protocolFactory))
276279
.withAsyncRequestBody(software.amazon.awssdk.core.async.AsyncRequestBody.fromPublisher(adapted))
277280
.withFullDuplex(true).withResponseHandler(responseHandler)
@@ -337,6 +340,7 @@ public CompletableFuture<EventStreamOperationWithOnlyInputResponse> eventStreamO
337340

338341
return clientHandler
339342
.execute(new ClientExecutionParams<EventStreamOperationWithOnlyInputRequest, EventStreamOperationWithOnlyInputResponse>()
343+
.withOperationName("EventStreamOperationWithOnlyInput")
340344
.withMarshaller(new EventStreamOperationWithOnlyInputRequestMarshaller(protocolFactory))
341345
.withAsyncRequestBody(software.amazon.awssdk.core.async.AsyncRequestBody.fromPublisher(adapted))
342346
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
@@ -384,6 +388,7 @@ public CompletableFuture<GetWithoutRequiredMembersResponse> getWithoutRequiredMe
384388

385389
return clientHandler
386390
.execute(new ClientExecutionParams<GetWithoutRequiredMembersRequest, GetWithoutRequiredMembersResponse>()
391+
.withOperationName("GetWithoutRequiredMembers")
387392
.withMarshaller(new GetWithoutRequiredMembersRequestMarshaller(protocolFactory))
388393
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
389394
.withInput(getWithoutRequiredMembersRequest));
@@ -427,6 +432,7 @@ public CompletableFuture<PaginatedOperationWithResultKeyResponse> paginatedOpera
427432

428433
return clientHandler
429434
.execute(new ClientExecutionParams<PaginatedOperationWithResultKeyRequest, PaginatedOperationWithResultKeyResponse>()
435+
.withOperationName("PaginatedOperationWithResultKey")
430436
.withMarshaller(new PaginatedOperationWithResultKeyRequestMarshaller(protocolFactory))
431437
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
432438
.withInput(paginatedOperationWithResultKeyRequest));
@@ -543,6 +549,7 @@ public CompletableFuture<PaginatedOperationWithoutResultKeyResponse> paginatedOp
543549

544550
return clientHandler
545551
.execute(new ClientExecutionParams<PaginatedOperationWithoutResultKeyRequest, PaginatedOperationWithoutResultKeyResponse>()
552+
.withOperationName("PaginatedOperationWithoutResultKey")
546553
.withMarshaller(new PaginatedOperationWithoutResultKeyRequestMarshaller(protocolFactory))
547554
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
548555
.withInput(paginatedOperationWithoutResultKeyRequest));
@@ -664,6 +671,7 @@ public CompletableFuture<StreamingInputOperationResponse> streamingInputOperatio
664671

665672
return clientHandler
666673
.execute(new ClientExecutionParams<StreamingInputOperationRequest, StreamingInputOperationResponse>()
674+
.withOperationName("StreamingInputOperation")
667675
.withMarshaller(new StreamingInputOperationRequestMarshaller(protocolFactory))
668676
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
669677
.withAsyncRequestBody(requestBody).withInput(streamingInputOperationRequest));
@@ -719,6 +727,7 @@ public <ReturnT> CompletableFuture<ReturnT> streamingInputOutputOperation(
719727

720728
return clientHandler.execute(
721729
new ClientExecutionParams<StreamingInputOutputOperationRequest, StreamingInputOutputOperationResponse>()
730+
.withOperationName("StreamingInputOutputOperation")
722731
.withMarshaller(new StreamingInputOutputOperationRequestMarshaller(protocolFactory))
723732
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
724733
.withAsyncRequestBody(requestBody).withInput(streamingInputOutputOperationRequest),
@@ -774,6 +783,7 @@ public <ReturnT> CompletableFuture<ReturnT> streamingOutputOperation(
774783

775784
return clientHandler.execute(
776785
new ClientExecutionParams<StreamingOutputOperationRequest, StreamingOutputOperationResponse>()
786+
.withOperationName("StreamingOutputOperation")
777787
.withMarshaller(new StreamingOutputOperationRequestMarshaller(protocolFactory))
778788
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
779789
.withInput(streamingOutputOperationRequest), asyncResponseTransformer).whenComplete((r, e) -> {

0 commit comments

Comments
 (0)