valkey icon indicating copy to clipboard operation
valkey copied to clipboard

Implemented a merge queue for PRs

Open Nikhil-Manglore opened this issue 2 months ago • 5 comments

This pull requests adds GitHub merge queue functionality to automate testing and merging of pull requests. After a pull request meets the requirements that we set in GitHub settings, it will be added to the merge queue. We can also select the setting that allows us to manually add the PR to the queue. We can choose the number of PRs that we want in the queue at a time (batch size). All these PRs that are currently in the queue will then be added to the unstable branch and tested against all the daily tests. If they pass, all the PRs in the queue will be merged into unstable. This is a useful feature to see which commits can impact the daily tests. If the tests fail against the batch then the merge queue will split up each individual commit and test it against the daily tests to find out which commit is causing the failure.

Check here for more information on merge queues: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request-with-a-merge-queue

Settings that need to be enabled

  1. Enable Merge Queue in Settings (Settings -> Branches -> Branch Protection Rules -> Click on Add Rule)
  2. Scroll down and check require merge queue and input the desired settings under this section.
  3. You can also edit the require status checks to pass before merging section in settings.

I set it to run all the daily tests except the valgrind and macOS tests.

Example Runs in my own test org: https://github.com/Merge-Queue-Test-For-Valkey/merge-queue-test/actions/runs/19626527240/job/56196367079

Note: #2702 also modifies the daily.yml file. Assuming that PR is merged first I will go back and rebase this PR since we both add workflow calls.

Resolves #2086

Nikhil-Manglore avatar Nov 07 '25 21:11 Nikhil-Manglore

Also we currently run all the daily tests which I think is inefficient. We should decided which subset of the daily tests we want to run in the merge queue and I can update the PR.

@Nikhil-Manglore Ideally the non flaky ones 😀. Do we continue running daily on unstable with this setup ?

hpatro avatar Nov 07 '25 21:11 hpatro

Also we currently run all the daily tests which I think is inefficient. We should decided which subset of the daily tests we want to run in the merge queue and I can update the PR.

@Nikhil-Manglore Ideally the non flaky ones 😀. Do we continue running daily on unstable with this setup ?

Yes the daily will still be run on it's normal schedule in unstable. The merge queue will use the daily tests before PRs are merged into unstable. Marking this PR for draft right now because I want to run a few more tests on my personal test github org.

Nikhil-Manglore avatar Nov 07 '25 21:11 Nikhil-Manglore

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 72.45%. Comparing base (7e0b3bb) to head (4cc20f5). :warning: Report is 53 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #2820      +/-   ##
============================================
- Coverage     72.58%   72.45%   -0.14%     
============================================
  Files           128      128              
  Lines         71326    70415     -911     
============================================
- Hits          51772    51017     -755     
+ Misses        19554    19398     -156     

see 105 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 07 '25 21:11 codecov[bot]

FYI This also adds the same workflow call in daily as this PR:https://github.com/valkey-io/valkey/pull/2702

roshkhatri avatar Nov 18 '25 02:11 roshkhatri

Pull Request is ready for review now. I will fix formatting errors soon

Nikhil-Manglore avatar Nov 24 '25 07:11 Nikhil-Manglore