Skip to content

Commit 80a9cd2

Browse files
authored
Fix broken S3 integration (#7368)
## Summary of changes The latest version of S3 is broken ## Reason for change This is the same issue we've seen several times, the s3 integration is broken, because we're ducktyping the field (which changes) instead of the public property ## Implementation details Update _all_ the S3 integrations to switch to using properties instead of the backing field, because it's just a matter of time before they all break (I manually checked they're all valid). Also fixed the nullability, which was incorrect (they can all technically be null). And fixed potential null ref issue because of that related to span pointers. ## Test coverage This is the test (I bumped the package versions) but will also did an all-versions test that passed for all the versions and all TFMs ## Other details <!-- Fixes #{issue} --> <!-- ⚠️ Note: Where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. MergeQueue is NOT enabled in this repository. If you have write access to the repo, the PR has 1-2 approvals (see above), and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #apm-dotnet channel in Slack. -->
1 parent 45aca29 commit 80a9cd2

23 files changed

+608
-608
lines changed

tracer/build/PackageVersionsLatestMajors.g.props

Lines changed: 90 additions & 90 deletions
Large diffs are not rendered by default.

tracer/build/PackageVersionsLatestMinors.g.props

Lines changed: 90 additions & 90 deletions
Large diffs are not rendered by default.

tracer/build/PackageVersionsLatestSpecific.g.props

Lines changed: 90 additions & 90 deletions
Large diffs are not rendered by default.

tracer/build/supported_versions.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@
259259
"minVersionAvailableInclusive": "3.1.0",
260260
"minVersionSupportedInclusive": "3.1.0",
261261
"minVersionTestedInclusive": "3.1.5.3",
262-
"maxVersionSupportedInclusive": "4.0.3.3",
263-
"maxVersionAvailableInclusive": "4.0.3.3",
262+
"maxVersionSupportedInclusive": "4.0.3.4",
263+
"maxVersionAvailableInclusive": "4.0.3.4",
264264
"maxVersionTestedInclusive": "4.0.3.3"
265265
}
266266
]
@@ -276,8 +276,8 @@
276276
"minVersionAvailableInclusive": "3.3.100",
277277
"minVersionSupportedInclusive": "3.3.100",
278278
"minVersionTestedInclusive": "3.3.102.16",
279-
"maxVersionSupportedInclusive": "4.0.3.2",
280-
"maxVersionAvailableInclusive": "4.0.3.2",
279+
"maxVersionSupportedInclusive": "4.0.3.3",
280+
"maxVersionAvailableInclusive": "4.0.3.3",
281281
"maxVersionTestedInclusive": "4.0.3.2"
282282
}
283283
]
@@ -293,8 +293,8 @@
293293
"minVersionAvailableInclusive": "3.1.0",
294294
"minVersionSupportedInclusive": "3.1.0",
295295
"minVersionTestedInclusive": "3.1.3.5",
296-
"maxVersionSupportedInclusive": "4.0.2.15",
297-
"maxVersionAvailableInclusive": "4.0.2.15",
296+
"maxVersionSupportedInclusive": "4.0.2.16",
297+
"maxVersionAvailableInclusive": "4.0.2.16",
298298
"maxVersionTestedInclusive": "4.0.2.15"
299299
}
300300
]
@@ -327,9 +327,9 @@
327327
"minVersionAvailableInclusive": "3.1.0",
328328
"minVersionSupportedInclusive": "3.3.0",
329329
"minVersionTestedInclusive": "3.3.113.2",
330-
"maxVersionSupportedInclusive": "4.0.6.3",
331-
"maxVersionAvailableInclusive": "4.0.6.3",
332-
"maxVersionTestedInclusive": "4.0.6.3"
330+
"maxVersionSupportedInclusive": "4.0.6.4",
331+
"maxVersionAvailableInclusive": "4.0.6.4",
332+
"maxVersionTestedInclusive": "4.0.6.4"
333333
}
334334
]
335335
},
@@ -344,9 +344,9 @@
344344
"minVersionAvailableInclusive": "3.1.0",
345345
"minVersionSupportedInclusive": "3.1.0",
346346
"minVersionTestedInclusive": "3.1.11",
347-
"maxVersionSupportedInclusive": "4.0.0.20",
348-
"maxVersionAvailableInclusive": "4.0.0.20",
349-
"maxVersionTestedInclusive": "4.0.0.20"
347+
"maxVersionSupportedInclusive": "4.0.0.21",
348+
"maxVersionAvailableInclusive": "4.0.0.21",
349+
"maxVersionTestedInclusive": "4.0.0.21"
350350
}
351351
]
352352
},
@@ -361,8 +361,8 @@
361361
"minVersionAvailableInclusive": "3.1.0",
362362
"minVersionSupportedInclusive": "3.1.0",
363363
"minVersionTestedInclusive": "3.1.2.1",
364-
"maxVersionSupportedInclusive": "4.0.0.17",
365-
"maxVersionAvailableInclusive": "4.0.0.17",
364+
"maxVersionSupportedInclusive": "4.0.0.18",
365+
"maxVersionAvailableInclusive": "4.0.0.18",
366366
"maxVersionTestedInclusive": "4.0.0.17"
367367
}
368368
]
@@ -378,8 +378,8 @@
378378
"minVersionAvailableInclusive": "3.1.0",
379379
"minVersionSupportedInclusive": "3.1.0",
380380
"minVersionTestedInclusive": "3.1.0.13",
381-
"maxVersionSupportedInclusive": "4.0.0.18",
382-
"maxVersionAvailableInclusive": "4.0.0.18",
381+
"maxVersionSupportedInclusive": "4.0.0.19",
382+
"maxVersionAvailableInclusive": "4.0.0.19",
383383
"maxVersionTestedInclusive": "4.0.0.18"
384384
}
385385
]
@@ -395,8 +395,8 @@
395395
"minVersionAvailableInclusive": "3.3.0",
396396
"minVersionSupportedInclusive": "3.3.0",
397397
"minVersionTestedInclusive": "3.3.104.87",
398-
"maxVersionSupportedInclusive": "4.0.0.18",
399-
"maxVersionAvailableInclusive": "4.0.0.18",
398+
"maxVersionSupportedInclusive": "4.0.0.19",
399+
"maxVersionAvailableInclusive": "4.0.0.19",
400400
"maxVersionTestedInclusive": "4.0.0.18"
401401
}
402402
]

tracer/dependabot/Datadog.Dependabot.Integrations.csproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,42 @@
1818

1919
<!-- Integration: AWSSDK.Core -->
2020
<!-- Assembly: AWSSDK.Core -->
21-
<!-- Latest package https://www.nuget.org/packages/AWSSDK.Core/4.0.0.20 -->
22-
<PackageReference Include="AWSSDK.Core" Version="4.0.0.20" />
21+
<!-- Latest package https://www.nuget.org/packages/AWSSDK.Core/4.0.0.21 -->
22+
<PackageReference Include="AWSSDK.Core" Version="4.0.0.21" />
2323

2424
<!-- Integration: AWSSDK.DynamoDBv2 -->
2525
<!-- Assembly: AWSSDK.DynamoDBv2 -->
26-
<!-- Latest package https://www.nuget.org/packages/AWSSDK.DynamoDBv2/4.0.3.3 -->
26+
<!-- Latest package https://www.nuget.org/packages/AWSSDK.DynamoDBv2/4.0.3.4 -->
2727
<PackageReference Include="AWSSDK.DynamoDBv2" Version="4.0.3.3" />
2828

2929
<!-- Integration: AWSSDK.EventBridge -->
3030
<!-- Assembly: AWSSDK.EventBridge -->
31-
<!-- Latest package https://www.nuget.org/packages/AWSSDK.EventBridge/4.0.3.2 -->
31+
<!-- Latest package https://www.nuget.org/packages/AWSSDK.EventBridge/4.0.3.3 -->
3232
<PackageReference Include="AWSSDK.EventBridge" Version="4.0.3.2" />
3333

3434
<!-- Integration: AWSSDK.Kinesis -->
3535
<!-- Assembly: AWSSDK.Kinesis -->
36-
<!-- Latest package https://www.nuget.org/packages/AWSSDK.Kinesis/4.0.2.15 -->
36+
<!-- Latest package https://www.nuget.org/packages/AWSSDK.Kinesis/4.0.2.16 -->
3737
<PackageReference Include="AWSSDK.Kinesis" Version="4.0.2.15" />
3838

3939
<!-- Integration: AWSSDK.S3 -->
4040
<!-- Assembly: AWSSDK.S3 -->
41-
<!-- Latest package https://www.nuget.org/packages/AWSSDK.S3/4.0.6.3 -->
42-
<PackageReference Include="AWSSDK.S3" Version="4.0.6.3" />
41+
<!-- Latest package https://www.nuget.org/packages/AWSSDK.S3/4.0.6.4 -->
42+
<PackageReference Include="AWSSDK.S3" Version="4.0.6.4" />
4343

4444
<!-- Integration: AWSSDK.SimpleNotificationService -->
4545
<!-- Assembly: AWSSDK.SimpleNotificationService -->
46-
<!-- Latest package https://www.nuget.org/packages/AWSSDK.SimpleNotificationService/4.0.0.17 -->
46+
<!-- Latest package https://www.nuget.org/packages/AWSSDK.SimpleNotificationService/4.0.0.18 -->
4747
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="4.0.0.17" />
4848

4949
<!-- Integration: AWSSDK.SQS -->
5050
<!-- Assembly: AWSSDK.SQS -->
51-
<!-- Latest package https://www.nuget.org/packages/AWSSDK.SQS/4.0.0.18 -->
51+
<!-- Latest package https://www.nuget.org/packages/AWSSDK.SQS/4.0.0.19 -->
5252
<PackageReference Include="AWSSDK.SQS" Version="4.0.0.18" />
5353

5454
<!-- Integration: AWSSDK.StepFunctions -->
5555
<!-- Assembly: AWSSDK.StepFunctions -->
56-
<!-- Latest package https://www.nuget.org/packages/AWSSDK.StepFunctions/4.0.0.18 -->
56+
<!-- Latest package https://www.nuget.org/packages/AWSSDK.StepFunctions/4.0.0.19 -->
5757
<PackageReference Include="AWSSDK.StepFunctions" Version="4.0.0.18" />
5858

5959
<!-- Integration: Azure.Messaging.ServiceBus -->

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AWS/S3/BucketManagement/IDeleteBucketRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ internal interface IDeleteBucketRequest : IDuckType
1818
/// Gets the S3 bucket name.
1919
/// </summary>
2020
[Duck(Name = "BucketName")]
21-
string BucketName { get; }
21+
string? BucketName { get; }
2222
}

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AWS/S3/BucketManagement/IPutBucketRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ internal interface IPutBucketRequest : IDuckType
1818
/// Gets the S3 bucket name.
1919
/// </summary>
2020
[Duck(Name = "BucketName")]
21-
string BucketName { get; }
21+
string? BucketName { get; }
2222
}

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AWS/S3/BucketManagement/ListBucketsAsyncIntegration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class ListBucketsAsyncIntegration
3131

3232
internal static CallTargetState OnMethodBegin<TTarget, TRequest>(TTarget instance, TRequest request, ref CancellationToken cancellationToken)
3333
{
34-
var scope = AwsS3Common.CreateScope(Tracer.Instance, Operation, out var tags);
34+
var scope = AwsS3Common.CreateScope(Tracer.Instance, Operation, out _);
3535
return new CallTargetState(scope);
3636
}
3737

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AWS/S3/BucketManagement/ListBucketsIntegration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class ListBucketsIntegration
3030

3131
internal static CallTargetState OnMethodBegin<TTarget, TRequest>(TTarget instance, TRequest request)
3232
{
33-
var scope = AwsS3Common.CreateScope(Tracer.Instance, Operation, out var tags);
33+
var scope = AwsS3Common.CreateScope(Tracer.Instance, Operation, out _);
3434
return new CallTargetState(scope);
3535
}
3636

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AWS/S3/IS3EtagResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ internal interface IS3EtagResponse : IDuckType
1717
/// <summary>
1818
/// Gets the S3 response eTag, which is usually wrapped in quotes.
1919
/// </summary>
20-
[DuckField(Name = "eTag")]
21-
string ETag { get; }
20+
[Duck(Name = "ETag")]
21+
string? ETag { get; }
2222
}

0 commit comments

Comments
 (0)