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
5 changes: 4 additions & 1 deletion scripts/ci/queue_janitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2052,7 +2052,10 @@ def orphan_protected_reason(run: Mapping[str, Any]) -> str | None:
return f"{event} event"
if TAG_LIKE_REF.match(branch):
return f"tag-like ref {branch}"
if ORPHAN_PROTECTED_WORKFLOW.search(" ".join(str(run.get(key) or "") for key in ("name", "path"))):
# Match the workflow path only, as RESERVED_POOL_WORKFLOW does: ci.yml's
# run name carries `release=arm64`, which kept an orphaned main dispatch
# holding CI's concurrency group (and every later main run pending).
if ORPHAN_PROTECTED_WORKFLOW.search(str(run.get("path") or "")):
return "release/publish workflow"
return None

Expand Down
6 changes: 6 additions & 0 deletions tests/test_ci_queue_janitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,12 @@ def test_main_schedule_nightly_and_testflight_orphans_are_cancelled(self):
path=".github/workflows/ios-appstore-upload.yml"),
dict(event="push", branch="main", name="Nightly macOS build", path=".github/workflows/nightly.yml"),
dict(event="issue_comment", branch="main", name="Claude Code", path=".github/workflows/claude.yml"),
# ci.yml's run-name carries routing metadata such as release=arm64.
# Run 40039647633 held main's CI concurrency group for two days
# because that word made the orphan pass read it as a release.
dict(event="workflow_dispatch", branch="main",
name="v1;sha=b42fd54913fa92017bc08195148f70755fb93288;ref=main;cache=r2;release=arm64;coverage=full",
path=".github/workflows/ci.yml"),
):
with self.subTest(**kwargs):
decisions = orphan_plan(self.orphans(1, **kwargs))
Expand Down
Loading