ci(INFRA-3593): Phase 1 — Namespace cache for Linux CI trial#29716
Merged
Conversation
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.
…g for Phase 1 Linux CI trial Add nscloud-cache-action before dependency installation in 8 Linux CI jobs when runner_provider is 'namespace', and disable actions/setup-node Yarn caching on the Namespace path to avoid duplicate network-backed cache traffic. Jobs with both nscloud-cache-action and conditional cache: yarn: dedupe, git-safe-dependencies, scripts, js-bundle-size-check, unit-tests, merge-unit-and-component-view-tests, component-view-tests Jobs with nscloud-cache-action only (no cache: yarn to modify): sonar-cloud Jobs with actions/cache for node_modules (component-view-tests, merge-unit-and-component-view-tests) are gated to skip on Namespace since nscloud-cache-action already covers node_modules. Phase 1 of INFRA-3593 / parent epic INFRA-3511. Co-authored-by: Cursor <cursoragent@cursor.com>
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. |
…scloud cache paths nscloud-cache-action mounts each path as a directory, so listing .yarn/install-state.gz as a path creates a directory mount where Yarn expects a file, causing EISDIR errors on yarn install. Replace .yarn/cache and .yarn/install-state.gz with .yarn in all 8 nscloud-cache-action steps. This only affects the Namespace path (guarded by inputs.runner_provider == 'namespace'); the GitHub-hosted runner path with actions/cache is unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
…tted files Mounting .yarn as a cache volume hides committed subdirectories (.yarn/releases/, .yarn/patches/, .yarn/plugins/) that are checked into git, causing "Cannot find module yarn-4.10.3.cjs" errors. Use .yarn/cache (runtime-generated package tarballs) instead. The install-state.gz file is not cached on Namespace — Yarn regenerates it during install with negligible overhead. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve conflict in ci.yml: main removed the all-jobs-pass job and refactored check-all-jobs-pass (PR #29619). Keep main's refactored structure and apply the runner_provider ternary to the new check-all-jobs-pass runs-on. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ 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 aeaba63. Configure here.
…ng on Namespace The expression `inputs.runner_provider == 'namespace' && '' || 'yarn'` always evaluates to 'yarn' because empty string is falsy in GitHub Actions expressions: true && '' produces '', then '' || 'yarn' falls through to 'yarn'. Invert to `inputs.runner_provider != 'namespace' && 'yarn' || ''` so the cache is correctly disabled when runner_provider is namespace. Co-authored-by: Cursor <cursoragent@cursor.com>
…vent OOM Namespace metamask-ci-linux profile (8x16, 16GB RAM) lacks swap space unlike GitHub-hosted ubuntu-latest runners. NODE_OPTIONS with max_old_space_size=20480 (20GB) causes OOM kills (SIGKILL) on Jest workers. Conditionally lower to 12288 (12GB) when runner_provider is namespace. The current path retains 20480 unchanged. Affects: unit-tests (10 shards), component-view-tests (2 shards). Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found All E2E tests pre-selected. |
|
jvbriones
approved these changes
May 5, 2026
7 tasks
tommasini
reviewed
May 7, 2026
tommasini
reviewed
May 7, 2026
tommasini
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
INFRA-3593 Phase 1 — adds Namespace Cache Volumes integration to the Linux CI jobs on the
namespace-runner-trialbranch.When
runner_provider: namespaceis dispatched, the 8 Linux CI jobs that install dependencies now:nscloud-cache-actioncovering~/.cache/yarn,.metamask,node_modules,.yarn/cache, and.yarn/install-state.gzactions/setup-nodeYarn caching (set to empty string) to avoid duplicate network-backed cache trafficactions/cachefornode_modulesincomponent-view-testsandmerge-unit-and-component-view-tests(Namespace cache already covers it)When
runner_provider: current(the default on every existing trigger), all ternaries collapse to their prior values and behavior is byte-identical to the base branch.No job is renamed. No default is changed. This is an additive, opt-in change activated only via manual
workflow_dispatchwithrunner_provider: namespace.Changelog
CHANGELOG entry: null
Related issues
Fixes: INFRA-3593 (parent epic INFRA-3511)
Refs: INFRA-3592 (Phase 0, PR #29557)
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A — CI infrastructure PR, no UI surface.
Pre-merge author checklist
Performance checks (if applicable)
N/A — workflow YAML only, no app code.
Pre-merge reviewer checklist
Made with Cursor
Note
Medium Risk
Touches many GitHub Actions workflows to optionally switch runner labels and caching behavior, which could break CI execution or cause cache-related flakiness when enabled. Default behavior remains unchanged unless
runner_provider=namespaceis explicitly selected.Overview
Introduces a
runner_providerinput (withworkflow_dispatchchoices where relevant) to route jobs between existing runners and newnamespace-profile-*runner labels acrossci.yml, reusable build workflows, and E2E smoke/regression workflows.When
runner_provider=namespace, Linux CI jobs that install dependencies mount Namespace cache volumes vianamespacelabs/nscloud-cache-action, disableactions/setup-nodeYarn caching, and skipactions/cache-basednode_modulesrestores in coverage-merge/component-view jobs; Node memory limits are also reduced on Namespace runners.Updates
actionlintconfiguration to allow the new Namespace runner profile labels.Reviewed by Cursor Bugbot for commit 3a52111. Bugbot is set up for automated code reviews on this repo. Configure here.