Skip to content

Commit 8008f70

Browse files
authored
feat: deprioritize E2E jobs on Cirrus runners (#29837)
## **Description** When Cirrus runner capacity is saturated, release/production build jobs compete equally with E2E builds, test runs, and fixture updates for runner slots. This means a time-sensitive release build can be queued behind dozens of E2E jobs triggered by PR pushes. Cirrus Runners supports a binary priority system (regular and `low-priority`). This PR adds `low-priority` to all E2E/non-release Cirrus runner jobs so release pipeline jobs are serviced first during capacity saturation. When capacity is available, all jobs start immediately with no change in behavior. **Jobs deprioritized (E2E, non-release):** - `build-android-e2e.yml` - E2E Android APK build - `build-ios-e2e.yml` - E2E iOS app build - `run-e2e-workflow.yml` - E2E test execution (both platforms) - `update-e2e-fixtures.yml` - Fixture export/update **Jobs kept at regular priority (release pipeline):** - `build.yml` - Production/release native build - `setup-node-modules.yml` - Dependency setup for production builds - `upload-to-testflight.yml` - TestFlight upload The `actionlint.yaml` config already includes `low-priority` as a known self-hosted runner label (line 17). **Note:** A similar but narrower change was attempted in #19091 (Sep 2025, iOS E2E only, 1 file) and reverted in #19379 (12 days later, no documented reason). This PR covers both platforms and all 4 E2E workflow files. Part of MCWP-574 (PR 5 of 5). ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: MCWP-574 ## **Manual testing steps** ```gherkin Feature: Cirrus runner job priority for release pipeline Scenario: E2E jobs run normally when capacity is available Given Cirrus runner capacity is not saturated When an E2E workflow is triggered (build or test) Then the job starts immediately with no delay And the job completes successfully Scenario: Release jobs are prioritized during capacity saturation Given Cirrus runner capacity is near saturation with E2E jobs When a release/production build is triggered via build.yml Then the release build job is allocated a runner before queued E2E jobs And E2E jobs resume after runners free up ``` ## **Screenshots/Recordings** N/A - CI pipeline change, no UI impact. ## **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 - [ ] 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. ## **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.
1 parent a9008e3 commit 8008f70

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/build-android-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ on:
3434
jobs:
3535
build-android-apks:
3636
name: Build Android E2E APKs
37-
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-android-build' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg' }} # Optimized for lg runner (48GB) with conservative memory settings
37+
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-android-build' || (startsWith(github.base_ref, 'release/') && fromJSON('["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg"]') || fromJSON('["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg", "low-priority"]')) }} # Optimized for lg runner (48GB) with conservative memory settings
3838
timeout-minutes: 40
3939
env:
4040
GRADLE_USER_HOME: ${{ inputs.runner_provider == 'namespace' && '/home/runner/_work/.gradle' || '/home/admin/_work/.gradle' }}

.github/workflows/build-ios-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ permissions:
3030
jobs:
3131
build-ios-apps:
3232
name: Build iOS E2E Apps
33-
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-ios-build' || 'ghcr.io/cirruslabs/macos-runner:tahoe-xl' }}
33+
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-ios-build' || (startsWith(github.base_ref, 'release/') && fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe-xl"]') || fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe-xl", "low-priority"]')) }}
3434
outputs:
3535
artifacts-url: ${{ steps.set-artifacts-url.outputs.artifacts-url }}
3636
app-uploaded: ${{ steps.upload-app.outcome == 'success' }}

.github/workflows/run-e2e-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ on:
6363
jobs:
6464
test-e2e-mobile:
6565
name: ${{ inputs.test-suite-name }}
66-
runs-on: ${{ inputs.runner_provider == 'namespace' && (inputs.platform == 'ios' && 'namespace-profile-metamask-ios-e2e' || 'namespace-profile-metamask-android-build') || (inputs.platform == 'ios' && 'ghcr.io/cirruslabs/macos-runner:tahoe' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg') }}
66+
runs-on: ${{ inputs.runner_provider == 'namespace' && (inputs.platform == 'ios' && 'namespace-profile-metamask-ios-e2e' || 'namespace-profile-metamask-android-build') || (startsWith(github.base_ref, 'release/') && fromJSON(format('["{0}"]', inputs.platform == 'ios' && 'ghcr.io/cirruslabs/macos-runner:tahoe' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg')) || fromJSON(format('["{0}", "low-priority"]', inputs.platform == 'ios' && 'ghcr.io/cirruslabs/macos-runner:tahoe' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg'))) }}
6767
outputs:
6868
apk-target-path: ${{ steps.determine-target-paths.outputs.apk-target-path }}
6969
test-apk-target-path: ${{ steps.determine-target-paths.outputs.test-apk-target-path }}

.github/workflows/update-e2e-fixtures.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
update-fixtures:
181181
name: Export & update fixtures
182182
needs: [prepare]
183-
runs-on: ghcr.io/cirruslabs/macos-runner:tahoe
183+
runs-on: ${{ startsWith(github.base_ref, 'release/') && fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe"]') || fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe", "low-priority"]') }}
184184
timeout-minutes: 30
185185

186186
env:

0 commit comments

Comments
 (0)