Repository navigation
ci(experimental): skip or stop superseded runs instead of cancelling them (#1938) - #1942
Conversation
|
NEEDS CHANGES at
|
|
GOOD TO GO at |
|
for superceded.py, why no |
|
It runs where |
|
Going with |
…them (#1938) - Drop experimental.yml's concurrency group: a cancelled check marks its commit red, and a group without cancel-in-progress still cancels its pending run. - Add util/superseded.py: a commit is current while it heads main, or its open pull request; any other event, or an API error, is current. - Add a `current` gate job that every other job needs and skips on, so a run superseded before it starts ends with skipped checks and a notice. - Run the capped pytest command under the script's watcher, which checks every 60 s and, once superseded, stops the session (TERM, then KILL) and exits 0 with a notice and a summary line; otherwise it keeps the tests' status. - Describe it in workflows.rst; pin it in tests/project and update the pins the gate and watcher move. Closes #1938
…1938) - Run the watcher outside the scope and, where the tests run in one, stop pcapkit-tests.scope by name with `sudo -n systemctl kill`: the scope's processes are out of reach of a signal to the session's root-owned sudo. The session's process group stays the path for an unscoped run. - Bound every wait. A command that outlives SIGKILL gets a `Superseded run not stopped` warning and exit 70, not 0, since its tests may run on. - Open each downstream `if:` with `!cancelled()`, so a failed `current` job runs the rest; the legs still need `changes` and `python-versions`. - Test the scoped stop, the bounded stop and the gate's failure semantics through an injectable command runner and signaller, and in the step. Refs #1938
- Back util/superseded.py's transport with a requests.Session, keeping the injectable transport, ETag/If-None-Match, the bounded timeout, and any error, a missing requests included, counting as current. - Gate: read `latest`, set it up and install requests before the check, every step continue-on-error. - Legs: set up `latest` apart from the leg (`update-environment: false`), install requests into it alone, and run the watcher on it; where either step fails, the tests run unwatched. Each step is capped at 1 minute, leaving 3 of the job's 140 uncapped. - util/update_python_versions.py reads a matrix job's fallback label for `latest`, as it does for the tiers. - Update the docs, the caps pins and the new tests. Refs #1938
a9d95df to
1cce93a
Compare
|
Round 3 at Two changes outside the ask, both needed to keep existing pins green:
A Sonnet re-review is running. |
|
NEEDS CHANGES at |
|
GOOD TO GO at |
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeAdded a changelog entry — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657
ci— workflows or build toolingExperimental Tests no longer cancels superseded runs, so commits no longer show a red X when a newer push lands. The concurrency group is gone: even without
cancel-in-progress, a group cancels the pending run it replaces.A new
currentgate job (util/superseded.py) checks that the commit is still the head ofmain, or of an open PR. Every other job skips when it is not, and a skipped run is neutral in the commit's status.The capped pytest command now runs under the script's watcher. Once a newer commit lands, or the PR merges or closes, it stops the session with TERM and then KILL, and exits 0 with a
Supersedednotice, which frees the runner.If the API cannot be read, the commit counts as current. A real test failure keeps its status, and every existing cap is unchanged. The behaviour is pinned in
tests/project/test_superseded_runs_1938.py, which fails onmain.actionlintwas not available.Closes #1938