From 8cae0db6f91f66bf363572253f2024739c0c239a Mon Sep 17 00:00:00 2001 From: Leo Li Date: Wed, 28 Oct 2026 16:23:03 -0700 Subject: [PATCH] ci(signing): the owned signing pick accepts glaeda's nightly slot label, as the nightly build picker does Co-Authored-By: Claude Opus 5.5 Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3 --- scripts/ci/signing_runner.py | 5 ++++- tests/test_ci_signing_owned_mac.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/ci/signing_runner.py b/scripts/ci/signing_runner.py index e4c8ea0bc510..45b0da5fddc9 100755 --- a/scripts/ci/signing_runner.py +++ b/scripts/ci/signing_runner.py @@ -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" @@ -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() diff --git a/tests/test_ci_signing_owned_mac.py b/tests/test_ci_signing_owned_mac.py index 0f3ffcb17666..7644a95809b2 100644 --- a/tests/test_ci_signing_owned_mac.py +++ b/tests/test_ci_signing_owned_mac.py @@ -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"), "")