-
Notifications
You must be signed in to change notification settings - Fork 647
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
Merged
Merged
Conversation
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
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;
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
/backport to release/9.2 |
Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14298999219 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-app-model
Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
area-cli
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
PublishingActivityProgressReporter
API. 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
AppHostRpcTarget
detecting 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
PublishingActivityProgressReporter
so 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