Produce test-output.json even when a test leg fails#5806
Open
pietern wants to merge 1 commit into
Open
Conversation
We upload test-output.json (the concatenated gotestsum output) as a CI artifact to inspect results and timing after the fact, most importantly when a test fails. But the file is produced by a cat in the test task's cmds, which is skipped when a deps leg fails, so on a failed run the file is never written and the upload finds nothing. Move the cat (in both test and test-unit) into a defer, which runs even after a leg fails, so the artifact is always produced. The task still exits non-zero, so CI failures are unaffected. For the defer to have something to concatenate, the legs now run as sequential cmds rather than parallel deps. An A/B CI run showed no timing regression; both legs already saturate the runners, so running them in parallel mostly just created core contention. Co-authored-by: Isaac
Contributor
Waiting for approvalBased on git history, these people are best suited to review:
Eligible reviewers: Suggestions based on git history. See OWNERS for ownership rules. |
Collaborator
Integration test reportCommit: 90aceac
226 interesting tests: 203 FAIL, 13 SKIP, 6 RECOVERED, 2 KNOWN, 2 flaky
Top 4 slowest tests (at least 2 minutes):
|
denik
reviewed
Jul 2, 2026
| - task: test-acc | ||
| vars: | ||
| ACCEPTANCE_TEST_FILTER: "{{.ACCEPTANCE_TEST_FILTER}}" | ||
| # Run the legs as sequential cmds (not parallel deps) so the concatenating |
Contributor
There was a problem hiding this comment.
can we keep parallel runs though? it saves time
Contributor
There was a problem hiding this comment.
if not possible, then we can concatenate outside of taskfile
Contributor
Author
There was a problem hiding this comment.
I measure the diff and it is negligible. Each test run already saturates CPU. See #5802.
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.
We upload test-output.json (the concatenated gotestsum output) as a CI artifact to inspect results and timing after the fact, most importantly when a test fails. But the file is produced by a
catin thetesttask'scmds, which is skipped when adepsleg fails, so on a failed run the file is never written and the upload finds nothing. This moves thecat(in bothtestandtest-unit) into adefer:, which runs even after a leg fails, so the artifact is always produced. The task still exits non-zero, so CI failures are unaffected.For the defer to have something to concatenate, the legs now run as sequential
cmdsrather than paralleldeps. An A/B CI run (#5802) showed no timing regression (serial was equal or faster on 5 of 6 matrix cells). Both legs already saturate the runners, so running them in parallel mostly just created core contention.This pull request and its description were written by Isaac.