mcp icon indicating copy to clipboard operation
mcp copied to clipboard

[BUG] ICosmosService should implement IAsyncDisposable instead of IDisposable

Open vukelich opened this issue 1 month ago • 1 comments

Describe the bug

CosmosService.Dispose is currently an async void which is an anti-pattern since the work cannot be awaited on by callers. The async code is needed for its cache clearing.

Expected behavior

ICosmosService should implement IAsyncDisposable instead of IDisposable

Actual behavior

CosmosService.Dispose is currently an async void which is an anti-pattern since the work cannot be awaited on by callers. The async code is needed for its cache clearing.

Reproduction Steps

None

Environment

No response

vukelich avatar Nov 11 '25 20:11 vukelich

@anuchandy can you help drive this with our Cosmos friends

joshfree avatar Nov 12 '25 16:11 joshfree