Commit ead9094
ci(INFRA-3629): Phase 5c Namespace artifact adoption (#30169)
## **Description**
**Paired artifact steps:** `runner_provider=namespace` → SHA-pinned
`namespace-actions/upload-artifact` /
`namespace-actions/download-artifact`. Otherwise →
`actions/upload-artifact@v4` / `actions/download-artifact@v4`. No
dynamic `uses:`; only `if:`-gated pairs.
**Behavior added**
- **Coverage / Sonar:** Shards, merge outputs, and `lcov.info` use the
same backend as the runner.
- **iOS JS bundle:** Upload and downstream consumer use the same
backend.
- **E2E (`run-e2e-workflow.yml`):** JUnit, screenshots, and prior-run
junit re-fetch use the paired backend on Namespace.
- **Fixture validation:** Report job downloads junit with the same
backend the producer used.
- **Native E2E builds:** APK / androidTest and `.app` / sourcemap
uploads align with same-run “download all” in `run-e2e-workflow.yml` (no
mixed backend in one run).
- **Smoke / regression:** Pattern shard downloads and rollup + JSON
report uploads are paired on Namespace vs current. Regression rollups
use explicit **`retention-days: 7`** on both backends (matches smoke;
Namespace default without that is 30 days).
**Caveats**
- Cross-run APK/app reuse via `run-id` still uses GitHub’s API where
used. **`find-reusable-build` is off on Namespace (Android + iOS)**
until that path is validated for Namespace artifacts.
- Org allowlist: TechOps asked to allow the two
**`namespace-actions/*`** pins (distinct from **`namespacelabs/*`**).
**Acceptance evidence (still to attach before closing INFRA-3629)**
Implements pairing + pins only; ticket “done” still needs linked proof
(Namespace `ci` dispatch where Namespace steps actually run, allowlist,
INFRA-3597 pointer if applicable, native E2E Namespace handoff,
timing/stability if required, rollback note on ticket).
- Namespace manual dispatch:
[25843127496](https://github.com/MetaMask/metamask-mobile/actions/runs/25843127496)
(`runner_provider=namespace` — see run for status).
- Recent **completed** `ci` on `phase5c/namespace-artifact-adoption`:
| Kind | Run | Outcome |
|------|-----|---------|
| `workflow_dispatch` (Namespace runners) |
[25839065840](https://github.com/MetaMask/metamask-mobile/actions/runs/25839065840)
| failure |
| `pull_request` (GitHub-hosted jobs) |
[25839502117](https://github.com/MetaMask/metamask-mobile/actions/runs/25839502117)
| success |
| `pull_request` |
[25839064157](https://github.com/MetaMask/metamask-mobile/actions/runs/25839064157)
| cancelled |
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Related to
[INFRA-3629](https://consensyssoftware.atlassian.net/browse/INFRA-3629)
— **partial implementation** until acceptance evidence is on the ticket
(this PR does not claim full closure).
## **Manual testing steps**
```gherkin
Feature: Namespace CI artifact parity
Scenario: Manual CI trial on Namespace runners
Given branch phase5c/namespace-artifact-adoption is pushed and a draft PR is open
When a maintainer runs workflow "ci" via workflow_dispatch with runner_provider=namespace
Then jobs that upload or download artifacts should use namespace-actions upload/download on Namespace runners
And jobs on non-Namespace providers should use actions/upload-artifact and actions/download-artifact v4
Scenario: Optional comparison run
Given the same ref and PR context
When the same workflow is dispatched with runner_provider=current
Then artifact steps should select GitHub artifact actions
And no job should rely on Namespace-only storage for artifacts produced by the other provider in the same logical handoff
```
## **Screenshots/Recordings**
N/A — workflow and runner configuration only; validate via Actions run
logs and the Artifacts tab on the workflow run.
### **Before**
N/A
### **After**
N/A
## **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)
- [ ] I've tested on Android
- Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example
## **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.
[INFRA-3629]:
https://consensyssoftware.atlassian.net/browse/INFRA-3629?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes CI artifact upload/download paths across builds, coverage, and
E2E workflows; misconfiguration could break artifact handoffs and make
tests/coverage flaky or unavailable on one runner provider.
>
> **Overview**
> Standardizes artifact handling when `runner_provider=namespace` by
**pairing** `namespace-actions/upload-artifact` +
`namespace-actions/download-artifact` (SHA-pinned) with the existing
`actions/*-artifact@v4` steps for non-Namespace runs, preventing mixed
backends within a single workflow run.
>
> This updates Android/iOS E2E build workflows to upload APKs, test
APKs, `.app` bundles, and iOS sourcemaps via the matching backend and
adjusts job outputs/status logging accordingly; it also disables
cross-run reusable-build lookup on Namespace for iOS.
>
> The main `ci.yml` workflow now uploads/downloads artifacts (iOS JS
bundle, coverage shards/merged outputs, and fixture-validation JUnit)
via the provider-matched backend, tweaks Namespace Jest parallelism
(`--maxWorkers=33%`), and updates smoke/regression report workflows plus
`run-e2e-workflow.yml` to download prior-run results and upload
JUnit/screenshots using the same backend (with consistent
`retention-days: 7`).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
4680278. 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: Cursor <cursoragent@cursor.com>
Co-authored-by: Ale Som <560018+alucardzom@users.noreply.github.com>1 parent c99e886 commit ead9094
8 files changed
Lines changed: 331 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
456 | 466 | | |
| 467 | + | |
457 | 468 | | |
458 | 469 | | |
459 | 470 | | |
460 | 471 | | |
461 | 472 | | |
462 | 473 | | |
463 | 474 | | |
464 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
465 | 486 | | |
| 487 | + | |
466 | 488 | | |
467 | 489 | | |
468 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
388 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
389 | 401 | | |
| 402 | + | |
390 | 403 | | |
391 | 404 | | |
392 | 405 | | |
| |||
399 | 412 | | |
400 | 413 | | |
401 | 414 | | |
402 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
403 | 427 | | |
| 428 | + | |
404 | 429 | | |
405 | 430 | | |
406 | 431 | | |
| |||
418 | 443 | | |
419 | 444 | | |
420 | 445 | | |
421 | | - | |
422 | | - | |
| 446 | + | |
| 447 | + | |
423 | 448 | | |
424 | 449 | | |
425 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
493 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
494 | 502 | | |
495 | 503 | | |
496 | 504 | | |
| |||
508 | 516 | | |
509 | 517 | | |
510 | 518 | | |
511 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
512 | 527 | | |
513 | 528 | | |
514 | 529 | | |
| |||
597 | 612 | | |
598 | 613 | | |
599 | 614 | | |
600 | | - | |
601 | | - | |
| 615 | + | |
| 616 | + | |
602 | 617 | | |
603 | 618 | | |
604 | 619 | | |
| |||
608 | 623 | | |
609 | 624 | | |
610 | 625 | | |
611 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
612 | 637 | | |
613 | 638 | | |
614 | 639 | | |
| |||
667 | 692 | | |
668 | 693 | | |
669 | 694 | | |
670 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
671 | 704 | | |
672 | 705 | | |
673 | 706 | | |
| |||
705 | 738 | | |
706 | 739 | | |
707 | 740 | | |
708 | | - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
709 | 752 | | |
710 | 753 | | |
711 | 754 | | |
712 | 755 | | |
713 | 756 | | |
714 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
715 | 760 | | |
716 | 761 | | |
717 | 762 | | |
718 | 763 | | |
719 | 764 | | |
720 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
721 | 784 | | |
722 | 785 | | |
723 | 786 | | |
724 | 787 | | |
725 | 788 | | |
726 | 789 | | |
727 | 790 | | |
728 | | - | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
729 | 802 | | |
730 | 803 | | |
731 | 804 | | |
732 | 805 | | |
733 | 806 | | |
734 | | - | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
735 | 818 | | |
736 | 819 | | |
737 | 820 | | |
738 | 821 | | |
739 | 822 | | |
740 | 823 | | |
741 | 824 | | |
742 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
743 | 836 | | |
744 | 837 | | |
745 | 838 | | |
| |||
817 | 910 | | |
818 | 911 | | |
819 | 912 | | |
820 | | - | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
821 | 924 | | |
822 | 925 | | |
823 | 926 | | |
| |||
990 | 1093 | | |
991 | 1094 | | |
992 | 1095 | | |
993 | | - | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
994 | 1105 | | |
995 | 1106 | | |
996 | 1107 | | |
| |||
1033 | 1144 | | |
1034 | 1145 | | |
1035 | 1146 | | |
1036 | | - | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
1037 | 1156 | | |
1038 | 1157 | | |
1039 | 1158 | | |
| |||
0 commit comments