Skip to content

Adding AWS-CRT-Java 0.4.20 to AWS-SDK-Java-v2 #1607

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

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
86aba02
Add Support for AWS Common Runtime Http Client
alexw91 Jun 13, 2019
08ce630
Fix Race condition in Unit Tests
alexw91 Jul 23, 2019
92bc16e
Rebase onto latest master branch
alexw91 Jul 23, 2019
0ac39a6
Update AWS CRT Client to use Connection Manager
alexw91 Aug 8, 2019
33f9dfc
Update to latest master branch
alexw91 Aug 12, 2019
95c24f0
Add aws-crt-client benchmark
andrewhop Aug 27, 2019
af8d728
Update CRT Client
alexw91 Aug 28, 2019
c697cd5
Update CRT Client and add Stress Test
alexw91 Aug 28, 2019
58ac9d5
Benchmark Fixes
alexw91 Aug 30, 2019
c94aaaa
Rename to AwsCrtCombinatorialConfigStressIntegrationTest
alexw91 Aug 30, 2019
7b45795
Remove CrtResource Dependency injection
alexw91 Sep 3, 2019
14f4fc3
Update JavaDocs
alexw91 Sep 3, 2019
5b75286
Address Code Review Feedback
alexw91 Sep 9, 2019
be3921c
Don't leak Native CrtResources if error occurs during close
alexw91 Sep 10, 2019
975af13
Update to new API
alexw91 Sep 13, 2019
96bb21a
Update aws-crt-client with up to date parent artifact version
andrewhop Nov 1, 2019
a3ba0de
Update to 0.3.35 of the CRT with minor API changes
andrewhop Oct 25, 2019
6cf6e30
Updated crt http client to use latest crt api, which uses byte[] for …
JonathanHenson Nov 4, 2019
f4b450b
Removed old comment.
JonathanHenson Nov 4, 2019
1681407
Fixed build failures.
JonathanHenson Nov 5, 2019
24b7801
Fixed benchmark builds.
JonathanHenson Nov 5, 2019
6a72b11
Removed unused import.
JonathanHenson Nov 5, 2019
7ba4045
Fixed SPI test.
JonathanHenson Nov 5, 2019
bfab2f3
Hopefully fix the build this time.
JonathanHenson Nov 5, 2019
f7a9464
Updating SDK to work with most recent CRT
rccarper Jan 10, 2020
d421878
Taking out incorrect try-with-resources block
rccarper Jan 27, 2020
59e5730
Merge branch 'master' into aws-crt-latest-api-update
rccarper Jan 28, 2020
5e85430
Updating to latest SDK snapshot and CRT
rccarper Jan 28, 2020
1570a31
Adjusting usage of builder, removing whitespace change.
rccarper Jan 29, 2020
218d357
Merge branch 'master' into aws-crt-latest-api-update
rccarper Mar 1, 2020
a2db25c
Updating snapshot version
rccarper Mar 1, 2020
39e961c
Updating copyright headers
rccarper Mar 1, 2020
d6fc0d8
Fixing checkstyle warning for 'TLS' being more than 2 consecutive cap…
rccarper Mar 1, 2020
0cb0e7e
Merge branch 'master' into aws-crt-latest-api-update
rccarper Mar 24, 2020
5f0877e
Updating snapshot and CRT version
rccarper Mar 24, 2020
274b080
Update to next snapshot version: 2.11.7-SNAPSHOT
Mar 31, 2020
9d9fd67
Add ellipsis when truncating payload
dagnir Mar 30, 2020
025c43c
Update AWS CRT Client to work with v0.5.1
alexw91 Mar 31, 2020
8778f33
Fixed document bean classes used as parameterized types of collection…
bmaizels Mar 30, 2020
be3eb1b
DDB Enhanced Client: Added v1/v2 performance comparison tests for all…
bmaizels Mar 27, 2020
69d620a
Merge branch 'master' into aws-crt-latest-api-update
rccarper Apr 1, 2020
de2837e
Updating snapshot version and adding aws-crt-client to tests coverage…
rccarper Apr 1, 2020
56a0cd5
Merge branch 'crt_v0.5.1' into aws-crt-latest-api-update
rccarper Apr 1, 2020
0a69d0c
Fixing copyright headers. Fixing CRT version in sdk-benchmarks.
rccarper Apr 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-AWSSDKforJavav2-9a322a2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"category": "AWS Common Runtime Client",
"type": "bugfix",
"description": "Upgrade to the latest version (0.3.35) of the AWS Common Runtime."
}
Comment on lines +1 to +5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this in here since this PR is the initial release of the CRT in SDK

Copy link
Contributor

@bretambrose bretambrose Apr 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in new PR

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"category": "AWS Common Runtime Http Client",
"type": "feature",
"description": "Add initial support for the AWS Common Runtime (CRT) Http Client."
}
2 changes: 1 addition & 1 deletion archetypes/archetype-lambda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetype-lambda</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetypes</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-sdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>aws-sdk-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom-internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<artifactId>bundle</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-lite-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<artifactId>codegen-lite</artifactId>
<name>AWS Java SDK :: Code Generator Lite</name>
Expand Down
2 changes: 1 addition & 1 deletion codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<artifactId>codegen</artifactId>
<name>AWS Java SDK :: Code Generator</name>
Expand Down
2 changes: 1 addition & 1 deletion core/annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/arns/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>

<artifactId>auth</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public abstract class BaseEventStreamAsyncAws4Signer extends BaseAsyncAws4Signer
private static final String HTTP_CONTENT_SHA_256 = "STREAMING-AWS4-HMAC-SHA256-EVENTS";
private static final String EVENT_STREAM_PAYLOAD = "AWS4-HMAC-SHA256-PAYLOAD";

private static final int PAYLOAD_TRUNCATE_LENGTH = 32;


protected BaseEventStreamAsyncAws4Signer() {
}
Expand Down Expand Up @@ -287,15 +289,26 @@ static String toDebugString(Message m, boolean truncatePayload) {
sb.append("}, payload=");

byte[] payload = m.getPayload();

byte[] payloadToLog;

// We don't actually need to truncate if the payload length is already within the truncate limit
truncatePayload = truncatePayload && payload.length > PAYLOAD_TRUNCATE_LENGTH;

if (truncatePayload) {
// Would be nice if BinaryUtils.toHex() could take an array index range instead so we don't need to copy
payloadToLog = Arrays.copyOf(payload, Math.min(32, payload.length));
payloadToLog = Arrays.copyOf(payload, PAYLOAD_TRUNCATE_LENGTH);
} else {
payloadToLog = payload;
}

return sb.append(BinaryUtils.toHex(payloadToLog)).append("}").toString();
sb.append(BinaryUtils.toHex(payloadToLog));

if (truncatePayload) {
sb.append("...");
}

sb.append("}");

return sb.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void toDebugString_largePayload_truncate_generatesCorrectString() {
byte[] first32 = Arrays.copyOf(payload, 32);
String expectedPayloadString = BinaryUtils.toHex(first32);
assertThat(BaseEventStreamAsyncAws4Signer.toDebugString(m, true))
.isEqualTo("Message = {headers={header1={42}, header2={false}, header3={\"Hello world\"}}, payload=" + expectedPayloadString + "}");
.isEqualTo("Message = {headers={header1={42}, header2={false}, header3={\"Hello world\"}}, payload=" + expectedPayloadString + "...}");
}

@Test
Expand All @@ -75,4 +75,15 @@ public void toDebugString_largePayload_noTruncate_generatesCorrectString() {
assertThat(BaseEventStreamAsyncAws4Signer.toDebugString(m, false))
.isEqualTo("Message = {headers={header1={42}, header2={false}, header3={\"Hello world\"}}, payload=" + expectedPayloadString + "}");
}

@Test
public void toDebugString_smallPayload_truncate_doesNotAddEllipsis() {
byte[] payload = new byte[8];
new Random().nextBytes(payload);
Message m = new Message(headers, payload);

String expectedPayloadString = BinaryUtils.toHex(payload);
assertThat(BaseEventStreamAsyncAws4Signer.toDebugString(m, true))
.isEqualTo("Message = {headers={header1={42}, header2={false}, header3={\"Hello world\"}}, payload=" + expectedPayloadString + "}");
}
}
2 changes: 1 addition & 1 deletion core/aws-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>

<artifactId>aws-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>

<artifactId>core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/profiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>

<artifactId>profiles</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-cbor-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-ion-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-json-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-query-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-xml-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/protocol-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/regions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>

<artifactId>regions</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/sdk-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<artifactId>sdk-core</artifactId>
<name>AWS Java SDK :: SDK Core</name>
Expand Down
2 changes: 1 addition & 1 deletion http-client-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>
<artifactId>http-client-spi</artifactId>
<name>AWS Java SDK :: HTTP Client Interface</name>
Expand Down
2 changes: 1 addition & 1 deletion http-clients/apache-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>http-clients</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.11.6</version>
<version>2.11.7-SNAPSHOT</version>
</parent>

<artifactId>apache-client</artifactId>
Expand Down
Loading