Repository navigation
feat(report): a runFlow's steps are in the report as they run - #276
Open
luka-vladika-happening-xyz wants to merge 1 commit into
Open
luka-vladika-happening-xyz wants to merge 1 commit into
luka-vladika-happening-xyz wants to merge 1 commit into
Conversation
A runFlow's, repeat's or retry's steps were written to the flow's file only when it ended, so a reader of the report (a live view of the run) saw a one-line runFlow for its whole run and then all its steps at once. Each nested step is now written as it starts (running) and as it ends, with the compound steps running around it, through FlowWriter.CommandSubs; the list written at the step's end (CommandEndWithSubs) is unchanged.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
A
runFlow's,retry's orrepeat's steps were written to the flow's report file only when it ended (CommandEndWithSubs), so a reader following the report while the flow runs (a live view of the run, whichupdateSeqallows) saw the step as onerunningline for its whole run, then all its steps at once. A flow made mostly ofrunFlows showed almost nothing while it ran.Maestro shows a subflow's steps as they run:
Orchestra.executeSubflowCommandscallsonCommandStartandonCommandCompletefor each of them,MaestroCommandRunnerredraws its view at each, andAnsiResultViewexpands a running or failedrunFlowdown to its steps. This gives the report the same.Each nested step is now written to the flow's file as it starts (
running) and as it ends, with the compound steps around it shown asrunningtoo, through a newFlowWriter.CommandSubs, which writes the command's steps so far and updates the index, as a top-level step's start and end do. The list written at the command's end is unchanged, so a finished report is the same as before.The cost: each nested start and end rewrites the flow's file and the index once more, as each top-level step's start and end already do.
TestRunFlowStepsAreReportedAsTheyRunruns arunFlowholding a tap, a nestedrunFlowwith a tap, and a tap, and reads the flow's file while each tap runs: firsttapOn: running; then the first tap passed and the nestedrunFlowrunning with its tap running; then the nestedrunFlowpassed and the last tap running. It fails on main.go test -race ./pkg/executor ./pkg/reportpasses; golangci-lint v2.13.2: 0 issues.