Skip to content

Commit 06b1978

Browse files
Merge pull request #444 from aws/staging/128fcc1e-edbf-4e48-9f17-9f077f71e812
Pull request: release <- staging/128fcc1e-edbf-4e48-9f17-9f077f71e812
2 parents 020ce02 + 4df68ad commit 06b1978

File tree

243 files changed

+4724
-1615
lines changed

Some content is hidden

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

243 files changed

+4724
-1615
lines changed

.changes/2.5.5.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"date": "2019-03-07",
3+
"version": "2.5.5",
4+
"entries": [
5+
{
6+
"category": "Amazon GameLift",
7+
"type": "feature",
8+
"description": "Amazon GameLift-hosted instances can now securely access resources on other AWS services using IAM roles. See more details at https://aws.amazon.com/releasenotes/amazon-gamelift/."
9+
},
10+
{
11+
"category": "Auto Scaling",
12+
"type": "feature",
13+
"description": "Documentation updates for autoscaling"
14+
},
15+
{
16+
"category": "AWS SDK For Java v2",
17+
"type": "bugfix",
18+
"description": "Fix bug in the generated async clients where cancelling the `CompletableFuture` returned from an async operation does not result in cancelling the underlying HTTP request execution. In some cases, this can lead to unnecesarily keeping resources from being freed until the request execution finishes."
19+
},
20+
{
21+
"category": "AWS Elemental MediaLive",
22+
"type": "feature",
23+
"description": "This release adds a MediaPackage output group, simplifying configuration of outputs to AWS Elemental MediaPackage."
24+
},
25+
{
26+
"category": "AWS App Mesh",
27+
"type": "feature",
28+
"description": "This release includes a new version of the AWS App Mesh APIs. You can read more about the new APIs here: https://docs.aws.amazon.com/app-mesh/latest/APIReference/Welcome.html."
29+
},
30+
{
31+
"category": "AWS Greengrass",
32+
"type": "feature",
33+
"description": "Greengrass group UID and GID settings can now be configured to use a provided default via FunctionDefaultConfig. If configured, all Lambda processes in your deployed Greengrass group will by default start with the provided UID and/or GID, rather than by default starting with UID \"ggc_user\" and GID \"ggc_group\" as they would if not configured. Individual Lambdas can also be configured to override the defaults if desired via each object in the Functions list of your FunctionDefinitionVersion."
34+
},
35+
{
36+
"category": "Amazon EC2 Container Service",
37+
"type": "feature",
38+
"description": "This release of Amazon Elastic Container Service (Amazon ECS) introduces additional task definition parameters that enable you to define dependencies for container startup and shutdown, a per-container start and stop timeout value, as well as an AWS App Mesh proxy configuration which eases the integration between Amazon ECS and AWS App Mesh."
39+
},
40+
{
41+
"category": "Netty NIO HTTP Client",
42+
"type": "bugfix",
43+
"description": "Fix a bug where, if the future returned from the `NettyRequestExecutor#execute` is cancelled, the client continues to wait for the `Channel` acquire to complete, which leads to keeping potentially many resources around unnecessarily."
44+
},
45+
{
46+
"category": "Amazon Relational Database Service",
47+
"type": "feature",
48+
"description": "You can configure your Aurora database cluster to automatically copy tags on the cluster to any automated or manual database cluster snapshots that are created from the cluster. This allows you to easily set metadata on your snapshots to match the parent cluster, including access policies. You may enable or disable this functionality while creating a new cluster, or by modifying an existing database cluster."
49+
}
50+
]
51+
}

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
# __2.5.5__ __2019-03-07__
2+
## __AWS App Mesh__
3+
- ### Features
4+
- This release includes a new version of the AWS App Mesh APIs. You can read more about the new APIs here: https://docs.aws.amazon.com/app-mesh/latest/APIReference/Welcome.html.
5+
6+
## __AWS Elemental MediaLive__
7+
- ### Features
8+
- This release adds a MediaPackage output group, simplifying configuration of outputs to AWS Elemental MediaPackage.
9+
10+
## __AWS Greengrass__
11+
- ### Features
12+
- Greengrass group UID and GID settings can now be configured to use a provided default via FunctionDefaultConfig. If configured, all Lambda processes in your deployed Greengrass group will by default start with the provided UID and/or GID, rather than by default starting with UID "ggc_user" and GID "ggc_group" as they would if not configured. Individual Lambdas can also be configured to override the defaults if desired via each object in the Functions list of your FunctionDefinitionVersion.
13+
14+
## __AWS SDK For Java v2__
15+
- ### Bugfixes
16+
- Fix bug in the generated async clients where cancelling the `CompletableFuture` returned from an async operation does not result in cancelling the underlying HTTP request execution. In some cases, this can lead to unnecesarily keeping resources from being freed until the request execution finishes.
17+
18+
## __Amazon EC2 Container Service__
19+
- ### Features
20+
- This release of Amazon Elastic Container Service (Amazon ECS) introduces additional task definition parameters that enable you to define dependencies for container startup and shutdown, a per-container start and stop timeout value, as well as an AWS App Mesh proxy configuration which eases the integration between Amazon ECS and AWS App Mesh.
21+
22+
## __Amazon GameLift__
23+
- ### Features
24+
- Amazon GameLift-hosted instances can now securely access resources on other AWS services using IAM roles. See more details at https://aws.amazon.com/releasenotes/amazon-gamelift/.
25+
26+
## __Amazon Relational Database Service__
27+
- ### Features
28+
- You can configure your Aurora database cluster to automatically copy tags on the cluster to any automated or manual database cluster snapshots that are created from the cluster. This allows you to easily set metadata on your snapshots to match the parent cluster, including access policies. You may enable or disable this functionality while creating a new cluster, or by modifying an existing database cluster.
29+
30+
## __Auto Scaling__
31+
- ### Features
32+
- Documentation updates for autoscaling
33+
34+
## __Netty NIO HTTP Client__
35+
- ### Bugfixes
36+
- Fix a bug where, if the future returned from the `NettyRequestExecutor#execute` is cancelled, the client continues to wait for the `Channel` acquire to complete, which leads to keeping potentially many resources around unnecessarily.
37+
138
# __2.5.4__ __2019-03-06__
239
## __AWS Direct Connect__
340
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ You can import the whole SDK into your project (includes all services) as follow
4444
<dependency>
4545
<groupId>software.amazon.awssdk</groupId>
4646
<artifactId>aws-sdk-java</artifactId>
47-
<version>2.5.4</version>
47+
<version>2.5.5</version>
4848
</dependency>
4949
```
5050

@@ -56,12 +56,12 @@ Alternatively you can add dependencies for the specific services you use only:
5656
<dependency>
5757
<groupId>software.amazon.awssdk</groupId>
5858
<artifactId>ec2</artifactId>
59-
<version>2.5.4</version>
59+
<version>2.5.5</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>software.amazon.awssdk</groupId>
6363
<artifactId>s3</artifactId>
64-
<version>2.5.4</version>
64+
<version>2.5.5</version>
6565
</dependency>
6666
```
6767

@@ -75,7 +75,7 @@ To automatically manage module versions (currently all modules have the same ver
7575
<dependency>
7676
<groupId>software.amazon.awssdk</groupId>
7777
<artifactId>bom</artifactId>
78-
<version>2.5.4</version>
78+
<version>2.5.5</version>
7979
<type>pom</type>
8080
<scope>import</scope>
8181
</dependency>

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.5.4</version>
7+
<version>2.5.5</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>aws-sdk-java-pom</artifactId>
77
<groupId>software.amazon.awssdk</groupId>
8-
<version>2.5.4</version>
8+
<version>2.5.5</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

bom/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.5.4</version>
7+
<version>2.5.5</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>bom</artifactId>

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.5.4</version>
24+
<version>2.5.5</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.5.4</version>
10+
<version>2.5.5</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.5.4</version>
9+
<version>2.5.5</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.5.4</version>
25+
<version>2.5.5</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.5.4</version>
24+
<version>2.5.5</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

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

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
5353
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
5454
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
55+
import software.amazon.awssdk.utils.CompletableFutureUtils;
5556

5657
public class JsonProtocolSpec implements ProtocolSpec {
5758

@@ -230,7 +231,11 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
230231
boolean isStreaming = opModel.hasStreamingOutput() || opModel.hasEventStreamOutput();
231232
String protocolFactory = protocolFactoryLiteral(opModel);
232233
String customerResponseHandler = opModel.hasEventStreamOutput() ? "asyncResponseHandler" : "asyncResponseTransformer";
233-
builder.add("\n\n$L clientHandler.execute(new $T<$T, $T>()\n" +
234+
TypeName responseType = opModel.hasEventStreamOutput() && !isRestJson ? ClassName.get(SdkResponse.class)
235+
: pojoResponseType;
236+
TypeName executeFutureValueType = executeFutureValueType(opModel);
237+
238+
builder.add("\n\n$T<$T> executeFuture = clientHandler.execute(new $T<$T, $T>()\n" +
234239
".withOperationName(\"$N\")\n" +
235240
".withMarshaller(new $T($L))\n" +
236241
"$L" +
@@ -240,13 +245,12 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
240245
hostPrefixExpression(opModel) +
241246
discoveredEndpoint(opModel) +
242247
asyncRequestBody +
243-
".withInput($L)$L)$L;",
244-
// If the operation has an event stream output we use a different future so we don't return the one
245-
// from the client.
246-
opModel.hasEventStreamOutput() ? "" : "return",
248+
".withInput($L)$L);",
249+
CompletableFuture.class,
250+
executeFutureValueType,
247251
ClientExecutionParams.class,
248252
requestType,
249-
opModel.hasEventStreamOutput() && !isRestJson ? SdkResponse.class : pojoResponseType,
253+
responseType,
250254
opModel.getOperationName(),
251255
marshaller,
252256
protocolFactory,
@@ -260,10 +264,15 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
260264
.builder().add(".withFullDuplex(true)").build() : "",
261265
opModel.hasEventStreamOutput() && !isRestJson ? "voidResponseHandler" : "responseHandler",
262266
opModel.getInput().getVariableName(),
263-
asyncResponseTransformerVariable(isStreaming, isRestJson, opModel),
264-
whenCompleteBody(opModel, customerResponseHandler));
267+
asyncResponseTransformerVariable(isStreaming, isRestJson, opModel));
268+
String whenComplete = whenCompleteBody(opModel, customerResponseHandler);
269+
if (!whenComplete.isEmpty()) {
270+
builder.add("executeFuture$L;", whenComplete);
271+
}
265272
if (opModel.hasEventStreamOutput()) {
266-
builder.addStatement("return future");
273+
builder.addStatement("return $T.forwardExceptionTo(future, executeFuture)", CompletableFutureUtils.class);
274+
} else {
275+
builder.addStatement("return executeFuture");
267276
}
268277
return builder.build();
269278
}
@@ -456,4 +465,14 @@ private String protocolFactoryLiteral(OperationModel opModel) {
456465
private boolean isRestJson(IntermediateModel model) {
457466
return Protocol.REST_JSON.equals(model.getMetadata().getProtocol());
458467
}
468+
469+
private TypeName executeFutureValueType(OperationModel opModel) {
470+
if (opModel.hasEventStreamOutput()) {
471+
return ClassName.get(Void.class);
472+
} else if (opModel.hasStreamingOutput()) {
473+
return TypeVariableName.get("ReturnT");
474+
} else {
475+
return getPojoResponseType(opModel);
476+
}
477+
}
459478
}

0 commit comments

Comments
 (0)