Skip to content

Fix inaccurate comment about command state update timing#13771

Merged
JamesNK merged 2 commits intojamesnk/with-http-command-flaky-testsfrom
copilot/sub-pr-13769
Jan 6, 2026
Merged

Fix inaccurate comment about command state update timing#13771
JamesNK merged 2 commits intojamesnk/with-http-command-flaky-testsfrom
copilot/sub-pr-13769

Conversation

Copy link
Contributor

Copilot AI commented Jan 6, 2026

Description

The comment in WithHttpCommandTests.cs incorrectly stated that command state updates happen "asynchronously by a WatchAsync loop". This was inaccurate based on the actual implementation in ResourceNotificationService.cs.

What changed:

  • Updated comment to reflect that UpdateState callback executes synchronously during PublishUpdateAsync call
  • Clarified that the wait is for notification propagation through the event system, not for async state computation

The UpdateCommands method (line 710 in ResourceNotificationService.cs) invokes the UpdateState callback synchronously during PublishUpdateAsync. The wait is necessary only for the OnResourceUpdated event to propagate to subscribers.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix flaky WithHttpCommand tests based on review feedback Fix inaccurate comment about command state update timing Jan 6, 2026
Copilot AI requested a review from JamesNK January 6, 2026 10:04
@JamesNK JamesNK marked this pull request as ready for review January 6, 2026 10:09
@JamesNK JamesNK requested a review from mitchdenny as a code owner January 6, 2026 10:09
@JamesNK JamesNK merged commit df26a21 into jamesnk/with-http-command-flaky-tests Jan 6, 2026
2 of 3 checks passed
@JamesNK JamesNK deleted the copilot/sub-pr-13769 branch January 6, 2026 10:09
radical pushed a commit that referenced this pull request Jan 6, 2026
* Fix WithHttpCommand flaky tests

* Clean up

* Clean up

* Fix inaccurate comment about command state update timing (#13771)

Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* Clean up

* Restore attributes

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants