Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/slices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"profiles": {
"pr-draft": {
"base_slices": ["quality"],
"control_slices": ["quality", "runner-contract"],
"control_slices": ["quality", "runner-contract", "static-abi"],
"all_rows": false,
"budgets": {
"linux_max_parallel": 7,
Expand Down
39 changes: 39 additions & 0 deletions scripts/tests/test_plan_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,45 @@ def test_control_plane_changes_fail_open_to_the_profile_rows(self) -> None:
plan["reasons"]["runner-contract"],
)

def test_control_plane_changes_select_static_abi_for_its_matrix_gated_consumers(
self,
) -> None:
# static_abi is the only lane job gated on required_slices while its
# consumers (rust_tests, kotlin_sdk_input) are gated on the matrices
# force_all_rows populates. If either matrix comes back non-empty,
# static-abi must be selected too, or the consumer can never run.
cases = (
("pr-draft", "pull_request", "runtime.json"),
("pr-ready", "pull_request", "runtime.json"),
("main", "push", "main.json"),
("manual-full", "workflow_dispatch", "main.json"),
)
for profile, event_name, fixture_name in cases:
with self.subTest(profile=profile):
payload = fixture(fixture_name)
payload.update(
{
"profile": profile,
"event_name": event_name,
"changed_files": [".github/workflows/pr_linux.yml"],
"affected_crates": [],
}
)

plan = PLANNER.build_plan(payload, root=ROOT)

kotlin_planned = "kotlin" in {
row["id"] for row in plan["matrices"]["sdk"]
}
rust_tests_planned = bool(plan["matrices"]["rust_tests"])
# This fixture always plans kotlin via force_all_rows, so
# assert the concrete case directly rather than relying on
# readers to trace that through -- the conditional below
# keeps the invariant general for any future payload.
self.assertIn("static-abi", plan["required_slices"])
if kotlin_planned or rust_tests_planned:
self.assertIn("static-abi", plan["required_slices"])
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

def test_macos_consumer_rows_reject_multiple_architectures(self) -> None:
slices = json.loads((ROOT / "ci" / "slices.yml").read_text())
extra = copy.deepcopy(
Expand Down
Loading