mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-11 21:26:44 +00:00
feat(ci): name the deploy chunks as numbered batches and star the priority ones
The chunk jobs read `🧱 Chunk N` and every priority row carried its own trailing ⭐, so a priority sweep repeated the star down the whole job list while the chunk that held those rows looked like any other. - The four chunk jobs are named `0️⃣ Batch` to `3️⃣ Batch`, with ` ⭐` when the batch holds priority rows, and their discover job reads `🔍 Batch N ⭐` through the existing `marker` input. - call-validation counts those batches once per run (scripts/github/resolve/priority_batches.sh, which runs `cli.meta.ci.matrix --priority-chunks`) and exposes the count as the `starred` output. chunks.plan cuts the priority chunks from the priority rows alone, so offset and the regular line cannot move them; the orchestrator hands validation the same sweep and chunk size it hands the chunk jobs. - The row label drops its own star. report_failures and the job-name parsers still accept a starred title from an older run. - The glossary names the unit `batch` (`#️⃣`) instead of `chunk` (`📦`), `ci plan` prints the batch column as the keycap the job name leads with, and the name lint accepts a leading keycap emoji. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
260ebf7357
commit
621a492ec3
20 files changed
+400
-80
No files matched your search
@@ -10,7 +10,7 @@ from utils.roles.mapping import (
|
||||
ROLE_FILE_META_NETWORKS,
|
||||
ROLE_FILE_META_SERVICES,
|
||||
)
|
||||
from utils.symbol_glossary import to_emoji
|
||||
from utils.symbol_glossary import keycap, to_emoji
|
||||
|
||||
_REACTIVE = "{{ 'svc-net-tor' in group_names }}"
|
||||
|
||||
@@ -418,12 +418,12 @@ class TestAssign(unittest.TestCase):
|
||||
for state in _ALL:
|
||||
self.assertNotIn(to_emoji(state), entry["label"])
|
||||
|
||||
def test_a_priority_row_wears_the_star(self) -> None:
|
||||
def test_a_priority_row_leaves_the_star_to_its_batch(self) -> None:
|
||||
rows = [_row("web-app-b", 0, ("compose",), priority=True)]
|
||||
entry = _assign(
|
||||
rows, sweep=0, network_input="auto", variants_per_app=_VARIANTS
|
||||
)[0]
|
||||
self.assertTrue(entry["label"].endswith(to_emoji("priority")))
|
||||
self.assertNotIn(to_emoji("priority"), entry["label"])
|
||||
self.assertEqual(entry["priority"], "true")
|
||||
|
||||
def test_a_named_input_keeps_only_the_rows_that_can_take_it(self) -> None:
|
||||
@@ -875,9 +875,13 @@ class TestParseLabel(unittest.TestCase):
|
||||
title = self._title("host", "web-app-a", "0")
|
||||
self.assertEqual(axes.parse_label(title).network, "clearnet")
|
||||
|
||||
def test_the_priority_star_does_not_bleed_into_the_name(self) -> None:
|
||||
def test_the_trailing_star_of_an_older_title_stays_out_of_the_name(
|
||||
self,
|
||||
) -> None:
|
||||
title = self._title("compose", "web-app-a", "0", priority=True)
|
||||
label = axes.parse_label(title)
|
||||
label = axes.parse_label(f"{title} {to_emoji('priority')}")
|
||||
self.assertEqual(label.mode, "compose")
|
||||
self.assertEqual(label.variant, "0")
|
||||
self.assertEqual(display_names().decode(label.name), "web-app-a")
|
||||
|
||||
def test_a_reusable_workflow_prefix_is_tolerated(self) -> None:
|
||||
@@ -886,6 +890,15 @@ class TestParseLabel(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual(axes.parse_label(title).mode, "swarm")
|
||||
|
||||
def test_a_starred_batch_in_the_caller_path_is_tolerated(self) -> None:
|
||||
title = f"🎶 Orchestrate CI / {keycap(0)} Batch {to_emoji('priority')} / "
|
||||
label = axes.parse_label(
|
||||
title + self._title("swarm", "web-app-a", "0", priority=True)
|
||||
)
|
||||
self.assertEqual(label.mode, "swarm")
|
||||
self.assertEqual(label.variant, "0")
|
||||
self.assertEqual(display_names().decode(label.name), "web-app-a")
|
||||
|
||||
def test_the_distro_and_filesystem_survive_the_round_trip(self) -> None:
|
||||
entry = _assign(
|
||||
[_row("web-app-a", 0, ("swarm",))],
|
||||
|
||||
Reference in new issue
Block a user