mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-24 17:11:28 +01:00
/ship stops instead of running the whole test suite here when CI's run can't be reused (GST-3277) (#4565)
`gstack-ship-preflight` now stops with `SHIP_LANE_NOT_CARRIED` whenever a test suite mapped to CI has no reusable CI run, in a full preflight as well as `--tests-only`; `--run-uncarried-here` still runs it here. Why: a full preflight on gbrain-evals#547 ran the whole suite locally for 7 minutes after CI's run went stale, and the stop told an outside-author PR to dispatch a workflow that has no `workflow_dispatch` trigger. Nothing to do: a workflow that can't be dispatched now gets "merge the base and push it, or ask the author to" instead. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/adversarial-native#1 reader=adversarial-native
This commit is contained in:
1 parent
92c6c8a55c
commit
6121a19591
16 files changed
+149
-32
No files matched your search
+2
-2
@@ -1370,8 +1370,8 @@ with every character outside `A-Za-z0-9._-` turned into `_` (`pnpm lint` is
|
||||
`pnpm_lint`, `db:test` is `db_test`), and `run`, `record-ci` and `check` all
|
||||
use that one spelling, so `check --label 'pnpm lint'` finds the row; `ci_carried`
|
||||
and `CI_CARRIED:` name the stored spelling. A mapped lane that cannot
|
||||
carry prints `CI_CARRY: none label=<label> (<reason>)` and runs here, except
|
||||
under `gstack-ship-preflight --tests-only`, which stops before any lane runs
|
||||
carry prints `CI_CARRY: none label=<label> (<reason>)`, and
|
||||
`gstack-ship-preflight`, full or `--tests-only`, then stops before any lane runs
|
||||
with [`SHIP_LANE_NOT_CARRIED`](troubleshooting.md#ship-lane-not-carried) unless
|
||||
it is given `--run-uncarried-here`. Every
|
||||
other lane runs through `gstack-evidence run --reuse`: the newest row for its
|
||||
|
||||
+1
-1
@@ -1300,7 +1300,7 @@ an hour or hide an empty diff (GST-3019):
|
||||
|
||||
| Code | When | Next |
|
||||
|---|---|---|
|
||||
| `SHIP_LANE_NOT_CARRIED` | `--tests-only` was given a lane `ship_lanes_from` maps, and no verified CI run carries it at this tree. Nothing runs, not even the other lanes. | Push, dispatch the workflow the `NEXT:` line names, `gstack-ci-carry wait`, rerun; or rerun with `--run-uncarried-here` to run it here. A full preflight still runs a lane that does not carry. [Troubleshooting](troubleshooting.md#ship-lane-not-carried) |
|
||||
| `SHIP_LANE_NOT_CARRIED` | A preflight, full or `--tests-only`, was given a lane `ship_lanes_from` maps, and no verified CI run carries it at this tree, whatever the `CI_CARRY: none` reason. Nothing runs, not even the other lanes. | Push and dispatch the workflow the `NEXT:` line names, or, when it cannot be dispatched, push a merge of the base (or ask the pull request's author to); `gstack-ci-carry wait`, rerun; or rerun with `--run-uncarried-here` to run it here. [Troubleshooting](troubleshooting.md#ship-lane-not-carried) |
|
||||
| `SHIP_BASE_UNKNOWN` | `--audit --base <base>` resolves to no commit: a sha-like value is tried as a commit first, then `origin/<base>`. | Fetch the base branch or the commit, then rerun. [Troubleshooting](troubleshooting.md#ship-base-unknown) |
|
||||
|
||||
A lane carries from a run at an earlier commit when git reads that commit's tree as HEAD's (a base merge
|
||||
|
||||
+14
-8
@@ -755,16 +755,17 @@ before the fetch instead of going on unprotected.
|
||||
process holding `<git dir>/gstack-leases/.lock`), then rerun.
|
||||
|
||||
<a id="ship-lane-not-carried"></a>
|
||||
### `STOP: SHIP_LANE_NOT_CARRIED: lane <label> did not carry from a verified CI run at this tree, and --tests-only never starts a lane on its own ...`
|
||||
### `STOP: SHIP_LANE_NOT_CARRIED: lane <label> did not carry from a verified CI run at this tree, and preflight never starts a mapped lane on its own ...`
|
||||
|
||||
**Meaning.** `gstack-ship-preflight --tests-only` was given a lane whose exact
|
||||
**Meaning.** `gstack-ship-preflight`, full or `--tests-only`, was given a lane whose exact
|
||||
command `origin/<base>`'s `.gstack/pregate.json` maps in `ship_lanes_from`,
|
||||
and no verified CI run carries it at this tree: the `CI_CARRY: none
|
||||
label=<label> (<reason>)` line above the STOP says why (`no_run`: CI has not
|
||||
run this tree yet; `dirty_tree`: uncommitted work). A mapped lane is the full
|
||||
suite, which can take most of an hour on a small machine (gbrain #9662: a
|
||||
50-minute unit lane on 4 CPUs), so `--tests-only` no longer starts it on its
|
||||
own (GST-3019).
|
||||
run this tree yet; `dirty_tree`: uncommitted work; `tree_mismatch`: the run
|
||||
tested a merge with an older base). A mapped lane is the full suite, which can
|
||||
take most of an hour on a small machine (gbrain #9662: a 50-minute unit lane on
|
||||
4 CPUs), so preflight never starts it on its own, whatever the reason (GST-3019;
|
||||
a full preflight did until GST-3277).
|
||||
|
||||
**What is kept.** Nothing ran: no lane, mapped or not, started. The pregate
|
||||
line above it is the pregate's own verdict.
|
||||
@@ -772,8 +773,13 @@ line above it is the pregate's own verdict.
|
||||
**Fix.** Follow the `NEXT:` lines. Commit and push the tree, dispatch the
|
||||
workflow they name (`gh workflow run <workflow> --ref <branch>`), wait with
|
||||
`gstack-ci-carry wait --base <base>`, and once it prints `CI_WAIT: green`
|
||||
rerun the same `--tests-only` command, which then carries the lane. To run the
|
||||
lane on this machine instead, rerun with `--run-uncarried-here`.
|
||||
rerun with `--tests-only` and the same `--lane` flags, which then carries the
|
||||
lane (a full preflight rerun with the same `--run` would stop on its open run). A workflow with no
|
||||
`workflow_dispatch` trigger, or a run profile that accepts no dispatched run,
|
||||
cannot be dispatched, so the `NEXT:` line says so: merge `origin/<base>` into
|
||||
the branch and push it, or, on a pull request you cannot push to, ask its
|
||||
author to. To run the lane on this machine instead, rerun with `--tests-only`
|
||||
and `--run-uncarried-here`.
|
||||
|
||||
**Expected result.** `LANE: <label> carried run=<id>/<attempt> …`, or with
|
||||
`--run-uncarried-here`, `LANE: <label> pass …` from the run here.
|
||||
|
||||
Reference in new issue
Block a user