MGS3029: saved plan refused
magus run --stdin runs the shards of a plan that magus affected <target> --plan
printed, piped in or redirected from a file. The plan decides the target and the
projects, so anything that would make the run cover a different set from the one the
plan describes is refused before a target starts, and the invocation exits 2, the
misuse status.
[MGS3029] --shard 9: the plan has no such shard (it has 0, 1, 2)
see: https://eli.gladman.cc/magus/reference/codes/sandbox/MGS3029/
It fires for:
- A malformed plan. Stdin is a terminal, empty or not JSON, or the plan has no
target(one printed by a magus older than the key), repeats a shard id, has a shard with no projects, or states acountthat disagrees with itsmatrix. - A shard the plan does not have.
--shardnames a shard id from the plan'smatrix. An inherited plan has no shards at all, so every--shardis refused. - A different target.
magus run test --stdin < plan.jsonagainst a plan forci. The target positional is optional with--stdin; give it only to add charms, as inci:gha. - A different shard count.
--n-shardsis implied by the plan. A value that disagrees means the caller and the plan describe different matrices.
Each would otherwise run less than the plan, or something other than the plan, and still exit 0.
Resolution
- Regenerate the plan with the magus that will run it: `magus affected
--plan plan.json`.
- Pick a shard id from the plan's
matrix.magus run --stdin --dry-run < plan.jsonprints each shard's command without running it. - Drop
--n-shards, or the target positional, and let the plan supply them.
See also
- magus affected: computing the plan.
- magus run:
--stdin,--shardand--n-shards. - GitHub Actions: publishing a plan as a job matrix.