fix(ci): stop a held mesh axis deleting priority rows

The pin narrowed the cross product after the axis was resolved, so a row
pinned against an enforced or disabled run lost every combination and left
the matrix entirely -- while a regular row with the same pin was simply moved
onto the held side. A priority row now takes the same precedence a regular
row already took: the run's axis first, the pin second.
This commit is contained in:
evangelostsak committed 2026-10-02 00:54:20 +02:00
1 parent dc14e8a3a8
commit ff75343aba
3 files changed
+48 -3

No files matched your search

@@ -376,6 +376,32 @@ class TestPinnedAxes(unittest.TestCase):
)
self.assertEqual(len(self._entries(row)), 1)
def test_a_held_mesh_axis_overrides_a_priority_rows_pin(self) -> None:
"""A run that holds the axis must not delete the rows that fight it.
The pin narrows a cross product, so a conflicting one removes every
combination and the row leaves the matrix entirely -- while a regular
row with the same pin is simply moved onto the held side.
"""
row = _row(
"web-app-b", 0, ("swarm",), priority=True, pin_mode="swarm", pin_vpn=False
)
entries = _assign(
[row],
sweep=0,
tor_mode="auto",
variants_per_app=_VARIANTS,
vpn_mode="enforced",
)
self.assertNotEqual(entries, [])
self.assertEqual({e["vpn"] for e in entries}, {"true"})
def test_a_priority_rows_pin_still_narrows_a_rotating_axis(self) -> None:
row = _row(
"web-app-b", 0, ("swarm",), priority=True, pin_mode="swarm", pin_vpn=False
)
self.assertEqual({e["vpn"] for e in self._entries(row)}, {"false"})
def test_an_unoffered_mode_aborts_the_matrix(self) -> None:
row = _row("web-app-b", 0, ("compose",), pin_mode="swarm")
with self.assertRaises(SystemExit):