Commit 967d357
ci(INFRA-3593): Phase 1 — Namespace cache for Linux CI trial (MetaMask#29716)
## **Description**
INFRA-3593 Phase 1 — adds Namespace Cache Volumes integration to the
Linux CI jobs on the `namespace-runner-trial` branch.
When `runner_provider: namespace` is dispatched, the 8 Linux CI jobs
that install dependencies now:
1. Mount a Namespace Cache Volume via `nscloud-cache-action` covering
`~/.cache/yarn`, `.metamask`, `node_modules`, `.yarn/cache`, and
`.yarn/install-state.gz`
2. Skip `actions/setup-node` Yarn caching (set to empty string) to avoid
duplicate network-backed cache traffic
3. Skip `actions/cache` for `node_modules` in `component-view-tests` and
`merge-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_dispatch` with
`runner_provider: namespace`.
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: INFRA-3593 (parent epic INFRA-3511)
Refs: INFRA-3592 (Phase 0, PR MetaMask#29557)
## **Manual testing steps**
```gherkin
Feature: Namespace Cache Volumes on Linux CI
Scenario: dispatch with namespace provider — cache volumes active
Given the branch phase1-namespace-linux-cache
When user runs `gh workflow run ci.yml --ref phase1-namespace-linux-cache -f runner_provider=namespace`
Then all 8 Linux CI jobs with dependencies use nscloud-cache-action
And actions/setup-node Yarn caching is disabled (no duplicate cache traffic)
And all jobs pass across every matrix shard (unit-tests x10, component-view-tests x2, scripts x6)
Scenario: dispatch with current provider — byte-identical to base
Given the branch phase1-namespace-linux-cache
When user runs `gh workflow run ci.yml --ref phase1-namespace-linux-cache -f runner_provider=current`
Then nscloud-cache-action steps are skipped (if condition is false)
And actions/setup-node uses cache: yarn as before
And actions/cache for node_modules runs as before
And all jobs pass on GitHub-hosted runners
Scenario: implicit current via PR/push trigger
Given a push or pull_request event (no workflow_dispatch)
Then inputs.runner_provider is undefined/empty
And all ternaries collapse to existing behavior
```
## **Screenshots/Recordings**
### **Before**
N/A
### **After**
N/A — CI infrastructure PR, no UI surface.
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
#### 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.
Made with [Cursor](https://cursor.com)
<!-- CURSOR_SUMMARY -->
---
> [!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=namespace` is explicitly selected.
>
> **Overview**
> Introduces a `runner_provider` input (with `workflow_dispatch` choices
where relevant) to route jobs between existing runners and new
`namespace-profile-*` runner labels across `ci.yml`, reusable build
workflows, and E2E smoke/regression workflows.
>
> When `runner_provider=namespace`, Linux CI jobs that install
dependencies mount Namespace cache volumes via
`namespacelabs/nscloud-cache-action`, disable `actions/setup-node` Yarn
caching, and skip `actions/cache`-based `node_modules` restores in
coverage-merge/component-view jobs; Node memory limits are also reduced
on Namespace runners.
>
> Updates `actionlint` configuration to allow the new Namespace runner
profile labels.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
3a52111. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Jose Luque <jose.luque@consensys.net>
Co-authored-by: José Manuel <6741785+jluque0101@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 99e4557 commit 967d357
1 file changed
Lines changed: 85 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
100 | | - | |
| 109 | + | |
101 | 110 | | |
102 | 111 | | |
103 | 112 | | |
| |||
130 | 139 | | |
131 | 140 | | |
132 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
133 | 151 | | |
134 | 152 | | |
135 | 153 | | |
136 | | - | |
| 154 | + | |
137 | 155 | | |
138 | 156 | | |
139 | 157 | | |
| |||
170 | 188 | | |
171 | 189 | | |
172 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
173 | 200 | | |
174 | 201 | | |
175 | 202 | | |
176 | | - | |
| 203 | + | |
177 | 204 | | |
178 | 205 | | |
179 | 206 | | |
| |||
205 | 232 | | |
206 | 233 | | |
207 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
208 | 244 | | |
209 | 245 | | |
210 | 246 | | |
211 | | - | |
| 247 | + | |
212 | 248 | | |
213 | 249 | | |
214 | 250 | | |
| |||
469 | 505 | | |
470 | 506 | | |
471 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
472 | 517 | | |
473 | 518 | | |
474 | 519 | | |
475 | | - | |
| 520 | + | |
476 | 521 | | |
477 | 522 | | |
478 | 523 | | |
| |||
488 | 533 | | |
489 | 534 | | |
490 | 535 | | |
491 | | - | |
| 536 | + | |
492 | 537 | | |
493 | 538 | | |
494 | 539 | | |
| |||
520 | 565 | | |
521 | 566 | | |
522 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
523 | 577 | | |
| 578 | + | |
524 | 579 | | |
525 | 580 | | |
526 | 581 | | |
| |||
531 | 586 | | |
532 | 587 | | |
533 | 588 | | |
534 | | - | |
| 589 | + | |
535 | 590 | | |
536 | | - | |
| 591 | + | |
537 | 592 | | |
538 | 593 | | |
539 | 594 | | |
| |||
641 | 696 | | |
642 | 697 | | |
643 | 698 | | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
644 | 708 | | |
| 709 | + | |
645 | 710 | | |
646 | 711 | | |
647 | 712 | | |
| |||
652 | 717 | | |
653 | 718 | | |
654 | 719 | | |
655 | | - | |
| 720 | + | |
656 | 721 | | |
657 | | - | |
| 722 | + | |
658 | 723 | | |
659 | 724 | | |
660 | 725 | | |
| |||
671 | 736 | | |
672 | 737 | | |
673 | 738 | | |
674 | | - | |
| 739 | + | |
675 | 740 | | |
676 | 741 | | |
677 | 742 | | |
| |||
860 | 925 | | |
861 | 926 | | |
862 | 927 | | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
863 | 937 | | |
864 | 938 | | |
865 | 939 | | |
| |||
0 commit comments