Skip to content

Support GitHub merge queues when RTD PR builds are required to merge #10021

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

Open
gipert opened this issue Feb 14, 2023 · 13 comments
Open

Support GitHub merge queues when RTD PR builds are required to merge #10021

gipert opened this issue Feb 14, 2023 · 13 comments
Labels
Feature New feature Needed: design decision A core team decision is required

Comments

@gipert
Copy link

gipert commented Feb 14, 2023

Details

I tried to enable GitHub's merge queue on a project that enables reporting PR builds on GitHub and sets it as a required status check before merging.

Expected Result

The PR is automatically merged after all checks have passed.

Actual Result

GitHub waits for ReadTheDocs to report the PR status check, which is never reported. The PR stays in the queue and is never merged.

Related?

I had to add on: merge_group: [ref] to my GHA workflow file to fix a similar problem with the other required status checks run with GitHub Actions.

Front logo Front conversations

@humitos humitos added Feature New feature Needed: design decision A core team decision is required labels Feb 14, 2023
@webknjaz
Copy link
Contributor

@humitos I was just about to file a similar report. This is a blocker for projects wanting to use RTD with Merge Queues enabled.

I want to add that GitHub issues a push event in addition to merge_group, but RTD doesn't seem to react to it either.

This is what a deadlock this causes looks like:
Screenshot_2023-10-26-19-21-01-12_40deb401b9ffe8e1df2f1cc5ba480b12

@jeff-m-sullivan
Copy link

Having the same issue. pre-commit.ci is the only other third part CI service I'm currently using, and it worked without any configuration changes.

@humitos
Copy link
Member

humitos commented Feb 3, 2025

@stsewd have you used merge queues? I'm not sure how it works internally, maybe we need to listen to a different event to re-run the build?

I want to add that GitHub issues a push event in addition to merge_group

@webknjaz do you a link to the docs where this is explained?

@stsewd
Copy link
Member

stsewd commented Feb 3, 2025

@stsewd have you used merge queues? I'm not sure how it works internally, maybe we need to listen to a different event to re-run the build?

Haven't used them. But I think the problem is that we report the commit status only on open PRs. Merge queues create a separate branch, but it doesn't create a PR. Should be fixed once we implement #11739.

@webknjaz
Copy link
Contributor

webknjaz commented Feb 3, 2025

@humitos I think the note in this section 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 is a more accurate reference. It's kinda obvious that since it makes temporary branches, that action by itself triggers a push event just like any other branch creations. It's important to understand that those are ephemeral and are deleted quite soon, once the related PRs are kicked from the queue for various reasons (could be a failure of a check required in branch protection or success of all required checks meaning that the target branch could be fast-forwarded to that commit; could also be a user triggered termination).

@stsewd aren't there also statuses for branches? FWIW, the problem to solve here is the slug to be used in deployment URLs for such ephemeral builds. They won't follow the PR schema because they may correspond to multiple PRs merged-in at the same time, with the target branch not yet fast-forwarded to that state.

@webknjaz
Copy link
Contributor

webknjaz commented Feb 3, 2025

Note that the “two events” thing can cause double builds if you don't deduplicate them. Here's what I tend to do in GHA to run on merge_queue, but not push: https://github.com/ansible/awx-plugins/blob/0d569b5/.github/workflows/ci-cd.yml#L10.

@webknjaz
Copy link
Contributor

webknjaz commented Feb 3, 2025

Should be fixed once we implement #11739.

Yes, it sounds like this would fix the problem.

@stsewd
Copy link
Member

stsewd commented Feb 3, 2025

@stsewd aren't there also statuses for branches?

No, we just report statuses for commits from open PRs.

FWIW, the problem to solve here is the slug to be used in deployment URLs for such ephemeral builds.

Haven't looked, but if they are normal branches, RTD should just create a new build (users may need to create a rule to activate and build those branches automatically on RTD).

@webknjaz
Copy link
Contributor

webknjaz commented Feb 3, 2025

Haven't looked, but if they are normal branches, RTD should just create a new build

Yes, they are regular Git branches having more than one slash in their names.

@rashidnhm
Copy link

Hello, wondering if there is any updates on this, or if there is a way to help with the development of this feature. We wanted to use merge queues but require RTD builds on PRs.

One solution was to ensure the build on RTD passes before adding a PR to the queue. However, this isn't ideal as it's not clear if a previous merge to main branch could have cause RTD build failures.

@stsewd
Copy link
Member

stsewd commented Mar 4, 2025

Hi @rashidnhm, no updates so far. We may work on this once we have migrated our GH OAuth app to a GitHub App (#11942).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

6 participants