Skip to content

Upgrade AWS Java SDK to 1.12.228 #334

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

Merged
merged 1 commit into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws-xray-recorder-sdk-aws-sdk-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

dependencies {
compileOnly("com.fasterxml.jackson.core:jackson-annotations:2.11.0")
compileOnly("com.fasterxml.jackson.core:jackson-annotations")

testImplementation("com.fasterxml.jackson.core:jackson-databind")
}
Expand Down
6 changes: 4 additions & 2 deletions aws-xray-recorder-sdk-aws-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ dependencies {

implementation(project(":aws-xray-recorder-sdk-aws-sdk-core"))

api("com.amazonaws:aws-java-sdk-core:1.11.1000")
api("com.amazonaws:aws-java-sdk-core")

testImplementation("com.amazonaws:aws-java-sdk:1.11.1000")
testImplementation("com.amazonaws:aws-java-sdk-lambda")
testImplementation("com.amazonaws:aws-java-sdk-s3")
testImplementation("com.amazonaws:aws-java-sdk-sns")
testImplementation("org.powermock:powermock-reflect:2.0.2")
testImplementation("org.skyscreamer:jsonassert:1.3.0")
}
Expand Down
4 changes: 2 additions & 2 deletions aws-xray-recorder-sdk-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {
}

dependencies {
api("com.amazonaws:aws-java-sdk-xray:1.11.903")
api("com.amazonaws:aws-java-sdk-xray")

compileOnly("com.google.code.findbugs:jsr305:3.0.2")
compileOnly("javax.servlet:javax.servlet-api:3.1.0")

testImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0")
testImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
testImplementation("com.github.stefanbirkner:system-rules:1.16.0")
testImplementation("com.github.tomakehurst:wiremock-jre8")
testImplementation("org.openjdk.jmh:jmh-core:1.19")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
import com.amazonaws.xray.AWSXRay;
import com.amazonaws.xray.entities.Namespace;
import com.amazonaws.xray.entities.Subsegment;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These formatting changes were failing the build, although I don't agree with them, added them for now and we can revisit the linter later.

import com.blogspot.mydailyjava.weaklockfree.WeakConcurrentMap;
import java.net.URI;
import java.net.URISyntaxException;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.checkerframework.checker.nullness.qual.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@
import com.amazonaws.xray.AWSXRay;
import com.amazonaws.xray.entities.Namespace;
import com.amazonaws.xray.entities.Subsegment;

import com.blogspot.mydailyjava.weaklockfree.WeakConcurrentMap;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down
9 changes: 5 additions & 4 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ plugins {
data class DependencySet(val group: String, val version: String, val modules: List<String>)

val DEPENDENCY_BOMS = listOf(
"com.fasterxml.jackson:jackson-bom:2.11.0",
"org.junit:junit-bom:5.6.2"
"com.amazonaws:aws-java-sdk-bom:1.12.228",
"com.fasterxml.jackson:jackson-bom:2.12.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to remove this jackson reference and the one below, but it failed to find them at compileOnly time. I was hoping it would get it through the com.amazonaws:aws-java-sdk-bom dependency which requires them.

However, now my theory is that it won't see them because com.amazonaws:aws-java-sdk-bom doesn't import them in a way that is visible to downstream packages. So we will have to continue updating it for future AWS Java SDK updates.

Copy link

Choose a reason for hiding this comment

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

v1.12.x shadows Jackson dependencies since customers were relying on the version that came with the SDK, preventing the team from upgrading from insecure versions to newer ones without introducing breaking changes.

Hence the change in v1.12.x which forces customers to bring their own Jackson version.

"org.junit:junit-bom:5.8.2"
)

val DEPENDENCY_SETS = listOf(
Expand All @@ -17,7 +18,7 @@ val DEPENDENCY_SETS = listOf(
),
DependencySet(
"com.fasterxml.jackson.datatype",
"2.11.0",
"2.12.0",
listOf("jackson-datatype-jsr310")
),
DependencySet(
Expand All @@ -42,7 +43,7 @@ val DEPENDENCY_SETS = listOf(
),
DependencySet(
"junit",
"4.12",
"4.13.1",
listOf("junit")
),
DependencySet(
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement {
plugins {
id("com.github.hierynomus.license") version "0.15.0"
id("com.github.hierynomus.license") version "0.16.1"
id("nebula.release") version "15.1.0"
id("io.freefair.aggregate-javadoc-jar") version "5.3.0"
id("io.github.gradle-nexus.publish-plugin") version "1.0.0"
Expand Down