Add async UnpackStreamAsync to ISyncManagementService, obsolete sync UnpackStream - #1005
Merged
Conversation
ISyncManagementService.UnpackStream called the obsolete ISyncActionService.UnpackImportFromStream (CS0618, removed in v19). Adds UnpackStreamAsync calling the async replacement directly, and obsoletes UnpackStream with a default forwarding implementation - matching the pattern ISyncActionService already uses for its own Async/sync pair. The controller call site now awaits the async method. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ISyncManagementServicegets a newUnpackStreamAsync(Stream stream)method. The existingUnpackStream(Stream stream)is now[Obsolete]with a default implementation that forwards to the async version.Why
uSyncManagementService.UnpackStreamcalled the obsoleteISyncActionService.UnpackImportFromStream(Stream)(CS0618, scheduled for removal in v19), producing the last remaining build warning.ISyncActionServicealready exposes the async replacement (UnpackImportFromStreamAsync), so the fix is to plumb that all the way up throughISyncManagementServiceand its controller caller, rather than keep calling the obsolete sync member.How
Mirrors the pattern
ISyncActionServicealready uses for this exact same rename (UnpackImportFromStream→UnpackImportFromStreamAsync, seeuSync.BackOffice/Services/ISyncActionService.cs:71-78) and the existing[Obsolete("... will be removed in vXX")]convention already used elsewhere inISyncManagementService(GetActions()):ISyncManagementService.cs— addedTask<UploadImportResult> UnpackStreamAsync(Stream stream);UnpackStreamis now[Obsolete]with a default body callingUnpackStreamAsync(stream).Result.uSyncManagementService.cs—UnpackStreamimplementation replaced withUnpackStreamAsync, which now awaits_syncActionService.UnpackImportFromStreamAsync(stream)directly instead of the obsolete sync wrapper.uSyncPerformActionController.cs—ProcessUploadnow callsawait _managementService.UnpackStreamAsync(stream).No other call sites reference
UnpackStream.Notes for reviewers
CS0618warnings (down from the last remaining one). Only a pre-existing, unrelatedCS8632nullable-annotation warning remains in the test project.ISyncActionService's equivalent default body uses.GetAwaiter().GetResult()rather than.Result(avoids wrapping exceptions inAggregateException) — worth aligning if this ever gets called from a sync context, but sinceUnpackStreamhas no callers left in-repo it's not a functional concern here.🤖 Generated with Claude Code