Skip to content
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

CI: Migrate from Bors to GitHub Merge Queue #110

Merged
merged 3 commits into from
Jan 5, 2025
Merged

Conversation

DilumAluthge
Copy link
Member

The free public instance of Bors has been shut down.

# We don't actually want to run integration tests on pull requests,
# because we want to avoid hitting rate limits.
# So, if this is a PR build, mark the integration tests as "skipped".
if: github.event_name != 'pull_request'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand correctly this is a required job and so skipping it is making all PRs unmergeable? That's at least my explanation for this PR waiting for a job which will never run: https://github.com/JuliaLang/BumpStdlibs.jl/queue/master

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand correctly this is a required job and so skipping it is making all PRs unmergeable? That's at least my explanation for this PR waiting for a job which will never run: https://github.com/JuliaLang/BumpStdlibs.jl/queue/master

GitHub has a very weird rule: if a required job is marked as "skipped", then GitHub considers it as having satisfied the requirement.

E.g. on this PR, GitHub says "all checks have passed".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, because you aren't running much. But this job is necessary for merging, in fact this PR was removed from the merge queue in the meantime. I see two options:

  • don't make this job mandatory
  • don't skip it for PRs

Copy link
Member Author

@DilumAluthge DilumAluthge Jan 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this job is necessary for merging, in fact this PR was removed from the merge queue in the meantime. I see two options:

So, the overall workflow (CI) needs to start before GitHub marks this job as skipped. That can't happen until this PR takes the lock. So what happened was just that it took a long time to take the lock, and the merge queue timeout (the separate timeout that lives in the repo settings) was exceeded.

I've increased that timeout.

If we set the merge queue timeout to be really high (which I've just done), and wait, then eventually the PR will be merged, it's just a matter of waiting a very long time.

To clarify again: this PR can absolutely be merged with a status of "skipped" for the integration tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other words, with GitHub Merge Queue, it is very much allowed to both (1) Make a job required, and (1) mark it as "skipped" on PRs. We currently do this exact thing on RegistryCI.jl and CompatHelper.jl.

But yes, because of the global lock, you often have to wait a very long time to get the lock, so I usually set the merge queue timeout to the max allowed timeout (6 hours).

@giordano giordano linked an issue Jan 4, 2025 that may be closed by this pull request
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 4, 2025
@DilumAluthge
Copy link
Member Author

I'll demonstrate this now. Currently, if you look, the "integration tests" status says "skipped". I'll click the "merge when ready" button now.

@DilumAluthge DilumAluthge added this pull request to the merge queue Jan 4, 2025
@giordano
Copy link
Collaborator

giordano commented Jan 4, 2025

I don't see any changes with before, the integration-tests is still not running at all, because it's requires but skipped
image

@DilumAluthge
Copy link
Member Author

The integration tests are currently running right now on the merge_group event: https://github.com/JuliaLang/BumpStdlibs.jl/actions/runs/12614594561/job/35153639796

@DilumAluthge
Copy link
Member Author

The merge queue view often doesn't tell the whole story. You usually have to go to the Actions tab.

@giordano
Copy link
Collaborator

giordano commented Jan 4, 2025

The integration tests are currently running right now on the merge_group event: JuliaLang/BumpStdlibs.jl/actions/runs/12614594561/job/35153639796

They did also 6 hours ago, and yet the PR wasn't merged: https://github.com/JuliaLang/BumpStdlibs.jl/actions/runs/12612323356

@DilumAluthge
Copy link
Member Author

DilumAluthge commented Jan 4, 2025

They did also 6 hours ago, and yet the PR wasn't merged: https://github.com/JuliaLang/BumpStdlibs.jl/actions/runs/12612323356

Because (at that time) the merge queue timeout was only set to 2 hours, and the timeout expired before the integration tests finished.

@giordano
Copy link
Collaborator

giordano commented Jan 4, 2025

Because the merge queue timeout was only set to 2 hours, and the timeout expired before the integration tests finished.

https://github.com/JuliaLang/BumpStdlibs.jl/actions/runs/12612323356/job/35148946271 finished running at 17:31 UTC, but the PR was removed from the merge queue at 20:21 UTC, it doesn't look like a timeout issue to me.

@DilumAluthge
Copy link
Member Author

Because the merge queue timeout was only set to 2 hours, and the timeout expired before the integration tests finished.

https://github.com/JuliaLang/BumpStdlibs.jl/actions/runs/12612323356/job/35148946271 finished running at 17:31 UTC, but the PR was removed from the merge queue at 20:21 UTC, it doesn't look like a timeout issue to me.

Aha. Okay, now I know what the bug is. It's a different bug. It's the job name bug. I'll fix that now.

@DilumAluthge
Copy link
Member Author

Basically, for my approach to work, the job name can't have anything like e.g. the Julia version number in the job name.

@DilumAluthge DilumAluthge removed this pull request from the merge queue due to a manual request Jan 4, 2025
@DilumAluthge
Copy link
Member Author

Alright, I've fixed the job name, and I've fixed the other bug (we can't use a matrix for the integration tests).

@DilumAluthge
Copy link
Member Author

Alright, so now I have done:

  1. Remove nightly from matrix.
  2. Get rid of matrix altogether.
  3. Fix the job name.
  4. Went into repo settings and set merge queue timeout to max allowed (360 minutes = 6 hours).

We should now actually be good to go. Let's try it out.

@DilumAluthge DilumAluthge added this pull request to the merge queue Jan 4, 2025
@giordano
Copy link
Collaborator

giordano commented Jan 4, 2025

Now I can see all expected jobs running:
image

@DilumAluthge
Copy link
Member Author

Now I can see all expected jobs running:

Yeah, we needed the changes in 5f43de2

Merged via the queue into master with commit c8851c1 Jan 5, 2025
2 checks passed
@DilumAluthge DilumAluthge deleted the dpa/merge_queue branch January 5, 2025 00:04
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.

TODO: Migrate this repo's CI from Bors to GitHub Merge Queue
2 participants