Repository navigation
ci: stop warning about missing JUnit on legs stopped as superseded (#2073) - #2076
Merged
Merged
Conversation
…2073) util/superseded.py's `watch` stops the tests of a superseded run before pytest writes junit.xml, and `Upload test timings` then warned "No files were found with the provided path" on every stopped leg, beside the `Superseded` notice that already explains it. - `watch` writes `stopped=true` to `$GITHUB_OUTPUT` once it has stopped the command. - experimental.yml's `Upload test timings` sets `if-no-files-found` to `ignore` on that output and `warn` otherwise, so a leg that ran to its end and wrote no file still warns. - tests/project/test_superseded_junit_upload_2073.py pins the output, the upload's expression, the JUnit path, and runs the real tests step.
Owner
Author
|
GOOD TO GO at
The same two warnings recur in Discussion #2072 for run 39898095976; this PR and #2075 cover both. |
4 of 5 tasks
Contributor
|
Coverage: 91.54% (unit tier, Python 3.15,
Per-file detail: the |
4 of 5 tasks
Owner
Author
|
Ready to merge at |
4 of 5 tasks
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— changes to CI configuration files and scriptsDescription of your pull request and other information
Closes #2073. Nothing was missing. Both legs in run 39898029852 were stopped as superseded (#1938):
Terminated … systemd-runat 60 s, thenmain is at 27288aa93, no longer at 271534c35; job 120233865247 shows the same. Only after that does Upload test timings warn aboutjunit*.xml, which pytest never got to write.--junitxml="$RUNNER_TEMP/junit.xml"matches the glob.mainsince then, 57 of 58 missing-JUnit warnings come from stopped legs. The other one is a real OOM kill that already warns on its own.The fix:
util/superseded.py watchwritesstopped=trueto$GITHUB_OUTPUTafter it stops the tests, without failing the stop if that write fails.if-no-files-foundtoignorewhensteps.tests.outputs.stopped == 'true', andwarnotherwise. A stopped leg is already explained by its notice, while a leg that finished without JUnit still warns.workflows.rstgets one paragraph in the ci(experimental): skip or stop superseded runs instead of cancelling them, so commits are not marked red #1938 section.Tests: the new
test_superseded_junit_upload_2073covers the expression for each value, the glob against the step's path, and the watcher's output on stop, on a normal exit and on a failed write. It also runs the real Run unit tests script with a stub pytest. Onmainit gives 8 failed; here, 8 passed. The superseded, KTLO-guard, matrix-tier, reporter, timing, shard and workflow tests all pass.Unverified until a live run: that
upload-artifactv7.0.2 accepts the expression forif-no-files-found.