@@ -2,18 +2,21 @@ plugins {
22 id(" otel.javaagent-instrumentation" )
33}
44
5- // compiling against 1.11.0, but instrumentation should work against 1.10.33 with varying effects,
6- // depending on the version's implementation. (i.e. DeleteOptionGroup may have less handlerCounts than
7- // expected in 1 .11.84. Testing against 1.11.0 instead of 1.10.33 because the RequestHandler class
8- // used in testing is abstract in 1.10.33
9- // keeping base test version on 1.11.0 because RequestHandler2 is abstract in 1.10.33,
10- // therefore keeping base version as 1.11.0 even though the instrumentation probably
11- // is able to support up to 1.10.33
5+ val minVersion = " 1.11.106 " ;
6+
7+ // All v1 .11.x versions are out of support (https://github.com/aws/aws-sdk-java#supported-minor-versions)
8+ // but we opportunistically try to work with this minor version as well. Versions from
9+ // 1.11.106 (released Mar 21, 2017) are expected to work (this is where the handler context became
10+ // available from AmazonWebServiceRequest instead of only from Request; also pre-106 causes some
11+ // weird behavior with IntelliJ in some cases).
1212muzzle {
1313 pass {
1414 group.set(" com.amazonaws" )
1515 module.set(" aws-java-sdk-core" )
16- versions.set(" [1.10.33,)" )
16+
17+ // Here we use 33 because at the moment, it Muzzle still works here and we want to keep the assertInverse
18+ // But feel free to upgrade the version up to 106 if needed.
19+ versions.set(" [$minVersion ,)" )
1720 assertInverse.set(true )
1821
1922 excludeInstrumentationName(" aws-sdk-1.11-sqs" )
@@ -22,15 +25,15 @@ muzzle {
2225 fail {
2326 group.set(" com.amazonaws" )
2427 module.set(" aws-java-sdk-core" )
25- versions.set(" [1.10.33 ,)" )
28+ versions.set(" [$minVersion ,)" )
2629
2730 excludeInstrumentationName(" aws-sdk-1.11-core" )
2831 }
2932
3033 pass {
3134 group.set(" com.amazonaws" )
3235 module.set(" aws-java-sdk-sqs" )
33- versions.set(" [1.10.33 ,)" )
36+ versions.set(" [$minVersion ,)" )
3437 }
3538}
3639
@@ -39,14 +42,14 @@ dependencies {
3942
4043 implementation(project(" :instrumentation:aws-sdk:aws-sdk-1.11:library" ))
4144
42- library(" com.amazonaws:aws-java-sdk-core:1.11.0 " )
45+ library(" com.amazonaws:aws-java-sdk-core:$minVersion " )
4346
44- testLibrary(" com.amazonaws:aws-java-sdk-s3:1.11.106 " )
45- testLibrary(" com.amazonaws:aws-java-sdk-rds:1.11.106 " )
46- testLibrary(" com.amazonaws:aws-java-sdk-ec2:1.11.106 " )
47- testLibrary(" com.amazonaws:aws-java-sdk-kinesis:1.11.106 " )
48- testLibrary(" com.amazonaws:aws-java-sdk-dynamodb:1.11.106 " )
49- testLibrary(" com.amazonaws:aws-java-sdk-sns:1.11.106 " )
47+ testLibrary(" com.amazonaws:aws-java-sdk-s3:$minVersion " )
48+ testLibrary(" com.amazonaws:aws-java-sdk-rds:$minVersion " )
49+ testLibrary(" com.amazonaws:aws-java-sdk-ec2:$minVersion " )
50+ testLibrary(" com.amazonaws:aws-java-sdk-kinesis:$minVersion " )
51+ testLibrary(" com.amazonaws:aws-java-sdk-dynamodb:$minVersion " )
52+ testLibrary(" com.amazonaws:aws-java-sdk-sns:$minVersion " )
5053
5154 testImplementation(project(" :instrumentation:aws-sdk:aws-sdk-1.11:testing" ))
5255
@@ -65,36 +68,14 @@ dependencies {
6568
6669testing {
6770 suites {
68- // Features used in test_1_11_106 (builder) is available since 1.11.84, but
69- // using 1.11.106 because of previous concerns with byte code differences
70- // in 1.11.106, also, the DeleteOptionGroup request generates more spans
71- // in 1.11.106 than 1.11.84.
72- // We test older version in separate test set to test newer version and latest deps in the 'default'
73- // test dir. Otherwise we get strange warnings in Idea.
74- val test_before_1_11_106 by registering(JvmTestSuite ::class ) {
75- dependencies {
76- implementation(project(" :instrumentation:aws-sdk:aws-sdk-1.11:testing" ))
77-
78- implementation(" com.amazonaws:aws-java-sdk-s3:1.11.0" )
79- implementation(" com.amazonaws:aws-java-sdk-rds:1.11.0" )
80- implementation(" com.amazonaws:aws-java-sdk-ec2:1.11.0" )
81- implementation(" com.amazonaws:aws-java-sdk-kinesis:1.11.0" )
82- implementation(" com.amazonaws:aws-java-sdk-dynamodb:1.11.0" )
83- implementation(" com.amazonaws:aws-java-sdk-sns:1.11.0" )
84-
85- // needed by S3
86- implementation(" javax.xml.bind:jaxb-api:2.3.1" )
87- }
88- }
89-
9071 // We test SQS separately since we have special logic for it and want to make sure the presence of
9172 // SQS on the classpath doesn't conflict with tests for usage of the core SDK. This only affects
9273 // the agent.
9374 val testSqs by registering(JvmTestSuite ::class ) {
9475 dependencies {
9576 implementation(project(" :instrumentation:aws-sdk:aws-sdk-1.11:testing" ))
9677
97- implementation(" com.amazonaws:aws-java-sdk-sqs:1.11.106 " )
78+ implementation(" com.amazonaws:aws-java-sdk-sqs:$minVersion " )
9879 }
9980 }
10081 }
0 commit comments