Skip to content

ci: namespace runner trial control plane#29557

Merged
jluque0101 merged 16 commits into
mainfrom
namespace-runner-trial
May 7, 2026
Merged

ci: namespace runner trial control plane#29557
jluque0101 merged 16 commits into
mainfrom
namespace-runner-trial

Conversation

@jluque0101

@jluque0101 jluque0101 commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Description

INFRA-3592 Phase 0 — adds a runner_provider control input (current | namespace, default current) to the Phase 1-4 entry-point and reusable workflows, threads forwarding through every in-scope caller, and wraps each in-scope runs-on: in an additive ternary that selects between the existing runner and the matching namespace-profile-* label.

No job is migrated. No default is changed. With runner_provider: current (the default on every existing trigger) every ternary collapses to its prior literal/expression, so behavior is byte-identical to main. The namespace branch is reachable only via manual workflow_dispatch.

Branch is the long-lived working surface for Phases 1-4; do not merge.

Changelog

CHANGELOG entry: null

Related issues

Fixes: INFRA-3592 (parent epic INFRA-3511)

Manual testing steps

Feature: runner_provider trial control plane

  Scenario: dispatch on the current default — byte-identical
    Given the trial branch namespace-runner-trial
    When user runs `gh workflow run ci.yml --ref namespace-runner-trial -f runner_provider=current`
    Then every job runs on its existing GitHub-hosted / Cirrus runner
    And required-check context names match origin/main exactly

  Scenario: dispatch on namespace — plumbing reaches Namespace
    Given the trial branch and the MetaMask Actions allowlist already updated
    When user runs `gh workflow run ci.yml --ref namespace-runner-trial -f runner_provider=namespace`
    Then jobs are picked up by the namespace-profile-metamask-* runner that maps to each existing class
    And end-to-end success is not required at Phase 0 — composite-action assumptions land in Phase 2-4

Verification evidence (already executed)

Both scenarios above were dispatched against this branch — results recorded:

Scenario Run Result
runner_provider=namespace (Namespace path) 25319648133 Linux, iOS, Android jobs all picked up by the matching namespace-profile-metamask-* runner; secrets resolved end-to-end (secrets: inherit flowing); job names + required-check contexts unchanged
runner_provider=current (existing runners) 25320925061 0 Namespace instances spawned in the dispatch window; every job ran on its prior GitHub-hosted / Cirrus runner
Implicit current via PR-trigger (no input) 25174041735, 25162883313 Both pull_request runs on the branch completed successfully on existing runners — proves the byte-identical contract holds without a manual dispatch

Required-check parity verified statically against the 3 contexts on main's branch protection (check-template-and-add-labels, Check all jobs pass, CLABot) — none renamed in this diff. Detailed cross-reference in INFRA-3592 comment 417866 §5.

Screenshots/Recordings

N/A — CI infrastructure PR, no UI surface.

Notes for reviewers

  • 6 commits, organised so each is independently reviewable: actionlint label registration → workflow_dispatch inputs → workflow_call inputs → caller forwarding → runs-on ternary → placeholder→canonical-label replacement.
  • Phase 7 callers (runway-*, nightly-build, build-and-upload-to-testflight, push-eas-update, build-rc-auto) are intentionally not modified — they continue to call without forwarding, callees default to current.
  • Composite actions are inventoried only — Phase 2/3/4/5/7 own their migration.
  • actionlint -config-file .github/actionlint.yaml produces byte-identical output to origin/main (84 lines, exit 1 from pre-existing warnings only — no new findings introduced by this PR).
  • Inventories captured (composite actions, caller graph, secrets/environments, concurrency groups, required-check contexts) — full tables in INFRA-3592 comment 417866.
  • Branch was rebased onto current main after a conflict with #29431 (e2e label rename). Conflict resolution was mechanical — main's renamed jobs (swap-, stake-, money-) had runner_provider: re-applied; no semantic decision involved.

Pre-merge author checklist

Performance checks (if applicable)

N/A — workflow YAML only, no app code.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Touches many GitHub Actions workflows and runs-on expressions, so miswiring could break CI execution or route jobs to the wrong runner. Default behavior remains current, but the new namespace path changes execution environment when manually dispatched.

Overview
Introduces a new runner_provider input (default current, optional namespace) across in-scope entrypoint and reusable workflows, and forwards it through callers.

Updates runs-on in ci.yml, build.yml, setup-node-modules.yml, and E2E build/test workflows to conditionally select between existing GitHub-hosted/Cirrus runners and new namespace-profile-metamask-* runner labels.

Registers the new namespace-profile-* labels in .github/actionlint.yaml, and adds workflow_dispatch inputs to enable manual trial runs using the namespace provider.

Reviewed by Cursor Bugbot for commit fffcc88. Bugbot is set up for automated code reviews on this repo. Configure here.

@jluque0101 jluque0101 requested review from a team as code owners April 30, 2026 11:28
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbotv2 metamaskbotv2 Bot added the team-dev-ops DevOps team label Apr 30, 2026
Comment thread .github/actionlint.yaml Outdated
Comment thread .github/workflows/ci.yml
@jluque0101 jluque0101 marked this pull request as draft April 30, 2026 15:15
  Add metamask-ci-linux profile label, a placeholder for the canonical
  Namespace Linux label (to be replaced before the trial dispatch with
  runner_provider: namespace), and the common nscloud-ubuntu-* inline
  labels so Phase 2 can pick any of them without a follow-up config edit.

  Phase 0 of INFRA-3592. No workflow references these labels yet.
…-4 entry points

Adds the choice input current|namespace (default current) to the five
Phase 1-4 entry-point workflows. No runs-on or job behavior changes
yet — caller forwarding and runs-on ternary land in a follow-up commit.

Phase 0 of INFRA-3592.
…eusables

Adds the optional string input runner_provider (default current) to the
seven Phase 1-4 reusable workflows. Phase 7 reusables (runway-*, nightly,
testflight, etc.) are intentionally not modified — they continue to call
without forwarding, and the default keeps behavior byte-identical.

Phase 0 of INFRA-3592.
Adds with: runner_provider: ${{ inputs.runner_provider }} at every
in-scope caller site (55 sites across 7 caller workflows). Two iOS
build-ios-e2e.yml call sites had no with: block; a new minimal one
is added for them.

Phase 7 caller sites are intentionally not modified — push-eas-update,
nightly-build, runway-*, build-and-upload-to-testflight, build-rc-auto
continue to call without forwarding, the callee defaults to current,
and behavior is byte-identical.

Behavior is unchanged at this point: no runs-on consumes runner_provider
yet — that lands in I.3b.

Phase 0 of INFRA-3592.
Replaces every runs-on line in the in-scope Phase 1-4 workflows with the
additive ternary:

  runs-on: ${{ inputs.runner_provider == 'namespace' && 'nscloud-PLACEHOLDER-CONFIRM-LABEL' || <existing> }}

Where <existing> is the previous literal label or expression. Three sites
already had a ${{ ... }} platform ternary (build.yml setup-dependencies,
run-e2e-workflow.yml test-e2e-mobile, setup-node-modules.yml setup); for
those the existing expression is preserved verbatim inside the
runner_provider == 'namespace' || branch.

29 sites across 10 workflows. With runner_provider: current (the default
on every existing trigger), each ternary collapses to its prior literal
and behavior is byte-identical. The 'namespace' branch points at the
PLACEHOLDER label by design — replacement happens before any
runner_provider: namespace dispatch (see .phase0/namespace-artifacts.md).

Phase 0 of INFRA-3592.
…abels

Resolves Q1 of INFRA-3592 Phase 0. The four profile labels confirmed
live in the metamask Namespace workspace (format: namespace-profile-<name>):

  - namespace-profile-metamask-ci-linux       (Linux CI — Phase 1)
  - namespace-profile-metamask-android-build  (Android — Phase 3)
  - namespace-profile-metamask-ios-build      (iOS build / xl — Phase 4)
  - namespace-profile-metamask-ios-e2e        (iOS E2E test — Phase 4)

Each runs-on ternary now points at the profile that matches the existing
runner class (ubuntu-latest → ci-linux; macos-latest → ios-build; Cirrus
ubuntu-runner-amd64 → android-build; Cirrus macos-runner:tahoe-xl →
ios-build; Cirrus macos-runner:tahoe → ios-e2e). The three pre-existing
platform-driven dynamic expressions are preserved in both branches of
the ternary so Namespace dispatch follows the same iOS/Android branching
as the current runner choice.

actionlint.yaml drops the speculative nscloud-* and metamask-ci-linux
labels (never used) and registers the four canonical labels above.

Behavior on runner_provider: current is unchanged (every ternary still
collapses to its prior literal/expression).

Phase 0 of INFRA-3592.
@jluque0101 jluque0101 force-pushed the namespace-runner-trial branch from 0188baa to 9046d5c Compare April 30, 2026 15:26
@jluque0101 jluque0101 changed the title Namespace runner trial ci: namespace runner trial control plane (INFRA-3592 Phase 0) May 4, 2026
@jluque0101 jluque0101 changed the title ci: namespace runner trial control plane (INFRA-3592 Phase 0) ci: namespace runner trial control plane May 4, 2026
@jluque0101 jluque0101 marked this pull request as ready for review May 4, 2026 13:25
XxdpavelxX
XxdpavelxX previously approved these changes May 4, 2026
@jluque0101

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 5a68282. Configure here.

Comment thread .github/workflows/run-e2e-workflow.yml
jvbriones
jvbriones previously approved these changes May 4, 2026
@jluque0101 jluque0101 enabled auto-merge May 4, 2026 13:56

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 08caa40. Configure here.

Comment thread .github/workflows/run-e2e-workflow.yml
@jluque0101 jluque0101 dismissed stale reviews from jvbriones and XxdpavelxX via 36ffd4d May 5, 2026 11:22
@github-project-automation github-project-automation Bot moved this to Needs dev review in PR review queue May 6, 2026
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 97%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 12 changed files are purely CI/CD infrastructure changes with zero application code modifications. The PR adds a runner_provider input parameter (defaulting to current) to all GitHub Actions workflows, enabling conditional selection of Namespace runner profiles as an alternative to the existing Cirrus/GitHub-hosted runners. Key points:

  1. No app code changes: No TypeScript, JavaScript, native code, or test code was modified.
  2. Backward-compatible defaults: All new runner_provider inputs default to current, meaning normal PR-triggered runs are completely unaffected and use existing runners.
  3. Pure infrastructure experiment: This is a trial to evaluate Namespace runners (INFRA-3592) as an alternative CI provider — it doesn't change what tests run or how the app behaves.
  4. actionlint.yaml update: Simply registers new Namespace runner labels as known self-hosted runners to prevent linting false positives.

Since no application code, test logic, or user-facing functionality was changed, there is no need to run any E2E test tags. The CI pipeline itself will validate the workflow syntax via the existing check-workflows job.

Performance Test Selection:
No application code, UI components, state management, or performance-sensitive paths were modified. All changes are purely CI/CD workflow infrastructure (runner provider selection). Performance tests are not warranted.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown

@jluque0101 jluque0101 added this pull request to the merge queue May 7, 2026
@github-project-automation github-project-automation Bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue May 7, 2026
Merged via the queue into main with commit e34c66e May 7, 2026
129 of 162 checks passed
@jluque0101 jluque0101 deleted the namespace-runner-trial branch May 7, 2026 11:29
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-M team-dev-ops DevOps team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants