Skip to content

Commit d9c3254

Browse files
Merge pull request #1019 from aws/staging/aecc1551-e42a-4025-aeb3-7ebc48d712a6
Pull request: release <- staging/aecc1551-e42a-4025-aeb3-7ebc48d712a6
2 parents 88cc623 + 1ab9d87 commit d9c3254

File tree

321 files changed

+1656
-389
lines changed

Some content is hidden

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

321 files changed

+1656
-389
lines changed

.changes/2.15.20.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"version": "2.15.20",
3+
"date": "2020-11-02",
4+
"entries": [
5+
{
6+
"type": "bugfix",
7+
"category": "AWS DynamoDB Enhanced Client",
8+
"contributor": "",
9+
"description": "Publisher streams returned by async resources in the DynamoDB Enhanced Client now correctly handle mapping errors when they are encountered in the stream by calling onError on the subscriber and then implicitly cancelling the subscription. Previously the stream would just permanently hang and never complete."
10+
},
11+
{
12+
"type": "deprecation",
13+
"category": "AWS SSO OIDC",
14+
"contributor": "",
15+
"description": "Renamed/deprecated 'error_description' fields in exceptions in favor of 'errorDescription'."
16+
},
17+
{
18+
"type": "feature",
19+
"category": "AWS SDK for Java v2",
20+
"contributor": "",
21+
"description": "Added code generation validation that customer-visible identifiers are idiomatic (do not contain underscores). Services with underscores in their models can use rename customizations to fix these issues, or apply the 'underscoresInNameBehavior = ALLOW' customization."
22+
},
23+
{
24+
"type": "feature",
25+
"category": "AWS SDK for Java v2",
26+
"contributor": "",
27+
"description": "Upgrade `org.apache.httpcomponents:httpclient` version to `4.5.13`"
28+
},
29+
{
30+
"type": "bugfix",
31+
"category": "AWS SDK for Java v2",
32+
"contributor": null,
33+
"description": "Fixing race condition in EventStreamAsyncResponseTransformer. Field eventsToDeliver is a LinkedList, i.e., not thread-safe. Accesses to field eventsToDeliver are protected by synchronization on itself, but not in 1 location."
34+
},
35+
{
36+
"type": "bugfix",
37+
"category": "AWS SDK for Java v2",
38+
"contributor": "",
39+
"description": "The mapped publisher returned by SdkPublisher.map will now handle exceptions thrown by the mapping function by calling onError on its subscriber and then cancelling the subscription rather than throwing it back to the publishing process when it attempts to publish data."
40+
},
41+
{
42+
"type": "feature",
43+
"category": "Amazon Elastic Compute Cloud",
44+
"contributor": "",
45+
"description": "This release adds support for the following features: 1. P4d instances based on NVIDIA A100 GPUs. 2. NetworkCardIndex attribute to support multiple network cards."
46+
}
47+
]
48+
}

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# __2.15.20__ __2020-11-02__
2+
## __AWS DynamoDB Enhanced Client__
3+
- ### Bugfixes
4+
- Publisher streams returned by async resources in the DynamoDB Enhanced Client now correctly handle mapping errors when they are encountered in the stream by calling onError on the subscriber and then implicitly cancelling the subscription. Previously the stream would just permanently hang and never complete.
5+
6+
## __AWS SDK for Java v2__
7+
- ### Features
8+
- Added code generation validation that customer-visible identifiers are idiomatic (do not contain underscores). Services with underscores in their models can use rename customizations to fix these issues, or apply the 'underscoresInNameBehavior = ALLOW' customization.
9+
- Upgrade `org.apache.httpcomponents:httpclient` version to `4.5.13`
10+
11+
- ### Bugfixes
12+
- Fixing race condition in EventStreamAsyncResponseTransformer. Field eventsToDeliver is a LinkedList, i.e., not thread-safe. Accesses to field eventsToDeliver are protected by synchronization on itself, but not in 1 location.
13+
- The mapped publisher returned by SdkPublisher.map will now handle exceptions thrown by the mapping function by calling onError on its subscriber and then cancelling the subscription rather than throwing it back to the publishing process when it attempts to publish data.
14+
15+
## __AWS SSO OIDC__
16+
- ### Deprecations
17+
- Renamed/deprecated 'error_description' fields in exceptions in favor of 'errorDescription'.
18+
19+
## __Amazon Elastic Compute Cloud__
20+
- ### Features
21+
- This release adds support for the following features: 1. P4d instances based on NVIDIA A100 GPUs. 2. NetworkCardIndex attribute to support multiple network cards.
22+
123
# __2.15.19__ __2020-10-30__
224
## __AWS Database Migration Service__
325
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To automatically manage module versions (currently all modules have the same ver
4949
<dependency>
5050
<groupId>software.amazon.awssdk</groupId>
5151
<artifactId>bom</artifactId>
52-
<version>2.15.19</version>
52+
<version>2.15.20</version>
5353
<type>pom</type>
5454
<scope>import</scope>
5555
</dependency>
@@ -83,12 +83,12 @@ Alternatively you can add dependencies for the specific services you use only:
8383
<dependency>
8484
<groupId>software.amazon.awssdk</groupId>
8585
<artifactId>ec2</artifactId>
86-
<version>2.15.19</version>
86+
<version>2.15.20</version>
8787
</dependency>
8888
<dependency>
8989
<groupId>software.amazon.awssdk</groupId>
9090
<artifactId>s3</artifactId>
91-
<version>2.15.19</version>
91+
<version>2.15.20</version>
9292
</dependency>
9393
```
9494

@@ -100,7 +100,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
100100
<dependency>
101101
<groupId>software.amazon.awssdk</groupId>
102102
<artifactId>aws-sdk-java</artifactId>
103-
<version>2.15.19</version>
103+
<version>2.15.20</version>
104104
</dependency>
105105
```
106106

archetypes/archetype-lambda/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.15.19</version>
23+
<version>2.15.20</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetype-lambda</artifactId>

archetypes/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.15.19</version>
23+
<version>2.15.20</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetypes</artifactId>

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.15.19</version>
20+
<version>2.15.20</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.15.19</version>
23+
<version>2.15.20</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.15.19</version>
20+
<version>2.15.20</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<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.15.19</version>
24+
<version>2.15.20</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
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.15.19</version>
25+
<version>2.15.20</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/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.15.19</version>
24+
<version>2.15.20</version>
2525
</parent>
2626
<artifactId>codegen-lite</artifactId>
2727
<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.15.19</version>
25+
<version>2.15.20</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.15.19</version>
24+
<version>2.15.20</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private Map<String, ShapeModel> constructModelShapes(Set<String> shapesToSkip) {
5353
ShapeType shapeType = getModelShapeType(shape);
5454

5555
if (shapeType != null) {
56-
String javaClassName = getNamingStrategy().getJavaClassName(shapeName);
56+
String javaClassName = getNamingStrategy().getShapeClassName(shapeName);
5757
if (shapesToSkip.contains(javaClassName)) {
5858
continue;
5959
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ private MemberModel generateMemberModel(String c2jMemberName, Member c2jMemberDe
159159
variableType + " type.");
160160
}
161161

162-
163162
MemberModel memberModel = new MemberModel();
164163

165164
memberModel.withC2jName(c2jMemberName)
@@ -443,7 +442,7 @@ private void fillContainerTypeMemberMetadata(Map<String, Shape> c2jShapes,
443442
mapValueModel));
444443

445444
} else if (memberC2jShape.getEnumValues() != null) { // enum values
446-
memberModel.withEnumType(getNamingStrategy().getJavaClassName(memberC2jShapeName));
445+
memberModel.withEnumType(getNamingStrategy().getShapeClassName(memberC2jShapeName));
447446
}
448447
}
449448

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ public IntermediateModel build() {
157157

158158
setSimpleMethods(trimmedModel);
159159

160+
namingStrategy.validateCustomerVisibleNaming(trimmedModel);
161+
160162
return trimmedModel;
161163
}
162164

codegen/src/main/java/software/amazon/awssdk/codegen/internal/TypeUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public String getJavaDataType(Map<String, Shape> shapes, String shapeName,
133133
String shapeType = shape.getType();
134134

135135
if (Structure.getName().equals(shapeType)) {
136-
return namingStrategy.getJavaClassName(shapeName);
136+
return namingStrategy.getShapeClassName(shapeName);
137137
} else if (List.getName().equals(shapeType)) {
138138
String listContainerType = DATA_TYPE_MAPPINGS.get(TypeKey.LIST_INTERFACE);
139139
return listContainerType + "<" +

codegen/src/main/java/software/amazon/awssdk/codegen/model/config/customization/CustomizationConfig.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,19 @@ public class CustomizationConfig {
165165
* Arnable fields used in s3 control
166166
*/
167167
private Map<String, S3ArnableFieldConfig> s3ArnableFields;
168+
168169
/**
169170
* Allow a customer to set an endpoint override AND bypass endpoint discovery on their client even when endpoint discovery
170171
* enabled is true and endpoint discovery is required for an operation. This customization should almost never be "true"
171172
* because it creates a confusing customer experience.
172173
*/
173174
private boolean allowEndpointOverrideForEndpointDiscoveryRequiredOperations = false;
174175

176+
/**
177+
* How the code generator should behave when it encounters shapes with underscores in the name.
178+
*/
179+
private UnderscoresInNameBehavior underscoresInNameBehavior;
180+
175181
private CustomizationConfig() {
176182
}
177183

@@ -434,4 +440,17 @@ public void setAllowEndpointOverrideForEndpointDiscoveryRequiredOperations(
434440
this.allowEndpointOverrideForEndpointDiscoveryRequiredOperations =
435441
allowEndpointOverrideForEndpointDiscoveryRequiredOperations;
436442
}
443+
444+
public UnderscoresInNameBehavior getUnderscoresInNameBehavior() {
445+
return underscoresInNameBehavior;
446+
}
447+
448+
public void setUnderscoresInNameBehavior(UnderscoresInNameBehavior behavior) {
449+
this.underscoresInNameBehavior = behavior;
450+
}
451+
452+
public CustomizationConfig withUnderscoresInShapeNameBehavior(UnderscoresInNameBehavior behavior) {
453+
this.underscoresInNameBehavior = behavior;
454+
return this;
455+
}
437456
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
package software.amazon.awssdk.codegen.model.config.customization;
17+
18+
/**
19+
* Valid values for the {@link CustomizationConfig#setUnderscoresInNameBehavior} customization.
20+
*/
21+
public enum UnderscoresInNameBehavior {
22+
/**
23+
* Allow the underscores in names, and generating shapes with names that are non-idiomatic to the language.
24+
*/
25+
ALLOW
26+
}

codegen/src/main/java/software/amazon/awssdk/codegen/model/intermediate/IntermediateModel.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.io.InputStream;
2121
import java.io.UncheckedIOException;
2222
import java.util.Collections;
23+
import java.util.HashMap;
2324
import java.util.List;
2425
import java.util.Map;
2526
import java.util.Optional;
@@ -57,9 +58,11 @@ public final class IntermediateModel {
5758
}
5859

5960
public IntermediateModel() {
61+
this.operations = new HashMap<>();
62+
this.shapes = new HashMap<>();
6063
this.endpointOperation = Optional.empty();
61-
this.paginators = Collections.emptyMap();
62-
this.waiters = Collections.emptyMap();
64+
this.paginators = new HashMap<>();
65+
this.waiters = new HashMap<>();
6366
this.namingStrategy = null;
6467
}
6568

codegen/src/main/java/software/amazon/awssdk/codegen/model/intermediate/MemberModel.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -220,22 +220,6 @@ public MemberModel withBeanStyleSetterMethodName(String beanStyleSetterName) {
220220
return this;
221221
}
222222

223-
// TODO: Remove when all marshallers switch over to new style
224-
public String getSetterMethodName() {
225-
return getBeanStyleSetterMethodName();
226-
}
227-
228-
// TODO: Remove when all marshallers switch over to new style
229-
public void setSetterMethodName(String setterMethodName) {
230-
setBeanStyleGetterMethodName(setterMethodName);
231-
}
232-
233-
// TODO: Remove when all marshallers switch over to new style
234-
public MemberModel withSetterMethodName(String setterMethodName) {
235-
setSetterMethodName(setterMethodName);
236-
return this;
237-
}
238-
239223
public String getFluentSetterMethodName() {
240224
return fluentSetterMethodName;
241225
}

codegen/src/main/java/software/amazon/awssdk/codegen/model/service/Shape.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import java.util.Map;
2121

2222
public class Shape {
23-
2423
private String type;
2524

2625
private Map<String, Member> members = Collections.emptyMap();

0 commit comments

Comments
 (0)