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/signing_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class (glaeda SIGNING_JOBS): every capacity unit and both fast tokens, so no
sys.path.insert(0, str(Path(__file__).resolve().parent))
import nightly_sign_runner as blacksmith_picker # noqa: E402
import pr_runner_pool as pool # noqa: E402
from nightly_build_runner import owned_label # noqa: E402

ENABLED_VALUE = "1"

Expand All @@ -66,7 +67,9 @@ def drained_runner(runners: Sequence[Mapping[str, Any]], labels: Sequence[str],
its labels, is busy or offline now. `seed` (the run ID) picks among the qualifying minis, so two signing jobs
picking at once tend to land on different minis.
"""
wanted = [label for label in labels if label and pool.persistent(label)]
# The owned labels nightly_build_runner offers: a persistent pool or glaeda's nightly slot, which
# vars.CI_NIGHTLY_NEXT_BUILD_RUNNER may name (its hook still admits a signing job only as the exclusive class).
wanted = [label for label in labels if label and owned_label(label)]
if not wanted:
return "", f"no owned pool label among {list(labels) or 'none'}"
busy: set[str] = set()
Expand Down
4 changes: 4 additions & 0 deletions tests/test_ci_signing_owned_mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ def test_drained_runner_takes_only_a_mini_running_nothing(self) -> None:
self.assertEqual(signing_runner.drained_runner(runners, [SIDE]), (
"", f"no mini with an idle `{SIDE}` runner is drained now"))
self.assertEqual(signing_runner.drained_runner(runners, ["blacksmith-6vcpu-macos-26"])[0], "")
slot = "glaeda-nightly-std-xcode-26.6" # glaeda's nightly slot, which CI_NIGHTLY_NEXT_BUILD_RUNNER may name
labels, why = signing_runner.drained_runner(
[runner("cmux20-glaeda-nightly", [slot, "glaeda-runner-cmux20-glaeda-nightly"])], [slot])
self.assertEqual(json.loads(labels), [slot, "glaeda-runner-cmux20-glaeda-nightly"], why)
self.assertEqual(signing_runner.member("cmux13-glaeda-nightly-next"), "cmux13")
self.assertEqual(signing_runner.member("blacksmith-runner"), "")

Expand Down
Loading