Skip to content

Add merge_group trigger on tests and deployment#10275

Merged
Siedlerchr merged 2 commits into
mainfrom
add-merge-queue
Sep 2, 2023
Merged

Add merge_group trigger on tests and deployment#10275
Siedlerchr merged 2 commits into
mainfrom
add-merge-queue

Conversation

@koppor

@koppor koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member

In DevCalls (or gatherings), we often say: "Just let the tests pass, then merge". For this scenario, the merge queues of GitHub have been invented. Docs available at https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#triggering-merge-group-checks-with-github-actions.

To put this live:

  • Change branch protection rules to include "Require merge queue "
  • Select "Merge method": squash
  • Select "Build concurrency": 1 (should be enough for our needs - not sure what that means and how it affects builds not having the latest main)
  • Ensure "Only merge non-failing pull requests" is "yes"
  • Adjust "Merge limits" (maybe: min 1: max: 3)

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@github-actions

github-actions Bot commented Sep 2, 2023

Copy link
Copy Markdown
Contributor

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

@Siedlerchr Siedlerchr merged commit 2bc65f9 into main Sep 2, 2023
@Siedlerchr Siedlerchr deleted the add-merge-queue branch September 2, 2023 08:20
@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

I go with these settings:

grafik

Collecting more than 1 PR, but the merge queue should kick-off after 5 minutes if no more PRs are coming in. This should leave us enough discusion time, but also quick enough to keep things moving.

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

Merge queue takes the branch protection rules serious:

grafik

We like the merge queue feature.

We like that new commits dismiss old reviews.

We like two have two reviewers on a PR.

To make use of the merge queue feature, we change the formal number of required reviewers to 1, but "enforce" the two-reviewer-rule manually.

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

Checking after change to 1 required reviewer:

grafik

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

Link to merge queue: https://github.com/JabRef/jabref/queue/main

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

Screenshot merge queue:

grafik

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

Due to the cancelling of currenet builds, we needed to adapt the settings.

Please vote up https://github.com/orgs/community/discussions/63136

grafik

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

We discussed whether we should remove the cancelling of previous jobs. However, we weigh the cancelling of previous runs higher then having a "fast" merge queue.

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

Queue with 2 PRs (and concurrency limit 1)

grafik

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

How a merge looks like:

grafik

Commit:

grafik

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

There is no indication whether a PR is selected to put into the queue. Only if the pre-conditions are fulfilled and GitHub put the PR into the merge queue, there is a different icon. The yellow-marked PR below is set to be put into the merge queue. The other PR below is not in the merge queue.

grafik

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

Drawback: If a PR was taken out of the merge queue, there is no notification.

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

We have timeout issues:

grafik

Therefore we increased the timeout from 60 to the maximum of 360 minutes

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

The merge queue seems to have issues with status reporting sometimes:

grafik

@koppor

koppor commented Sep 2, 2023

Copy link
Copy Markdown
Member Author

It hang because of an error in the YAML file:

grafik

@koppor

koppor commented Sep 3, 2023

Copy link
Copy Markdown
Member Author

Interestingly, there is no cancelling of merge builds when new commits are added. These are just ignored:

grafik

@koppor

koppor commented Sep 3, 2023

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants