mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-29 22:37:29 +00:00
feat(ci): let a retrigger override chunk_gate, with i8ciallon as the non-stop i8ciall
A retrigger copies every dispatch input from its source run, chunk_gate
included, so a sweep that stopped at its first red chunk came back stopping
there again, and nothing short of a manual dispatch could ask the chain to
deploy every chunk and report all of it at once.
`infinito administration deploy ci trigger --chunk-gate {true,false}` now
overrides the carried value after the source run's configuration is read; it
is the one deliberate departure from "reproduce the source run exactly", and
the module docstring says so. Omitted, the carried value or the workflow
default applies as before.
`i8ciallon` is `i8ciall` with `--chunk-gate false`: force-cancel the run, put
everything without a verdict back on the priority line, and keep deploying
past a failed chunk. The alias lint caps a name at two adjacent consonants,
which is why it is not `i8ciallnonstop`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
113113e553
commit
1a4ee72249
4 files changed
+51
-2
No files matched your search
@@ -265,6 +265,36 @@ class TestTriggerMain(unittest.TestCase):
|
||||
self.assertEqual(rc, 0)
|
||||
self.assertEqual(calls[0], ("web-app-a", "", _SOURCE_CONFIG))
|
||||
|
||||
def test_chunk_gate_override_replaces_the_carried_value(self) -> None:
|
||||
calls: list = []
|
||||
with (
|
||||
mock.patch.object(gh, "current_branch", return_value="feature/x"),
|
||||
mock.patch.object(gh, "resolve_repo", return_value="o/r"),
|
||||
mock.patch.object(gh, "fetch_run", return_value=_SOURCE_RUN),
|
||||
mock.patch.object(matrix, "entries_of", return_value=[]),
|
||||
mock.patch.object(
|
||||
runs,
|
||||
"dispatch_workflow",
|
||||
side_effect=lambda wf, ref, wl="", priority="", config=None, repo=None: (
|
||||
calls.append(config)
|
||||
),
|
||||
),
|
||||
redirect_stdout(io.StringIO()),
|
||||
):
|
||||
rc = trigger.main(["--failed", "--run", _RUN_URL, "--chunk-gate", "true"])
|
||||
self.assertEqual(rc, 0)
|
||||
self.assertEqual(calls[0], {**_SOURCE_CONFIG, "chunk_gate": "true"})
|
||||
|
||||
def test_chunk_gate_override_without_a_source_run(self) -> None:
|
||||
rc, calls = self._run(["--chunk-gate", "false"])
|
||||
self.assertEqual(rc, 0)
|
||||
self.assertEqual(calls[0][4], {"chunk_gate": "false"})
|
||||
|
||||
def test_chunk_gate_rejects_other_values(self) -> None:
|
||||
with self.assertRaises(SystemExit) as ctx, redirect_stdout(io.StringIO()):
|
||||
trigger.main(["--chunk-gate", "maybe"])
|
||||
self.assertEqual(ctx.exception.code, 2)
|
||||
|
||||
def test_failed_no_run_found(self) -> None:
|
||||
rc, calls = self._run(["--failed"], run=None)
|
||||
self.assertEqual(rc, 1)
|
||||
|
||||
Reference in new issue
Block a user