Repository navigation
Show progress while simulate renders and plans composites - #565
Merged
Merged
Conversation
After the last setup step (starting diff servers), simulate rendered every composite and planned its managed resources with nothing on screen; to the user the CLI looked hung. Show a 'Simulating changes' spinner for that stretch, updated with which composite of how many is being processed, resolving to a checkmark before the plan output so it matches the setup step style. Progress lines need their text to change over time, which the event model keyed by text could not express: events gain an optional Name that identifies an operation across text changes, an Updated status, and the multi-spinner keys its lines accordingly. Plain (non-TTY) output prints the started and resolved lines and drops the in-place updates. Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
haarchri
requested review from
a team,
jcogilvie and
tampakrap
as code owners
November 19, 2026 21:26
Codecov Report❌ Patch coverage is 🚀 New features to boost your workflow:
|
jcogilvie
reviewed
Nov 19, 2026
jcogilvie
left a comment
Collaborator
There was a problem hiding this comment.
Approving with one comment:
The new keyed and updated path isn't tested yet. TestSimulateWithProgress runs the plain printer, which drops Updated events by design, so AddKeyed, UpdateKeyed and SuccessKeyed and the processors' Report calls are never exercised. I'd like to see:
- table-driven tests for
MultiSpinner - tests that give
PerformDiffandcollectXRDiffsaProgressand check the(done, total, detail)sequence they report.
adamwg
reviewed
Nov 19, 2026
adamwg
left a comment
Member
There was a problem hiding this comment.
Thanks for the update, I like this overall. Couple of notes inline.
Collapse the Keyed method variants into MultiSpinner's Add/Success/Fail signatures - asyncPretty was their only caller. The keyed update is named UpdateText because Update is taken by the tea.Model interface. Prefix the per-composite progress detail with the composition being processed, so composites of the same name stay apart when several compositions are simulated in one run. Restore the doc comments WithProgress and simulatingMsg were inserted into, and drop a vacuous nil check on a local in TestSimulateWithProgress. Cover the keyed path: table-driven MultiSpinner tests pin how keys identify lines whose titles change, and progress-sequence tests pin the (done, total, detail) reports from PerformDiff and collectXRDiffs. Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
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.
Description of your changes
After the last setup step (starting diff servers), simulate rendered every composite and planned its managed resources with nothing on screen; to the user the CLI looked hung. Show a 'Simulating changes' spinner for that stretch, updated with which composite of how many is being processed, resolving to a checkmark before the plan output so it matches the setup step style.
Progress lines need their text to change over time, which the event model keyed by text could not express: events gain an optional Name that identifies an operation across text changes, an Updated status, and the multi-spinner keys its lines accordingly. Plain (non-TTY) output prints the started and resolved lines and drops the in-place updates.
Now that stretch shows a spinner updated with which composite of how many is being processed, and resolves to a checkmark before the plan output, matching the setup step style:
Fixes #545
I have:
./nix.sh flake checkto ensure this PR is ready for review.backport release-x.ylabels to auto-backport this PR.Need help with this checklist? See the cheat sheet.