Repository navigation
Stream docs-journeys results and show failures clearly - #4808
Conversation
A run now prints each journey as it finishes, with a status line of the running ones on a terminal. A reason that more than three journeys share is shown once with a count, and `--verbose` lists them. A failure is repeated last, in the shape `Nullean.Snapshots` uses under TUnit: the step, the error as written, the page, and a `Rerun:` line. Bad input is one `Error:` line, not a stack trace. `--url` takes `prod`, `edge`, `demo` and `local`, `--only` runs journeys by id, and `mise run journeys:live` wraps both. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… streaming The rerun line now carries --journeys, --env, --build-type and --feature so copying it reproduces the run. DrawStatus clears the old status line first, and Finished no longer redraws twice. A new test reads a fast journey's result while a slow one is still running. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ntext On a terminal, a failure shows the journey's lines around the failing one, the error wrapped to the window, the page the journey last opened and the rerun command. The run's context is one labelled row per fact, with the site address and any probe notes. Step updates redraw the status line at most ten times a second. CI and piped output keep the compact `context:` line and the `Journey stopped at` shape. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…the streaming test Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
| if (!force && _sinceDraw.Elapsed < StatusInterval) | ||
| { | ||
| Defer(); | ||
| return; |
There was a problem hiding this comment.
Severity: P3 (Low)
Add a regression test for the deferred interactive redraw. The CLI tests redirect stdout, so interactive is false and this branch never runs; removing Defer() would leave them green while restoring the stale-step display. Exercise a step arriving within the throttle interval and verify that it is eventually displayed without another step event, and that finishing the journey prevents a pending redraw from writing afterward.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
The run opens with a lead-in and an indented context with coloured values. Skips are blue with space around them, and results and totals carry icons, with `FAILED` in bold red. Icons fall back to ASCII when the locale is not UTF-8, and `NO_COLOR` drops the colour. The version only shows once builds are stamped. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4808/ Sample changed pages: |
…them The mise task descriptions now say which runner they start and what it compares. The skipped live journeys point to `mise run journeys:live` instead of a `cdp run` recipe, and the docs get a table of the four ways to run journeys. The three regexes in `SnapshotScrubbing`, the `StringBuilder.Append` in the fake site and the Unix file mode call no longer warn, and `TUnit0001` is suppressed for the journey tests because it comes from the snapshots package. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…improve # Conflicts: # tests/Elastic.Documentation.Journeys.Tests/DocsJourneysExportTests.cs # tests/Elastic.Documentation.Journeys.Tests/Elastic.Documentation.Journeys.Tests.csproj
| arg "[site]" default="demo" help="prod, edge, demo or local" | ||
| arg "[args]..." var=#true help="Passed to docs-journeys run" | ||
| ''' | ||
| run = "dotnet run --project src/tooling/docs-journeys -- run --url ${usage_site} --journeys tests/Elastic.Documentation.Journeys.Tests/journeys ${usage_args}" |
There was a problem hiding this comment.
Severity: P3 (Low)
Preserve argument boundaries when forwarding the live task's extra arguments. Expanding ${usage_args} as an unquoted shell scalar loses empty arguments and splits values containing whitespace. For example, --feature "", which the CLI supports for disabling detected features, cannot reach the runner intact through this task. Forward the original argument vector without shell word-splitting or glob expansion.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
| { | ||
| var command = rerun.Replace("{id}", outcome.File.Id, StringComparison.Ordinal); | ||
| _ = text.AppendLine().Append( | ||
| interactive ? PrettyFailure(outcome, journeysRoot, command) : FailureBlock(outcome, journeysRoot, command) |
There was a problem hiding this comment.
Severity: P3 (Low)
Add automated coverage for the interactive reporter branch. Every CLI test helper redirects standard output, so UseInteractive is always false: the new context block, source excerpts, terminal failure rendering and status-line redraw/cleanup are never exercised. Reporter-level tests with interactive mode enabled should cover a failure and concurrent journeys finishing, rather than leaving the terminal-specific behavior outside the regression suite.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
The fast journey's result took 17.8 s on a CI runner against a 12 s limit, because dotnet start-up and the Chrome launch were slow there. The slow journey now times out at 90 s and the limit is 60 s. The test kills the process once the fast result is seen, so the margin costs no time. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
docs-journeys runnow prints each journey as it finishes, collapses repeated skips, and ends with a failure block in the same shapeNullean.Snapshotsuses under TUnit.Affects: Internals only
Prompt summary: Improve the developer experience of running the browser journeys against live sites. A run printed nothing until every journey had finished, 18 of its lines were one repeated skip reason, and a failure pointed at a temporary folder. Failures and errors should read as clearly as the
Nullean.Snapshotsones, whether they come from TUnit,snapordocs-journeys.Why
docs-journeys run --url https://docs-demo.elastic.devwaited forTask.WhenAllbefore it wrote anything. Against demo it then listed 18 skips for the same reason, and the one failure showed a path under/var/folders/.../docs-journeys-XXXX/with no way to rerun it. Running one journey meant a nine-linecdp runcommand whose allow list was missing the global-nav host.What
Results stream while the run is going
Each journey prints when it ends. On a terminal, a status line at the bottom shows the running journeys and their current step. In CI or a pipe the output is plain lines with no ANSI codes, and the existing
ok,FAILEDandskippedlines keep their format.Repeated skips collapse
A reason shared by more than three journeys is shown once with a count, such as
skipped 18 journeys (requires build-type:isolated).--verboselists them. JUnit and the step summary still list every skipped journey.Failures read like snapshot failures
After the results, each failure shows
Journey stopped at <path>:<line>: <command>, the error as written, the last page checked, and aRerun:line with the--onlycommand. The path is the file in the checkout, even for a journey compiled into the binary. Bad input, such as an unknown--onlyid, is oneError:line and exit code 1 instead of a stack trace.A shorter way to run a live site
--urlacceptsprod,edge,demoandlocal,--only area/nameselects journeys by id, andmise run journeys:live demowraps both. The docs replace the longcdp runrecipe with these and keep a corrected one for debugging a single file.The four ways to run journeys are told apart
The
misetask descriptions say which runner each starts and whether it compares transcripts. The skipped live journeys in the TUnit run point tomise run journeys:liveand no longer to acdp runrecipe, anddocs/development/journeys.mdhas a table of TUnit,journeys:live,snap journey runandcdp run. The build warnings that printed before every TUnit run are fixed (SnapshotScrubbingregexes, a culture-sensitiveAppend, a Unix file mode call), exceptTUnit0001, which comes from the snapshots package and is suppressed for the journey tests with a note.Verify
mise run journeys:live demo mise run journeys:live prod --only navigation/main-paths mise run journeys -- --treenode-filter "/*/*/DocsJourneysCliTests/*"The native AOT publish (
dotnet publish src/tooling/docs-journeys -c release) has no warnings. SettingCollapseAboveto 100 makesRun_ManyJourneysSkippedForOneReason_CollapsesThemUnlessVerbosefail.Out of scope: the page URL and a screenshot on failure need
Nullean.Cdpto record them, so they follow in a later PR after a cdp release.🤖 Generated with Claude Code