PublishingActivityProgressReporter fixes#8571
Merged
mitchdenny merged 6 commits intomainfrom Apr 7, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/Aspire.Cli/Commands/PublishCommand.cs:178
- [nitpick] The variable 'lastPublishingActivity' is assigned within the loop but never used elsewhere. Consider removing it if it is redundant, or integrate it in subsequent logic if it was intended to be used.
(string Id, string StatusText, bool IsComplete, bool IsError)? lastPublishingActivity = null;
davidfowl
reviewed
Apr 6, 2025
src/Aspire.Hosting/Publishing/PublishingActivityProgressReporter.cs
Outdated
Show resolved
Hide resolved
davidfowl
reviewed
Apr 6, 2025
davidfowl
approved these changes
Apr 7, 2025
Member
Author
|
/backport to release/9.2 |
Contributor
|
Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14298999219 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes: #8570
This PR fixes a race condition that existed with the
PublishingActivityProgressReporterAPI. The issue was that when someone used the old API to update the status/create the status of an issue it was possible for another piece of code to mutate the state of the publishing activity.This in turn resulted in internal logic in the
AppHostRpcTargetdetecting that a publishing activity was completed and yield returning the activity stream without actually transmitting the completed activity.This resulted in the CLI interpretting this as a failure state (even though the apphost returned a zero exit code).
The fix was to rework the API for the
PublishingActivityProgressReporterso that it is similar to what we do with theResourceNotificationService. Now we have an API where we create a new status object based on the old one.Here is an example of the new usage:
Here is a video of Kubernetes publisher working where this issue was first noticed:
aspire-activityreporter-fixes.mp4