You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello and thanks for this very useful bot. We have a workflow where we forward-port change log from a release branch back to main at release time. Hence, we created a backport-main label (see https://github.com/astropy/astropy/labels) with the auto backport directive. However, the auto backport does not work, though the manual comment does. Example:
So I think 2 things need addressing for this label to work properly.
backport-main should automatically open a PR to main when it detects merge event from a PR that is not opened against main.
On a PR with backport-main label that is opened against main (currently possible via the bot via comment backport to main), it should not try to backport that backport PR to main again on merge. Currently it does and then post an error message comment, unless I remove backport-main label before merge.
I wonder if the issue here is that the PR for which we want backport-main to work is not merged into main but into a release branch - perhaps the bot only watches for PRs opened again main?
I wonder if the issue here is that the PR for which we want backport-main to work is not merged into main but into a release branch - perhaps the bot only watches for PRs opened again main?
It is quite possible, otherwise as the backported PRs get the same labels applied than the original one, merging a backport would trigger an infinite loop.
There is likely a smarter way to do that, but I did not look into it.
if"on-merge:"indescription_strandis_pr["base"]["ref"] in (
"master",
"main",
):
can be generalized to something like
Grab the base ref branch no matter what.
Check for target branch in label description.
If base ref same as target, no-op and quit.
Otherwise, attempt backport as usual.
but I don't know the code enough to make a PR and it does not look like I can just do a few lines simple change at that location.
OR
You can also say that we're abusing a backport bot to do forwardport and just close this as won't fix. Though would be nice to have this limitation documented at https://meeseeksbox.github.io/ if this is what you choose to do.
Activity
Carreau commentedon May 7, 2024
Hum, I only have 48 hours of logs, so can't look at it after the fact. Sorry about that, I'll try to experiment on test-repo.
astrofrog commentedon Jul 25, 2024
@Carreau it has just happened again today in case you are able to spot it in the logs (for astropy)
pllim commentedon Jul 25, 2024
He did say the logs only go for 48 hours and your issue is 2 days old, so unlikely.
astrofrog commentedon Jul 25, 2024
Hmm yes sorry misremembered, time flies!
Carreau commentedon Jul 29, 2024
Sorry, I was on time-off and did not check github for a few days.
astrofrog commentedon Aug 30, 2024
Just a heads-up that I will soon be merging a PR labelled backport-main: astropy/astropy#16911 (in a few hours)
astrofrog commentedon Aug 30, 2024
I just merged the PR at 11:58 GMT
astrofrog commentedon Aug 30, 2024
Requested a manual backport at 12:52 GMT (this succeeded)
pllim commentedon Aug 30, 2024
So I think 2 things need addressing for this label to work properly.
backport-mainshould automatically open a PR tomainwhen it detects merge event from a PR that is not opened againstmain.backport-mainlabel that is opened againstmain(currently possible via the bot via commentbackport to main), it should not try to backport that backport PR tomainagain on merge. Currently it does and then post an error message comment, unless I removebackport-mainlabel before merge.astrofrog commentedon Aug 30, 2024
I wonder if the issue here is that the PR for which we want
backport-mainto work is not merged intomainbut into a release branch - perhaps the bot only watches for PRs opened againmain?Carreau commentedon Sep 2, 2024
It is quite possible, otherwise as the backported PRs get the same labels applied than the original one, merging a backport would trigger an infinite loop.
There is likely a smarter way to do that, but I did not look into it.
pllim commentedon Sep 3, 2024
Maybe the logic here (or around here)
MeeseeksDev/meeseeksdev/meeseeksbox/core.py
Lines 354 to 357 in 8e81617
can be generalized to something like
but I don't know the code enough to make a PR and it does not look like I can just do a few lines simple change at that location.
OR
You can also say that we're abusing a backport bot to do forwardport and just close this as won't fix. Though would be nice to have this limitation documented at https://meeseeksbox.github.io/ if this is what you choose to do.
Thanks!