mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-05 17:28:21 +00:00
fix(ci): replay the mesh state of the row that failed
failed_selections reproduced mode, onion state, distro and architecture
but not the mesh axis. These tokens feed the priority line, where an
unpinned axis offers both states, so a failed direct swarm row came back
as itself and as a meshed sibling: two jobs to reproduce one.
Only a mode the axis covers takes the pin. pinned_vpn_states returns an
empty list for a compose row pinned to the mesh, and an empty list drops
the row from the matrix -- the class ff75343aba already had to fix once
for held runs.
The fixture had drifted from what the matrix emits: row_label built
titles with no mesh glyph while axes.assign writes one for every swarm
and compose row, so parse_label fell back to its False default and the
new &direct assertion would have been right by accident. row_label and
deploy_job_name now place the glyph under the same condition as
axes.assign, and a meshed row has a case of its own, which nothing
covered before.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
cfe20f0726
commit
4915a401d4
3 files changed
+37
-8
No files matched your search
@@ -15,9 +15,9 @@ from tests.utils.ci.run_name import render
|
||||
from utils.github.variant.pools import ARCHITECTURES, DISTROS, FILESYSTEMS
|
||||
|
||||
|
||||
def _job(mode: str, app: str, conclusion: str) -> dict:
|
||||
def _job(mode: str, app: str, conclusion: str, *, vpn: bool = False) -> dict:
|
||||
return {
|
||||
"name": deploy_job_name(mode, app, "0,1"),
|
||||
"name": deploy_job_name(mode, app, "0,1", vpn=vpn),
|
||||
"status": "completed",
|
||||
"conclusion": conclusion,
|
||||
}
|
||||
@@ -46,10 +46,12 @@ the effective one, while the architecture is the machine the job really ran
|
||||
on."""
|
||||
|
||||
_FAILED_TOKENS = (
|
||||
f"web-app-x#0,1@swarm+clearnet{_AXES} web-app-y#0,1@compose+clearnet{_AXES}"
|
||||
f"web-app-x#0,1@swarm+clearnet{_AXES}&direct"
|
||||
f" web-app-y#0,1@compose+clearnet{_AXES}"
|
||||
)
|
||||
"""What _JOBS failed at, exactly: x in swarm, y in compose, both on variant
|
||||
shard 0,1, both on the clearnet and both on the same distro."""
|
||||
shard 0,1, both on the clearnet and both on the same distro. Only the swarm
|
||||
row states its mesh state, because the mesh axis covers no other mode."""
|
||||
|
||||
_RUN_URL = "https://github.com/o/r/actions/runs/55" # nocheck: url
|
||||
_SOURCE_CONFIG = {
|
||||
@@ -156,7 +158,15 @@ class TestTriggerMain(unittest.TestCase):
|
||||
_rc, calls = self._run(["--failed"], run={"_jobs": both})
|
||||
self.assertEqual(
|
||||
calls[0][3],
|
||||
f"web-app-x#0,1@compose+clearnet{_AXES} web-app-x#0,1@swarm+clearnet{_AXES}",
|
||||
f"web-app-x#0,1@compose+clearnet{_AXES}"
|
||||
f" web-app-x#0,1@swarm+clearnet{_AXES}&direct",
|
||||
)
|
||||
|
||||
def test_a_meshed_swarm_row_comes_back_meshed(self) -> None:
|
||||
meshed = [_job("swarm", "web-app-x", "failure", vpn=True)]
|
||||
_rc, calls = self._run(["--failed"], run={"_jobs": meshed})
|
||||
self.assertEqual(
|
||||
calls[0][3], f"web-app-x#0,1@swarm+clearnet{_AXES}&vpn"
|
||||
)
|
||||
|
||||
def test_never_deployed_priority_roles_join_the_retrigger(self) -> None:
|
||||
|
||||
Reference in new issue
Block a user