minio / minio-dotnet

MinIO Client SDK for .NET
https://docs.min.io/docs/dotnet-client-quickstart-guide.html
Apache License 2.0
575 stars 230 forks source link

Breaking changes in 6.0.3 for ListObjectsAsync #1115

Closed RobSlgm closed 4 months ago

RobSlgm commented 4 months ago

With 6.0.3 a call of client.ListObjectsAsync(args, ct)fails to compile. It compiled and worked with 6.0.2.

1049 introduces a Minio.ApiEndpoints.CompatibilityExtensions which maps some ListObjectsAsync calls to the new ListObjectsEnumAsync. The calls with an CancellationToken are missing.

ebozduman commented 4 months ago

looking into it...

ramondeklein commented 4 months ago

It was a mistake to add IObservable<T> with a cancellation-token in the first place, so you should probably not want to use this. If you want to cancel an observable, then you should dispose the subscription. Submitted #1116 to bring back the cancellation token.

@RobSlgm Instead of using the cancellation token, I would highly recommend to cancel the subscription instead. That's the proepr solution. Cancellation tokens are meant to be used with async programming (using tasks). When using IObservable<T>, then stick with that.

harshavardhana commented 4 months ago

Why is this reopened?

ebozduman commented 4 months ago

Sorry! It is a mistake. I did not even realize I've reopened it. My fingers are not listening to me.