-
Couldn't load subscription status.
- Fork 713
PublishingActivityProgressReporter fixes #8571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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;
src/Aspire.Hosting/Publishing/PublishingActivityProgressReporter.cs
Outdated
Show resolved
Hide resolved
|
/backport to release/9.2 |
|
Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14298999219 |
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