Repository navigation
fix(lab): a failed run stops the Lab's sweep, a run cancelled while starting is cancelled on the server, and diff rows keep their order - #400
Merged
Conversation
…tarting is cancelled on the server, and diff rows keep their order Three Lab TUI faults: - A FAILED or ERROR run came back as an ordinary result. It became a 0 rec/s iteration, and a sweep, warmup or median series launched its next step against the same failure. - Pressing x while CreateTest was in flight left the run the API then started running: its labTestStartedMsg arrived with the Lab no longer running and was dropped, so nothing watched or cancelled it. - The diff's Parameter Changes rows came from ranging over a map, so they reordered on every frame. A FAILED or ERROR status now ends the run through the Lab's error path: no iteration, the series stops, and the status line names the status, with r to retry. A late labTestStartedMsg cancels its run on the server, through the cancelRun command the x key now shares. The diff rows are in key order.
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.
Item 1.8 of the CLI performance and stability plan (findings F24 and F40's Lab half). Independent of the other Wave 1 PRs.
Why
Three faults in
kates lab, on main (6f4cf61):cli/tui/lab.go:1115-1117).pollTestOncesends FAILED and ERROR as an ordinary done message, so the run becomes a 0 rec/s iteration. A sweep, warmup or median series then launches its next step against the same failure.xwhileCreateTestis in flight sets the Lab not running. ThelabTestStartedMsgthat follows is then dropped (:396-398), and the run the API started goes on with nothing watching or cancelling it.:994-1004). The Parameter Changes rows range over a map.Changes
cli/tui/lab.go:test <id> ended FAILED). The Lab's existing error path takes it: no iteration is recorded, the sweep, warmup and median series stop, and the status line offersrto retry.labTestStartedMsgthat arrives when the Lab is no longer running cancels its run on the server. The command that does it is the newcancelRun, which thexkey now uses too, so both send the same 10 s-boundedPOST /api/tests/{id}/cancel.slices.Sorted(maps.Keys(…))).Tests
Added:
TestLabFailedRunStopsTheSweep, for FAILED and ERROR in parallel:pollTestOnceagainst a stub returning that status gives an error, and in a running sweep it records no iteration, stops the sweep, and names the status. It takes 2 s,pollTestOnce's own wait.TestLabDiffParameterRowsKeepTheirOrder: 20 renders of a five-key diff are identical, and the keys are in sorted order.Changed:
TestLabTestStartedMsg's "dropped when the run was cancelled during creation" case expected no command, which is the bug. It is now "cancelled on the server…", and it seesPOST /api/tests/run-42/cancelreach a stub.On main's
lab.goall three fail: no cancel command, a nil error for FAILED and ERROR, and a diff that changed between frames.Run locally, passing:
cd cli && go test ./...,go test -race ./tui,go vet ./....golangci-lint run --new-from-rev=origin/main ./...: 0 issues.scripts/check-cli-style.shandscripts/check-cli-compat.sh: OK.cli/**triggers (Build & Test): this PR touches nothing underkates/../mvnw teston main'skates/tree ran 1,254 tests with 0 failures and 0 errors, once for all of Wave 1.Skipped locally:
govulncheck, asgo.modis unchanged.CI only:
./mvnw verifywith the*ITtests, the Kind and Docker jobs, CodeQL and Trivy.Deliberately not done
cli/tui/topics.go:90-108), is item 6.2.x, then a fresh start, both inside oneCreateTestround trip. The plan does not list it, and it is left out.