ci: Skip merge queue if pull request is up-to-date#38966
Conversation
Builds ready [0de5d08]
UI Startup Metrics (1354 ± 135 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| skip-merge-queue: ${{ steps.check-skip-merge-queue.outputs.up-to-date }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 |
There was a problem hiding this comment.
Bug: Non-existent GitHub Action version will fail workflow
The check-skip-merge-queue job uses actions/checkout@v6, but this version does not exist. The latest stable version is v4, which is consistently used everywhere else in this repository (50+ occurrences). When the workflow runs during a merge_group event, it will fail with an "Unable to resolve action" error because v6 cannot be found. This would completely break the merge queue functionality this PR is trying to implement.
There was a problem hiding this comment.
This version definitely exists, but I can change it to v4 if preferred.
HowardBraham
left a comment
There was a problem hiding this comment.
Do you have an example of this working on a forked repo or something?
|
|
||
| build-ts-migration-dashboard: | ||
| name: Build ts migration dashboard | ||
| if: github.event_name != 'merge_group' || needs.check-skip-merge-queue.outputs.skip-merge-queue != 'true' |
There was a problem hiding this comment.
I think it might be okay to always skip build-ts-migration-dashboard in the Merge Queue (this will also affect some downstream jobs)
There was a problem hiding this comment.
It's required by all-jobs-completed so skipping it would always cause that job to be skipped as well.
There was a problem hiding this comment.
Hmm, we probably don't need to it to be in all-jobs-completed, but I guess we can make that change in another PR.
@HowardBraham I implemented this originally in |
Builds ready [2c3b45f]
UI Startup Metrics (1252 ± 102 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@Mrtenz The problem with your implementation of the action I ran a simulation of this workflow in this repo and I think it's working... but... someone with admin powers will have to change the
|
@HowardBraham Good point, didn't think about this. We can probably at least reduce it to checkout the main branch and pull request branch, but I can look into if there's other alternatives using the GitHub API.
These should be skipped, which, as far as I know, satisfies this requirement. Will get back to this after the break! |
|
@Mrtenz any progress on this? |
@HowardBraham There's a PR open on Will release |
|
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. |
Builds ready [918a457]
UI Startup Metrics (1251 ± 109 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
HowardBraham
left a comment
There was a problem hiding this comment.
This looks good after the change to github-tools
I put the DO-NOT-MERGE label on this because I want to actually try it out. After it gets two approvals, I will wait for a slow period, update it, and then see if it indeed skips the Merge Queue.
Builds ready [efd8f65]
UI Startup Metrics (1263 ± 97 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@Gudahtt this didn't work, it gets stuck in the Merge Queue like this:
I think we're going to have to eliminate a bunch of jobs from "Required," unless you have some other solution |
|
We did that because at the time, only required status checks would show up on the merge queue page. GitHub improved the UI since then though, they all show up now. We can remove these extraneous required statuses. At least most of them. I'll take a look. |
|
The The others were redundant alongside |
Builds ready [979c651]
UI Startup Metrics (1295 ± 127 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@Mrtenz @Gudahtt it worked! It took only 25 seconds to get through the Merge Queue, here's the run: https://github.com/MetaMask/metamask-extension/actions/runs/21011806082 |


Description
This adds a new action which determines whether a pull request in the merge queue is up-to-date, meaning:
main.In this case, all status checks have already passed on the branch, and running in the merge queue would be redundant, meaning we can skip the merge queue checks.
Changelog
CHANGELOG entry:
Related issues
Fixes: MetaMask/MetaMask-planning#5447
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds conditional execution to the main workflow to bypass merge queue runs when the PR is already up-to-date.
check-skip-merge-queuejob (usesMetaMask/github-toolsaction) outputsskip-merge-queueidentify-builds,prep-deps,lint-workflows,build-storybook, andbuild-ts-migration-dashboardwithif: github.event_name != 'merge_group' || skip-merge-queue != 'true'all-jobs-passto treat skipped merge queue as success and wiresneeds/env accordinglyneeds: check-skip-merge-queuewhere required and usesactions/checkout@v6for the new jobWritten by Cursor Bugbot for commit 979c651. This will update automatically on new commits. Configure here.