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
36 changes: 18 additions & 18 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6244,20 +6244,20 @@ jobs:
# failing verdict, or mode `invalid`. A recovered build was judged when it was continued.
if: "always() && !cancelled() && needs.decide.result == 'success' && needs.decide.outputs.should_build == 'true' && needs.decide.outputs.fast_build != 'true' && needs.decide.outputs.build_only != 'true' && (github.event_name != 'schedule' || github.event.schedule == '47 8 * * *') && needs.resolve-nightly-cmux-tui-client.outputs.already_published != 'true' && needs.decide.outputs.no_publish != 'true' && (((needs.build-sign-notarize-nightly.result == 'success' || needs.signer-dmg.result == 'success') && needs.build-sign-notarize-nightly.outputs.notary_pending != 'true' && (needs.signer-dmg.result == 'success' || needs.verify-signed-nightly.result == 'success') && needs.verify-final-dmg-nightly.result == 'success' && needs.visual-gate-nightly-verdict.outputs.blocks != 'true' && needs.route-visual-gate-nightly.outputs.mode != 'invalid') || (needs.recover-nightly-next-notarization.outputs.accepted == 'true' && needs.verify-recovered-nightly-next.result == 'success'))"
# The release App key remains scoped to this protected environment.
runs-on: ${{ needs.pick-nightly-sign-runner.outputs.attempt == github.run_attempt && needs.pick-nightly-sign-runner.outputs.sign_owned_pool || vars.LINUX_RUNNER == 'blacksmith-16vcpu-ubuntu-2404' && 'blacksmith-16vcpu-ubuntu-2404' || 'blacksmith-32vcpu-ubuntu-2404' }}
runs-on: &pub-runner ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || needs.pick-nightly-sign-runner.outputs.attempt == github.run_attempt && needs.pick-nightly-sign-runner.outputs.sign_owned_pool || vars.LINUX_RUNNER == 'blacksmith-16vcpu-ubuntu-2404' && 'blacksmith-16vcpu-ubuntu-2404' || 'blacksmith-32vcpu-ubuntu-2404' }}
timeout-minutes: 120
env:
NIGHTLY_LEGACY_VARIANT: ${{ needs.decide.outputs.legacy_variant }}
# The appcasts this track publishes (decide): one on nightly-next, four on main.
NIGHTLY_FEEDS: ${{ needs.decide.outputs.feeds }}
NIGHTLY_FEEDS: &pub-feeds ${{ needs.decide.outputs.feeds }}
NIGHTLY_TRACK: ${{ needs.decide.outputs.track }}
CHANNEL: ${{ needs.decide.outputs.channel }}
CHANNEL: &pub-channel ${{ needs.decide.outputs.channel }}
TRACK: ${{ needs.decide.outputs.track }}
CHANNEL_DMG_PREFIX: ${{ needs.decide.outputs.dmg_prefix }}
CHANNEL_RELEASE_TAG: ${{ needs.decide.outputs.release_tag }}
CHANNEL_DMG_PREFIX: &pub-dmg ${{ needs.decide.outputs.dmg_prefix }}
CHANNEL_RELEASE_TAG: &pub-tag ${{ needs.decide.outputs.release_tag }}
CHANNEL_FEED_BASE: ${{ needs.decide.outputs.feed_base }}
# Publication tooling from this workflow's own commit (see the step below).
PUBLISH_TOOLING: ${{ github.workspace }}/.publish-tooling/scripts
PUBLISH_TOOLING: &pub-tooling ${{ github.workspace }}/.publish-tooling/scripts
steps:
- name: Select the build to publish
id: source
Expand Down Expand Up @@ -6766,19 +6766,19 @@ jobs:
environment: ${{ needs.decide.outputs.environment }}
permissions:
contents: write
runs-on: ${{ needs.pick-nightly-sign-runner.outputs.attempt == github.run_attempt && needs.pick-nightly-sign-runner.outputs.sign_owned_pool || vars.LINUX_RUNNER == 'blacksmith-16vcpu-ubuntu-2404' && 'blacksmith-16vcpu-ubuntu-2404' || 'blacksmith-32vcpu-ubuntu-2404' }}
runs-on: *pub-runner
timeout-minutes: 150
outputs:
release_id: ${{ steps.publish_assets.outputs.release_id }}
asset_names: ${{ steps.publish_assets.outputs.asset_names }}
newest: ${{ steps.order.outputs.newest }}
env:
NIGHTLY_FEEDS: ${{ needs.decide.outputs.feeds }}
CHANNEL: ${{ needs.decide.outputs.channel }}
CHANNEL_DMG_PREFIX: ${{ needs.decide.outputs.dmg_prefix }}
CHANNEL_RELEASE_TAG: ${{ needs.decide.outputs.release_tag }}
NIGHTLY_FEEDS: *pub-feeds
CHANNEL: *pub-channel
CHANNEL_DMG_PREFIX: *pub-dmg
CHANNEL_RELEASE_TAG: *pub-tag
NIGHTLY_BUILD: ${{ needs.publish-nightly.outputs.build }}
PUBLISH_TOOLING: ${{ github.workspace }}/.publish-tooling/scripts
PUBLISH_TOOLING: *pub-tooling
steps:
- name: Checkout publish ref
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -6892,15 +6892,15 @@ jobs:
cancel-in-progress: false
permissions:
contents: write
runs-on: ${{ needs.pick-nightly-sign-runner.outputs.attempt == github.run_attempt && needs.pick-nightly-sign-runner.outputs.sign_owned_pool || vars.LINUX_RUNNER == 'blacksmith-16vcpu-ubuntu-2404' && 'blacksmith-16vcpu-ubuntu-2404' || 'blacksmith-32vcpu-ubuntu-2404' }}
runs-on: *pub-runner
timeout-minutes: 90
env:
NIGHTLY_FEEDS: ${{ needs.decide.outputs.feeds }}
CHANNEL: ${{ needs.decide.outputs.channel }}
CHANNEL_DMG_PREFIX: ${{ needs.decide.outputs.dmg_prefix }}
CHANNEL_RELEASE_TAG: ${{ needs.decide.outputs.release_tag }}
NIGHTLY_FEEDS: *pub-feeds
CHANNEL: *pub-channel
CHANNEL_DMG_PREFIX: *pub-dmg
CHANNEL_RELEASE_TAG: *pub-tag
NIGHTLY_BUILD: ${{ needs.publish-nightly.outputs.build }}
PUBLISH_TOOLING: ${{ github.workspace }}/.publish-tooling/scripts
PUBLISH_TOOLING: *pub-tooling
steps:
- *checkout-publication-tooling-a

Expand Down
36 changes: 35 additions & 1 deletion tests/test_nightly_trusted_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def test_credentialed_publish_controls_use_owned_claim_then_linux_overflow(self)
}
self.assertEqual(evaluate(parse_expression(source), fallback), "blacksmith-16vcpu-ubuntu-2404")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This test never exercises the owned-pool route despite its name and comment. Add a non-empty sign_owned_pool fixture and assert that each publication control selects that pool label.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At tests/test_nightly_trusted_routing.py, line 357:

<comment>This test never exercises the owned-pool route despite its name and comment. Add a non-empty `sign_owned_pool` fixture and assert that each publication control selects that pool label.</comment>

<file context>
@@ -327,6 +327,77 @@ def test_signer_jobs_use_the_dedicated_blacksmith_linux_picker(self):
+                    "needs.pick-nightly-sign-runner.outputs.sign_owned_pool": "",
+                    "vars.LINUX_RUNNER": "blacksmith-16vcpu-ubuntu-2404",
+                }
+                self.assertEqual(evaluate(parse_expression(source), fallback), "blacksmith-16vcpu-ubuntu-2404")
+                self.assertEqual(evaluate(parse_expression(source), {**fallback, "github.repository_owner": "someone"}),
+                                 "ubuntu-24.04")
</file context>
Suggested change
self.assertEqual(evaluate(parse_expression(source), fallback), "blacksmith-16vcpu-ubuntu-2404")
self.assertEqual(evaluate(parse_expression(source), fallback), "blacksmith-16vcpu-ubuntu-2404")
self.assertEqual(
evaluate(parse_expression(source), {
**fallback,
"needs.pick-nightly-sign-runner.outputs.sign_owned_pool": "glaeda-signing-std",
}),
"glaeda-signing-std",
)

self.assertEqual(evaluate(parse_expression(source), {**fallback, "github.repository_owner": "someone"}),
"blacksmith-16vcpu-ubuntu-2404")
"ubuntu-24.04")
self.assertNotIn("vars.CI_NIGHTLY_NEXT_BUILD_RUNNER", runs_on)
steps = job["steps"]
gate_index = next(i for i, step in enumerate(steps) if step.get("id") == "claim-gate")
Expand All @@ -370,6 +370,40 @@ def test_credentialed_publish_controls_use_owned_claim_then_linux_overflow(self)
needs = job["needs"]
self.assertIn("pick-nightly-sign-runner", needs)

def test_publication_controls_reject_unavailable_dedicated_m4pro(self):
# Publication cannot use the dedicated label: those minis have no
# exclusive-claim capacity. Keep the trusted owned-pool and Linux fallback.
jobs = DOC["jobs"]
dedicated = {
"github.repository_owner": "manaflow-ai",
"github.repository": "manaflow-ai/cmux",
"github.ref": "refs/heads/nightly-next",
"github.event_name": "push",
"github.run_attempt": 1,
"vars.CI_NIGHTLY_ONLY_RUNNER": "glaeda-nightly-only-m4pro",
"vars.LINUX_RUNNER": "blacksmith-16vcpu-ubuntu-2404",
"needs.pick-nightly-sign-runner.outputs.attempt": "1",
"needs.pick-nightly-sign-runner.outputs.sign_owned_pool": "",
}
for name in ("publish-nightly", "publish-nightly-next-github", "publish-nightly-next-github-names"):
source = jobs[name]["runs-on"].removeprefix("${{").removesuffix("}}")
expr = parse_expression(source)
with self.subTest(job=name):
self.assertNotEqual(evaluate(expr, dedicated), "glaeda-nightly-only-m4pro")
self.assertEqual(evaluate(expr, dedicated), "blacksmith-16vcpu-ubuntu-2404")
self.assertNotEqual(evaluate(expr, {**dedicated, "github.repository": "someone/cmux",
"github.repository_owner": "someone"}),
"glaeda-nightly-only-m4pro")
self.assertEqual(evaluate(expr, {**dedicated, "github.repository": "someone/cmux",
"github.repository_owner": "someone"}), "ubuntu-24.04")
for changes in ({"github.run_attempt": 2},
{"github.event_name": "schedule"},
{"github.ref": "refs/heads/main"},
{"vars.CI_NIGHTLY_ONLY_RUNNER": ""}):
with self.subTest(changes=changes):
self.assertNotEqual(evaluate(expr, {**dedicated, **changes}),
"glaeda-nightly-only-m4pro")

def test_every_linux_nightly_job_takes_a_runner_set_member(self):
# Never LINUX_RUNNER as-is: 16 vCPU when it names 16, else 32, whatever it holds
# (empty, the overflow switch's hosted value, an old 4 vCPU value, 16 or 32).
Expand Down