Skip to content

Commit 0274c9e

Browse files
Merge pull request #3179 from aws/staging/f492250f-5572-405b-ad17-ec8cae17142a
Pull request: release <- staging/f492250f-5572-405b-ad17-ec8cae17142a
2 parents 9164a5e + d1f4c9c commit 0274c9e

File tree

491 files changed

+975
-483
lines changed

Some content is hidden

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

491 files changed

+975
-483
lines changed

.changes/2.27.7.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"version": "2.27.7",
3+
"date": "2024-08-16",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "AWS Batch",
8+
"contributor": "",
9+
"description": "Improvements of integration between AWS Batch and EC2."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS SDK for Java v2",
14+
"contributor": "",
15+
"description": "Add new spotbugs rule to detect blocking call in the async codepath"
16+
},
17+
{
18+
"type": "feature",
19+
"category": "Amazon QuickSight",
20+
"contributor": "",
21+
"description": "Amazon QuickSight launches Customer Managed Key (CMK) encryption for Data Source metadata"
22+
},
23+
{
24+
"type": "feature",
25+
"category": "Amazon SageMaker Service",
26+
"contributor": "",
27+
"description": "Introduce Endpoint and EndpointConfig Arns in sagemaker:ListPipelineExecutionSteps API response"
28+
},
29+
{
30+
"type": "feature",
31+
"category": "Amazon Simple Email Service",
32+
"contributor": "",
33+
"description": "Marking use case description field of account details as deprecated."
34+
},
35+
{
36+
"type": "feature",
37+
"category": "Inspector2",
38+
"contributor": "",
39+
"description": "Update the correct format of key and values for resource tags"
40+
},
41+
{
42+
"type": "feature",
43+
"category": "AWS SDK for Java v2",
44+
"contributor": "",
45+
"description": "Updated endpoint and partition metadata."
46+
}
47+
]
48+
}

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
11
#### 👋 _Looking for changelogs for older versions? You can find them in the [changelogs](./changelogs) directory._
2+
# __2.27.7__ __2024-08-16__
3+
## __AWS Batch__
4+
- ### Features
5+
- Improvements of integration between AWS Batch and EC2.
6+
7+
## __AWS SDK for Java v2__
8+
- ### Features
9+
- Add new spotbugs rule to detect blocking call in the async codepath
10+
- Updated endpoint and partition metadata.
11+
12+
## __Amazon QuickSight__
13+
- ### Features
14+
- Amazon QuickSight launches Customer Managed Key (CMK) encryption for Data Source metadata
15+
16+
## __Amazon SageMaker Service__
17+
- ### Features
18+
- Introduce Endpoint and EndpointConfig Arns in sagemaker:ListPipelineExecutionSteps API response
19+
20+
## __Amazon Simple Email Service__
21+
- ### Features
22+
- Marking use case description field of account details as deprecated.
23+
24+
## __Inspector2__
25+
- ### Features
26+
- Update the correct format of key and values for resource tags
27+
228
# __2.27.6__ __2024-08-15__
329
## __AWS Identity and Access Management__
430
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To automatically manage module versions (currently all modules have the same ver
5252
<dependency>
5353
<groupId>software.amazon.awssdk</groupId>
5454
<artifactId>bom</artifactId>
55-
<version>2.27.6</version>
55+
<version>2.27.7</version>
5656
<type>pom</type>
5757
<scope>import</scope>
5858
</dependency>
@@ -86,12 +86,12 @@ Alternatively you can add dependencies for the specific services you use only:
8686
<dependency>
8787
<groupId>software.amazon.awssdk</groupId>
8888
<artifactId>ec2</artifactId>
89-
<version>2.27.6</version>
89+
<version>2.27.7</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.27.6</version>
94+
<version>2.27.7</version>
9595
</dependency>
9696
```
9797

@@ -103,7 +103,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
103103
<dependency>
104104
<groupId>software.amazon.awssdk</groupId>
105105
<artifactId>aws-sdk-java</artifactId>
106-
<version>2.27.6</version>
106+
<version>2.27.7</version>
107107
</dependency>
108108
```
109109

archetypes/archetype-app-quickstart/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.27.6</version>
23+
<version>2.27.7</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

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.27.6</version>
23+
<version>2.27.7</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetype-lambda</artifactId>

archetypes/archetype-tools/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.27.6</version>
23+
<version>2.27.7</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

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.27.6</version>
23+
<version>2.27.7</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.27.6</version>
20+
<version>2.27.7</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.27.6</version>
23+
<version>2.27.7</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.27.6</version>
20+
<version>2.27.7</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>

build-tools/src/main/java/software/amazon/awssdk/buildtools/findbugs/DisallowMethodCall.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
*/
3232
public class DisallowMethodCall extends OpcodeStackDetector {
3333
private static final Set<Entry<String, String>> PROHIBITED_METHODS = new HashSet<>();
34+
private static final Set<Entry<String, String>> PROHIBITED_ASYNC_BLOCKING_METHODS = new HashSet<>();
3435
private final BugReporter bugReporter;
3536

3637
static {
@@ -44,6 +45,19 @@ public class DisallowMethodCall extends OpcodeStackDetector {
4445
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpRequest", "rawQueryParameters"));
4546
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpFullRequest", "rawQueryParameters"));
4647
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpFullRequest$Builder", "rawQueryParameters"));
48+
49+
// Blocking calls in async code path
50+
PROHIBITED_ASYNC_BLOCKING_METHODS.add(new SimpleEntry<>("java/lang/Thread", "sleep"));
51+
PROHIBITED_ASYNC_BLOCKING_METHODS.add(new SimpleEntry<>("java/lang/Object", "wait"));
52+
PROHIBITED_ASYNC_BLOCKING_METHODS.add(new SimpleEntry<>("java/util/concurrent/CompletableFuture", "join"));
53+
PROHIBITED_ASYNC_BLOCKING_METHODS.add(new SimpleEntry<>("java/util/concurrent/CompletableFuture", "get"));
54+
PROHIBITED_ASYNC_BLOCKING_METHODS.add(new SimpleEntry<>(
55+
"software/amazon/awssdk/utils/CompletableFutureUtils", "joinLikeSync"));
56+
PROHIBITED_ASYNC_BLOCKING_METHODS.add(new SimpleEntry<>(
57+
"software/amazon/awssdk/regions/util/HttpResourcesUtils", "readResource"));
58+
PROHIBITED_ASYNC_BLOCKING_METHODS.add(new SimpleEntry<>(
59+
"software/amazon/awssdk/auth/credentials/internal/HttpCredentialsLoader", "loadCredentials"
60+
));
4761
}
4862

4963
public DisallowMethodCall(BugReporter bugReporter) {
@@ -68,10 +82,18 @@ private void handleMethodCall() {
6882
MethodDescriptor method = getMethodDescriptorOperand();
6983
SignatureParser signature = new SignatureParser(method.getSignature());
7084
Entry<String, String> calledMethod = new SimpleEntry<>(method.getSlashedClassName(), method.getName());
85+
7186
if (PROHIBITED_METHODS.contains(calledMethod) && signature.getNumParameters() == 0) {
7287
bugReporter.reportBug(new BugInstance(this, "SDK_BAD_METHOD_CALL", NORMAL_PRIORITY)
7388
.addClassAndMethod(this)
7489
.addSourceLine(this, getPC()));
90+
return;
91+
}
92+
93+
if (PROHIBITED_ASYNC_BLOCKING_METHODS.contains(calledMethod)) {
94+
bugReporter.reportBug(new BugInstance(this, "ASYNC_BLOCKING_CALL", NORMAL_PRIORITY)
95+
.addClassAndMethod(this)
96+
.addSourceLine(this, getPC()));
7597
}
7698
}
7799
}

build-tools/src/main/resources/findbugs.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919

2020
<BugPattern abbrev="BM" type="SDK_BAD_METHOD_CALL" category="PERFORMANCE" />
2121
<BugPattern abbrev="BTB" type="BAD_TO_BUILDER" category="BUG" />
22+
<BugPattern abbrev="ABC" type="ASYNC_BLOCKING_CALL" category="BUG" />
2223
</FindbugsPlugin>

build-tools/src/main/resources/messages.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,16 @@
5151
<Details>Bad toBuilder implementation. See the SpotBugs logs for problem details.</Details>
5252
</BugPattern>
5353
<BugCode abbrev="BTB">Bad toBuilder implementation</BugCode>
54+
55+
<BugPattern type="ASYNC_BLOCKING_CALL">
56+
<ShortDescription>Blocking call in async code path</ShortDescription>
57+
<LongDescription>Blocking call in async code path. See the SpotBugs logs for problem details</LongDescription>
58+
<Details>
59+
The SDK disallow the usage of blocking calls like CompletableFuture.join() or Thread.sleep() in the
60+
asynchronous code path. If this is a legitimate use of a blocking call outside of the async code path or
61+
a false positive, this error can be suppressed by updating the spotbugs-suppression.xml file located at
62+
build-tools/src/main/resources/software/amazon/awssdk/spotbugs-suppressions.xml
63+
</Details>
64+
</BugPattern>
65+
<BugCode abbrev="ABC">Blocking call in async code path</BugCode>
5466
</MessageCollection>

build-tools/src/main/resources/software/amazon/awssdk/spotbugs-suppressions.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,49 @@
310310
<Bug pattern="SA_FIELD_SELF_ASSIGNMENT"/>
311311
</Match>
312312

313+
<!-- Suppress existing blocking call. -->
314+
<!-- Classes making calls to disallowed methods made outside of the async code path can be added here to be suppressed -->
315+
<!-- TODO: remove classes from the list once blocking calls have been removed from the SDK async code path -->
316+
<Match>
317+
<Or>
318+
<Class name="~software\.amazon\.awssdk\.core\.endpointdiscovery\.EndpointDiscoveryRefreshCache"/>
319+
<Class name="~software\.amazon\.awssdk\.core\.internal\.http\.async\.CombinedResponseAsyncHttpResponseHandler" />
320+
<Class name="~software\.amazon\.awssdk\.authcrt\.signer\.internal\.AwsCrt4aSigningAdapter" />
321+
<Class name="~software\.amazon\.awssdk\.http\.auth\.aws\.crt\.internal\.signer\.DefaultAwsCrtV4aHttpSigner" />
322+
<Class name="~software\.amazon\.awssdk\.http\.auth\.aws\.crt\.internal\.signer\.RollingSigner" />
323+
<Class name="~software\.amazon\.awssdk\.core\.internal\.http\.pipeline\.stages\.ApplyUserAgentStage" />
324+
<Class name="~software\.amazon\.awssdk\.core\.internal\.http\.pipeline\.stages\.SigningStage" />
325+
<Class name="~software\.amazon\.awssdk\.auth\.credentials\.AwsCredentialsProviderChain" />
326+
<Class name="~software\.amazon\.awssdk\.auth\.credentials\.CredentialUtils" />
327+
<Class name="~software\.amazon\.awssdk\.auth\.credentials\.TokenUtils" />
328+
<Class name="~software\.amazon\.awssdk\.auth\.signer\.AwsSignerExecutionAttribute" />
329+
<Class name="~software\.amazon\.awssdk\.auth\.token\.credentials\.SdkTokenProviderChain" />
330+
<Class name="~software\.amazon\.awssdk\.auth\.token\.signer\.SdkTokenExecutionAttribute" />
331+
<Class name="~software\.amazon\.awssdk\.awscore\.internal\.authcontext\.AwsCredentialsAuthorizationStrategy" />
332+
<Class name="~software\.amazon\.awssdk\.awscore\.internal\.authcontext\.TokenAuthorizationStrategy" />
333+
<Class name="~software\.amazon\.awssdk\.http\.nio\.netty\.internal\.AwaitCloseChannelPoolMap" />
334+
<Class name="~software\.amazon\.awssdk\.http\.nio\.netty\.internal\.ChannelAttributeKey" />
335+
<Class name="~software\.amazon\.awssdk\.transfer\.s3\.internal\.progress\.ResumeTransferProgress" />
336+
<Class name="~software\.amazon\.awssdk\.utils\.CompletableFutureUtils" />
337+
<Class name="~software\.amazon\.awssdk\.metrics\.publishers\.cloudwatch\.CloudWatchMetricPublisher" />
338+
<Class name="~software\.amazon\.awssdk\.http\.apache\.internal\.conn\.IdleConnectionReaper\$ReaperTask" />
339+
<Class name="~software\.amazon\.awssdk\.core\.internal\.retry\.RateLimitingTokenBucket" />
340+
<Class name="~software\.amazon\.awssdk\.core\.internal\.waiters\.WaiterExecutor" />
341+
<Class name="~software\.amazon\.awssdk\.regions\.internal\.util\.EC2MetadataUtils" />
342+
<Class name="~software\.amazon\.awssdk\.regions\.util\.HttpResourcesUtils" />
343+
<Class name="~software\.amazon\.awssdk\.auth\.credentials\.InstanceProfileCredentialsProvider" />
344+
<Class name="~software\.amazon\.awssdk\.auth\.credentials\.internal\.HttpCredentialsLoader" />
345+
<Class name="~software\.amazon\.awssdk\.auth\.credentials\.ContainerCredentialsProvider" />
346+
<Class name="~software\.amazon\.awssdk\.auth\.credentials\.InstanceProfileCredentialsProvider" />
347+
348+
<!-- test modules are allowed to make blocking call as parts of their testing -->
349+
<Class name="~.*testutils.*" />
350+
<Class name="~.*s3benchmarks.*" />
351+
352+
</Or>
353+
<Bug pattern="ASYNC_BLOCKING_CALL"/>
354+
</Match>
355+
313356
<!-- False positive -->
314357
<Match>
315358
<Class name="software.amazon.awssdk.v2migration.EnumCasingToV2$Visitor"/>

bundle-logging-bridge/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.27.6</version>
24+
<version>2.27.7</version>
2525
</parent>
2626
<artifactId>bundle-logging-bridge</artifactId>
2727
<packaging>jar</packaging>

bundle-sdk/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.27.6</version>
24+
<version>2.27.7</version>
2525
</parent>
2626
<artifactId>bundle-sdk</artifactId>
2727
<packaging>jar</packaging>

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

codegen/src/main/java/software/amazon/awssdk/codegen/poet/rules/EndpointRulesClientTestSpec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ private CodeBlock requestCreation(OperationModel opModel, Map<String, TreeNode>
442442

443443
if (opParams != null) {
444444
opParams.forEach((n, v) -> {
445-
MemberModel memberModel = opModel.getInputShape().getMemberByName(n);
445+
MemberModel memberModel = opModel.getInputShape().getMemberByC2jName(n);
446446
CodeBlock memberValue = createMemberValue(memberModel, v);
447447
b.add(".$N($L)", memberModel.getFluentSetterMethodName(), memberValue);
448448
});
@@ -799,7 +799,7 @@ private CodeBlock createModelClass(ShapeModel shapeModel, TreeNode valueNode) {
799799
Iterator<String> fieldNamesIter = obj.fieldNames();
800800
while (fieldNamesIter.hasNext()) {
801801
String fieldName = fieldNamesIter.next();
802-
MemberModel member = shapeModel.getMemberByName(fieldName);
802+
MemberModel member = shapeModel.getMemberByC2jName(fieldName);
803803
JrsValue value = obj.get(fieldName);
804804

805805
b.add(".$N($L)", member.getFluentSetterMethodName(), createMemberValue(member, value));

codegen/src/main/java/software/amazon/awssdk/codegen/poet/rules/EndpointRulesSpecUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ public CodeBlock treeNodeToLiteral(TreeNode treeNode) {
183183
case VALUE_FALSE:
184184
b.add("$L", Validate.isInstanceOf(JrsBoolean.class, treeNode, "Expected boolean").booleanValue());
185185
break;
186+
case START_ARRAY:
187+
handleArrayDefaultValue(b, "stringarray",
188+
Validate.isInstanceOf(JrsArray.class, treeNode, "Expected string array"));
189+
break;
186190
default:
187191
throw new RuntimeException("Don't know how to set default value for parameter of type "
188192
+ treeNode.asToken());

codegen/src/main/resources/software/amazon/awssdk/codegen/rules/GetAttr.java.resource

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ public class GetAttr extends Fn {
160160
if (slice < 0) {
161161
throw new InnerParseError("Invalid path component: slice index must be >= 0");
162162
}
163-
result.add(Part.Key.of(component.substring(0, slicePartIndex)));
163+
if (slicePartIndex > 0) {
164+
result.add(Part.Key.of(component.substring(0, slicePartIndex)));
165+
}
164166
result.add(new Part.Index(slice));
165167
} catch (NumberFormatException ex) {
166168
throw new InnerParseError(String.format("%s could not be parsed as a number", slicePart));

0 commit comments

Comments
 (0)