-
Notifications
You must be signed in to change notification settings - Fork 564
Prepare for merge queues #3437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for merge queues #3437
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit doesn't enable merge queues, but prepares for enabling merge queues. We'll still have to configure it in the branch protection as explained here.
As I understand it, we also need to start making more jobs required for it to have any meaningful effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we'll also need to trigger the hold
workflow on merge_group
events, since this job is required.
68b2257
to
15c6944
Compare
Good point. Done.
Yeah, and for that to happen we need to ensure we always "run" all unit test and functional jobs and simply make them no-ops if they don't apply. |
3403e4c
to
b1f9e44
Compare
Or not. I've reworked this PR to take learnings from that one. |
ff190bf
to
f3280dd
Compare
Add merge_group as an event. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
f3280dd
to
da72999
Compare
To allow us to retrieve the list of changed files in the PR and compare them against a whitelist. This filtering only happens for non-scheduled jobs. For scheduled jobs, we should always run. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
c747b95
to
19f97e3
Compare
Inspired by [1]. [1] https://brunoscheufler.com/blog/2022-04-24-required-github-actions-jobs-in-a-monorepo Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
19f97e3
to
23eae2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's give it a try
Failed to backport PR to |
We'd like to enable merge queues so that we can ensure all jobs are run on a PR prior to merging that PR. To do this, we need to mark most of our jobs as required. However, we are currently only running those jobs on changes to specific files e.g.:
However, this causes jobs to never run rather than be "skipped". If the job is required for e.g. a merge queue, then the PR will never merge because it will wait forever for the job result.
This PR adds a local plugin to allow us to filter on files and skip steps when none of the affected files are checked. This only happens on pull requests, since during scheduled jobs we expect all jobs to run. Once this merges, we can mark all but the ironic and octavia master jobs as required.