-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add "Update with rebase" button #3407
Comments
I prefer not using this feature, as doing so modifies the contributor's commit, and removes their GPG signing. We should check our CI configuration, as a rebase should not be needed to test against 'latest' of the target branch; if I'm not mistaken GHA (as well as other CI systems) should usually do a IOW, if the above is true, then "restarting" CI should trigger a merge, and test against the latest changes. What we can do in that case (but this requires all tests to be marked as "required", is to use the auto-merge option;
|
Alas, Looks like it's not the case. The GHA action used (https://github.com/actions/checkout) fetches the code from the last commit in a PR, and does not do a merge. I took a quick look and do not see a way to implement it. I see a number of open issues about it, e.g. this one actions/checkout#481 from @saschagrunert. I am not saying this can't be implemented, I am saying it is not implemented now.
The required checks are already marked as required for all branches, and I am maintaining it. Yet, auto-merge won't solve the issue, as we're not testing against the HEAD of the branch -- it's just a way to not wait till the tests are finished. I see three ways of solving this:
I guess that 3 would be the ideal solution, but don't have resources to work on that myself. If anyone else can tackle this I'd be happy to adopt their solution, of course. For now, I guess, we can either use the button (1) or see if it appears and ask the author to rebase (2). The alternative is to ignore the issue and fix the repo post-merge. We did it a few times already; personally I don't like a non-working HEAD. |
Related to actions/checkout#481, restarting a job will always re-run the same YAML as the original run (and there's nothing something like |
Ugh.. 😞 I'm confused by all of these; so I recently was discussion this (similar conversation) with @crazy-max (he had some ideas I think to fix the checkout action to do a merge), but @ndeloof mentioned that it already does that (or something along those lines). To some extend, I guess it's "fine"(ish) if it didn't pick up the changes from the YAML itself (not ideal, but with Jenkins that also doesn't always work 100%, and I would consider that more of a "calculated risk"), as long as it does a proper merge of
Yeah, so I meant: if it does do a proper merge when restarting, we could "trigger a rebuild" (so implicitly, "merge, and run CI"), and have GitHub deal with the merging once that completes. |
Oh! Actually wanted to comment about that, but forgot;
This is indeed a known issue with Github Actions; if changes were made in the A dirty workaround for that is to close and reopen the PR; doing so triggers GitHub to scan for the actions in the repository, and will then run the latest version of the target (main/master) branch. Would be great if GitHub had a button to "re-scan" (to pick up new or updated actions) and "re-trigger" CI |
Can we use merge queue ?
|
We were seeing 2 or 3 cases when merging two pull requests results in a non-compilable code in main branch. This is because PRs are usually not rebased.
I have now enabled a button to update a PR to the tip of the branch. Previously this button added a merge commit, which I don't like. Now there's an option to do a rebase with force push. Unfortunately this is a second option so you have to explicitly select it.
Here's a short blog post by github about the new feature: https://github.blog/changelog/2022-02-03-more-ways-to-keep-your-pull-request-branch-up-to-date/
I suggest all admins to use this before merging a PR. I have tried it myself on #3404 and it works as expected (no merge commit is created, no LGTMs are lost).
Pros:
Cons:
git pull --rebase
)Because of 🔴, I think the best way to use this feature is when the PR is ready to be merged, i.e. no more changes are expected.
The text was updated successfully, but these errors were encountered: