FluentStorage
FluentStorage copied to clipboard
null reference error when attempting recursive delete
[25-05-12 20:50:53.201 ERR] DefaultHealthCheckService: Health check Storage with status Unhealthy completed after 113.6429ms with message 'null'
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
at FluentStorage.AWS.Blobs.AwsS3DirectoryBrowser.DeleteRecursiveAsync(String fullPath, CancellationToken cancellationToken)
at FluentStorage.AWS.Blobs.AwsS3BlobStorage.DeleteAsync(String fullPath, AmazonS3Client client, CancellationToken cancellationToken)
at FluentStorage.AWS.Blobs.AwsS3BlobStorage.DeleteAsync(IEnumerable`1 fullPaths, CancellationToken cancellationToken)
at GZCTF.Services.HealthCheck.StorageHealthCheck.CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken) in /home/runner/work/GZCTF/GZCTF/src/GZCTF/Services/HealthCheck/StorageHealthCheck.cs:line 27
and I want to use newer OpenTelemetry.Instrumentation.AWS
Warning As Error: Detected package downgrade: AWSSDK.Core from 4.0.0 to 3.7.402.56. Reference the package directly from the project to select a different version.
GZCTF -> OpenTelemetry.Instrumentation.AWS 1.12.0 -> AWSSDK.Core (>= 4.0.0 && < 5.0.0)
GZCTF -> AWSSDK.Core (>= 3.7.402.56)
This would be a breaking change. What happens if you add an explicit dependency on your project for v4 as the message states?
This would be a breaking change. What happens if you add an explicit dependency on your project for v4 as the message states?
When explicitly specifying an upgrade to v4, it will pass the compilation but fail to run, resulting in a runtime error as shown above.
Looking at the log & source code, I would suggest you splitting the issue in 2:
- a defect for the error which can likely be solved by an if state in https://github.com/robinrodricks/FluentStorage/blob/develop/FluentStorage.AWS/Blobs/AwsS3DirectoryBrowser.cs to handle when
response.S3Objectsisnullrather than an empty collection. - if you really want an enhancement to bump the min version of aws but I see little need especially if 1 gets fixed without it.
Looking at the log & source code, I would suggest you splitting the issue in 2:
- a defect for the error which can likely be solved by an if state in
develop/FluentStorage.AWS/Blobs/AwsS3DirectoryBrowser.cs to handle whenresponse.S3Objectsisnullrather than an empty collection.- if you really want an enhancement to bump the min version of aws but I see little need especially if 1 gets fixed without it.
Yeah I don't really want to bump up the minimum supported version, but maybe we can do some work around to make v4 compatible?
I suspect #112 will solve your issue. Please checkout my fork & branch patch-1 so that you can test it locally.
Key thing is the new if check.
Please update the title to be "null reference error when attempting recursive delete"
I suspect #112 will solve your issue. Please checkout my fork & branch pstch-1 so that you can test it locally.
Key thing is the new if check.
Please update the title to be "null reference error when attempting recursive delete"
Is this the only usage that leads to incompatibility?
I can't see any other similar occurances
@GZTimeWalker how did your testing go?