mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-18 06:04:33 +01:00
/ship's test step says when it hits its time limit, and long test file lists no longer overflow the remote command (GST-2958) (#4429)
* Say when /ship's test step hit its time limit, and keep long file lists off the remote test command line gstack-ship-preflight stopped gstack-pregate after a fixed hour and printed 'PREGATE: unreadable (exit 143)'. The whole step's budget is now --step-timeout <s> (default 3600), and a stop at it prints 'PREGATE: time limit hit' with the way out: push and let CI's full run carry the tests, or a larger budget. The test_backend command pregate prints for a small machine put every selected file into one argument, which Linux refuses past 128 KiB. The files now reach the VM in a setup script named by its content. Also adds an arg-limit troubleshooting entry and says the Windows job has eight shards. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Read the small-machine file list from the setup script in the hidden-folder path test The remote command now names a setup script instead of the files, so the test checks that the script lists the ./-prefixed path. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Keep a test path with a newline out of the remote file list A selected test path containing a newline, or equal to the list's end marker, could end the setup script's file list early and run the rest as shell on the test VM. Such paths now keep the quoted inline command. Review-Finding: p1/outside-voice#1 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Mark the preflight half of the Step 5 time limit to-do as done Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
e8c8625bd6
commit
aeb74eb00b
11 files changed
+146
-20
No files matched your search
+8
-4
@@ -103,7 +103,7 @@ the byte-pinned `/ship` renders in `test/fixtures/golden/`).
|
||||
| `sealed` | sealed or eval output that must never reach a public destination; read by the pre-push hook and `gstack-pregate sealed` (see [sealed output](#sealed)) |
|
||||
| `price_file` | repo-relative path of the paid gate's call-plan data file (`GSTACK_EVAL_CALLS v1`); `gstack-eval-plan price-gate` prices from it and never executes anything ([docs/eval-calls.md](eval-calls.md)) |
|
||||
| `stall_timeout_s` | seconds a test command may print nothing while using under a tenth of one CPU before its process group is killed and the check is `incomplete` (`PREGATE_STALLED`); default 300, `0` disables; `--stall-timeout` overrides; the `--remote` gate is exempt (see [supervision](#supervision)) |
|
||||
| `timeout_s` | seconds each runner process may take (the unit-file group, each serial file, each guard without its own `timeout_s`, and the remote gate's deadline) when `--timeout` is not passed; 1 to 3600, default 600. `gstack-ship-preflight` forwards its own `--timeout`; without it, and in the `finish` fallback, this is how a repo with long lanes sets theirs |
|
||||
| `timeout_s` | seconds each runner process may take (the unit-file group, each serial file, each guard without its own `timeout_s`, and the remote gate's deadline) when `--timeout` is not passed; 1 to 3600, default 600. `gstack-ship-preflight` forwards its own `--timeout`; without it, and in the `finish` fallback, this is how a repo with long lanes sets theirs. The whole pregate under `gstack-ship-preflight` has a separate budget, `--step-timeout <s>` (1 to 86400, default 3600): a pregate stopped there prints `PREGATE: time limit hit` and a STOP naming the way out, push and let CI's full run at the tree carry the tests ([CI carry](#ci-carry)), or a larger `--step-timeout` |
|
||||
| `remote_gate` | the repo's remote test gate command; under 8 cores the local test tier becomes a `requires-remote` obligation naming it, and `--remote` runs it (see [remote gate](#remote-gate)) |
|
||||
| `run_profiles` | a map from each profile name to `{ workflow, events, jobs, artifact, max_age_hours?, os?, skippable? }`: the GitHub Actions runs `clear --run` verifies as evidence on the identical tree; a profile named after a lane (`free-tests.yml/macos-named-regressions`) clears that lane (see [run evidence](#run-evidence)). `--from-run` and the reuse job verify runs against them too ([from-run](#from-run), [CI reuse](#ci-reuse)) |
|
||||
| `remote_gate_runs` | `{ profiles, inventory, skipped? }`: the run profiles that together clear `pregate.json/remote_gate`, the command that prints the remote gate's test files, one per line, which their runs must cover, and an optional command that prints which selected files the gate itself never runs (see [run evidence](#run-evidence)) |
|
||||
@@ -563,7 +563,11 @@ test_backend` is not `local`, the lanes check runs nothing locally: it records
|
||||
the selected local files as a `requires-remote` obligation with the command to
|
||||
run, `pregate.json/remote_gate` (the declared command) or
|
||||
`test_backend/<backend>` (gstack's `scripts/ubicloud/ubi-runner.sh run --src
|
||||
<repo> -- '<runner> <files>'`). Without either, the tier runs locally under
|
||||
<repo> --setup <file> -- '<runner>'`, where the setup script, kept under
|
||||
`<state root>/projects/<slug>/pregate/remote-files/` and named by its content,
|
||||
writes the selected files to `~/.pregate-files.txt` on the VM and the runner
|
||||
reads them from there; the list never goes on the command line, which reaches
|
||||
the VM as one argument, see [arg-limit](troubleshooting.md#arg-limit)). Without either, the tier runs locally under
|
||||
the supervision above. Close the obligation one of four ways:
|
||||
|
||||
- by default, when the base declares `remote_gate_runs`, let CI clear it: the
|
||||
@@ -1000,7 +1004,7 @@ conclusion. On main the free tier's Windows smoke lane is
|
||||
Two narrower Windows lanes are owed only when a branch selects their own test
|
||||
files: `free-tests.yml/cso-windows-launcher` (cleared by a `free-tests.yml`
|
||||
run) and `windows-setup-e2e.yml/windows-setup` (cleared by a
|
||||
`windows-setup-e2e.yml` run). The six-shard
|
||||
`windows-setup-e2e.yml` run). The eight-shard
|
||||
`windows-free-tests.yml/windows-free-shard` job is `manual`, so it is never an
|
||||
obligation. A branch cut before
|
||||
`windows-smoke.yml` landed still owes `windows-free-tests.yml/windows-free-shard`
|
||||
@@ -1862,7 +1866,7 @@ failure the branch caused carries `cause: "diff"` (`PREGATE_LANE_FAILED`,
|
||||
| Kind | Evidence |
|
||||
|---|---|
|
||||
| `missing-binary` | exit 127, `command not found`, a spawn `ENOENT`, a runner tool `not on PATH` (dart, flutter, cargo, a package manager, `python3`, or `pytest` when python3 cannot import it), Playwright's browsers not installed |
|
||||
| `arg-limit` | `E2BIG`, `Argument list too long`: a command line or environment over the system's limit. gstack splits a lane's file list to stay under it, so this is a gstack bug to report |
|
||||
| `arg-limit` | `E2BIG`, `Argument list too long`: a command line or environment over the system's limit. gstack splits a lane's file list to stay under it, so this is a gstack bug to report ([troubleshooting](troubleshooting.md#arg-limit)) |
|
||||
| `network` | `ENOTFOUND`, `ECONNREFUSED`, `ECONNRESET`, `ETIMEDOUT`, `EAI_AGAIN`, `Could not resolve host`, `fetch failed`, a TLS handshake or certificate failure |
|
||||
| `quota` | `quota`, `429 Too Many Requests`, `rate limit`, `insufficient_quota` (a vCPU quota on the remote backend) |
|
||||
| `disk` | `ENOSPC`, `No space left on device`, `EDQUOT` |
|
||||
|
||||
@@ -4360,6 +4360,25 @@ or on the comment line directly above it. The marker waives only that line, and
|
||||
the check lists it as `waived:`. Don't use `warn: ["literals"]` for this, since
|
||||
that turns the check off for every constant.
|
||||
|
||||
<a id="arg-limit"></a>
|
||||
### `PREGATE_ENVIRONMENT` with `environment: arg-limit — E2BIG` (or `Argument list too long`)
|
||||
|
||||
**Meaning.** A command gstack started had a command line or environment over
|
||||
the system's limit, so it never ran and no test was counted. Linux caps one
|
||||
argument at 128 KiB and a whole command line plus environment at about 2 MiB,
|
||||
macOS caps the total at 1 MiB, and Windows caps a command line at 32,767
|
||||
characters. The usual trigger is a long file list: thousands of selected test
|
||||
files put into one argument.
|
||||
|
||||
**Fix.** gstack keeps file lists out of single arguments: a local lane splits
|
||||
its files into runner processes of about 96 KB each (24 KB on Windows), and
|
||||
the `test_backend` command for the remote gate passes them in a setup script
|
||||
(docs/pregate.md#remote-gate). So this cause is a gstack bug: report it with
|
||||
the `environment:` line and the lane or command it names. Until it is fixed,
|
||||
run the lane remotely (push and let CI's full run carry it, or
|
||||
`gstack-pregate --remote`), or select fewer files. When the environment, not
|
||||
the file list, is what's large, unset the big variables before the run.
|
||||
|
||||
<a id="pregate-no-lane"></a>
|
||||
### `PREGATE_NO_LANE`
|
||||
|
||||
|
||||
Reference in new issue
Block a user