[Bug] PullRequest: merge base branch into feature branch cause "broken fork" and other errors #5955

Closed
opened 2025-11-02 06:41:14 -06:00 by GiteaMirror · 15 comments
Owner

Originally created by @6543 on GitHub (Sep 6, 2020).

if you resolve conlficts localy by mergin base branch or just click the "update button" sometimes this commit does not show up opull request packe and also CI is not triggerd

Workaround: push a empty commit to the branch afterwards

Originally created by @6543 on GitHub (Sep 6, 2020). if you resolve conlficts localy by mergin base branch or just click the "update button" sometimes this commit does not show up opull request packe and also CI is not triggerd Workaround: push a empty commit to the branch afterwards
GiteaMirror added the type/bug label 2025-11-02 06:41:14 -06:00
Author
Owner

@bagasme commented on GitHub (Sep 8, 2020):

@6543 Resolving conflicts locally: did you mean on your own computer (not your server)?

@bagasme commented on GitHub (Sep 8, 2020): @6543 Resolving conflicts locally: did you mean on your own computer (not your server)?
Author
Owner

@6543 commented on GitHub (Sep 8, 2020):

yes - the problem of this bug is, it happen only some times, when adding new commits via local PC or webUI (update button)

@6543 commented on GitHub (Sep 8, 2020): yes - the problem of this bug is, it happen only **some times**, when adding new commits via local PC or webUI (update button)
Author
Owner

@zeripath commented on GitHub (Sep 8, 2020):

Sounds like a race

@zeripath commented on GitHub (Sep 8, 2020): Sounds like a race
Author
Owner

@zeripath commented on GitHub (Sep 15, 2020):

Please reopen if the provided PR does not fix.

@zeripath commented on GitHub (Sep 15, 2020): Please reopen if the provided PR does not fix.
Author
Owner

@6543 commented on GitHub (Sep 15, 2020):

I missed "if" on first read :D - we will see when gitea.com got updated ...

@6543 commented on GitHub (Sep 15, 2020): I missed "**if**" on first read :D - we will see when gitea.com got updated ...
Author
Owner

@ramasoft-dv commented on GitHub (Oct 28, 2020):

I have the same issue. When I click on Update, i have Missing fork information. It's only when i push an empty commit that it's coming back to normal.
It's not happening for new PR, only for PR created before we migrated to 1.13.
I took the last 1.13 Dev build. I don't know if your fix was merged into 1.13 dev ? if yes, then it does not fix my issue.

@ramasoft-dv commented on GitHub (Oct 28, 2020): I have the same issue. When I click on Update, i have Missing fork information. It's only when i push an empty commit that it's coming back to normal. It's not happening for new PR, only for PR created before we migrated to 1.13. I took the last 1.13 Dev build. I don't know if your fix was merged into 1.13 dev ? if yes, then it does not fix my issue.
Author
Owner

@zeripath commented on GitHub (Oct 28, 2020):

@ramasoft-dv interesting, what version did you migrate from?

@zeripath commented on GitHub (Oct 28, 2020): @ramasoft-dv interesting, what version did you migrate from?
Author
Owner

@ramasoft-dv commented on GitHub (Oct 28, 2020):

@ramasoft-dv interesting, what version did you migrate from?

We were on 1.12.4 and update to 1.13 rc1.
And after that update, for old PR, when we make an "Update" of the branch, we have a "Missing Fork Information" that won't leave until someone make a new empty commit on that branch.

@ramasoft-dv commented on GitHub (Oct 28, 2020): > @ramasoft-dv interesting, what version did you migrate from? We were on 1.12.4 and update to 1.13 rc1. And after that update, for old PR, when we make an "Update" of the branch, we have a "Missing Fork Information" that won't leave until someone make a new empty commit on that branch.
Author
Owner

@zeripath commented on GitHub (Oct 28, 2020):

have you considered:

gitea doctor --run recalculate_merge_bases
@zeripath commented on GitHub (Oct 28, 2020): have you considered: ``` gitea doctor --run recalculate_merge_bases ```
Author
Owner

@ramasoft-dv commented on GitHub (Oct 28, 2020):

I've run the command, and I have now:
"[ 1 ] Recalculate merge bases

  • #1 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78
  • #2 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78
  • #3 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78
  • #4 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78
  • #5 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78
  • #74 onto develop in Repository: MergeBase should be 62e0fd27653cb8f745ea6cfb3a0938734f9de0a3 but is 86a3b50da3154016b536548693644f133ec7489c
  • #80 onto develop in Repository: MergeBase should be 399ff66c8728df9fdc10b900fe1b78ce736a5df3 but is 6c740dc0c77de8b312564bf57fec17155e878a79
  • #82 onto develop in Repository: MergeBase should be 182f36eb6ffe3b5b5c3e39b29d6b6dfbe1e298fe but is 203eea9379a8d40d557ab62b5c76e6e8aa120e2f
  • #87 onto develop in Repository: MergeBase should be 2436466eb5c34553a4f7ed2304dcdfa87c24dff8 but is 67d294fdb74b2cb759d694760ffd9e28a91360e6
  • #99 onto develop in Repository: MergeBase should be 6288fd932c41fea381b8366675ccdd11912b8bdd but is ad05f3f245bd8113ceecc47d546505e3e7aabcd7
  • #104 onto develop in Repository: MergeBase should be 399ff66c8728df9fdc10b900fe1b78ce736a5df3 but is 38c410b3f06e8cd636fadf2d7ee17640d0168a9f
    Error: 11 PRs with incorrect mergebases of 152 PRs total in 13 repos

What does it means ?

@ramasoft-dv commented on GitHub (Oct 28, 2020): I've run the command, and I have now: "[ 1 ] Recalculate merge bases - #1 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78 - #2 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78 - #3 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78 - #4 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78 - #5 onto develop in Repository: MergeBase should be 66ac0785693224ddd660a965acda8fa79bf06646 but is 6dddba68de63a6a3d53cb0ca5e0da776f3312e78 - #74 onto develop in Repository: MergeBase should be 62e0fd27653cb8f745ea6cfb3a0938734f9de0a3 but is 86a3b50da3154016b536548693644f133ec7489c - #80 onto develop in Repository: MergeBase should be 399ff66c8728df9fdc10b900fe1b78ce736a5df3 but is 6c740dc0c77de8b312564bf57fec17155e878a79 - #82 onto develop in Repository: MergeBase should be 182f36eb6ffe3b5b5c3e39b29d6b6dfbe1e298fe but is 203eea9379a8d40d557ab62b5c76e6e8aa120e2f - #87 onto develop in Repository: MergeBase should be 2436466eb5c34553a4f7ed2304dcdfa87c24dff8 but is 67d294fdb74b2cb759d694760ffd9e28a91360e6 - #99 onto develop in Repository: MergeBase should be 6288fd932c41fea381b8366675ccdd11912b8bdd but is ad05f3f245bd8113ceecc47d546505e3e7aabcd7 - #104 onto develop in Repository: MergeBase should be 399ff66c8728df9fdc10b900fe1b78ce736a5df3 but is 38c410b3f06e8cd636fadf2d7ee17640d0168a9f Error: 11 PRs with incorrect mergebases of 152 PRs total in 13 repos What does it means ?
Author
Owner

@zeripath commented on GitHub (Oct 28, 2020):

it means that merge bases for those PRs appear to be incorrect - you could check them yourself manually.

Do they correspond to your problematic PRs?

If you were to run:

gitea doctor --run recalculate_merge_bases --fix

Then gitea would check for you

@zeripath commented on GitHub (Oct 28, 2020): it means that merge bases for those PRs appear to be incorrect - you could check them yourself manually. Do they correspond to your problematic PRs? If you were to run: ``` gitea doctor --run recalculate_merge_bases --fix ``` Then gitea would check for you
Author
Owner

@ramasoft-dv commented on GitHub (Oct 28, 2020):

Yes, each of them were/are problematic.
I've run your fix command and it says that it fixed them. I'll check soon and give you a feedback.
But why did it happen and will it happen again ?

@ramasoft-dv commented on GitHub (Oct 28, 2020): Yes, each of them were/are problematic. I've run your fix command and it says that it fixed them. I'll check soon and give you a feedback. But why did it happen and will it happen again ?
Author
Owner

@zeripath commented on GitHub (Oct 28, 2020):

It won't happen again. There was a bug a while back that set these incorrectly. This fixes this. They should have been fixed during automatic db migration when you upgraded - I'm not certain why they weren't.

@zeripath commented on GitHub (Oct 28, 2020): It won't happen again. There was a bug a while back that set these incorrectly. This fixes this. They should have been fixed during automatic db migration when you upgraded - I'm not certain why they weren't.
Author
Owner

@ramasoft-dv commented on GitHub (Oct 28, 2020):

So after having run your command :

  • On the problematic PRs: Nearly all of them were already fixed/closed manually. The remaining opened PRs which were not yet manually fixed, seems to be working without errors (the update works again)
  • On "old" PRs (the still opened PRs not in the list of problematic PRs returned by your command and which were created in 1.12.4) : When i'm making an update, i've no more the issue
  • On "new" PRs (the still opened PRs which were created in 1.13 rc1) : Nothing changed, they were already working so they continue to work like expected.

So it seems that the 1.13 Dev + having run your fix command have fixed all of our problems.
Should I expect again PR failing after an update ?

@ramasoft-dv commented on GitHub (Oct 28, 2020): So after having run your command : - On the problematic PRs: Nearly all of them were already fixed/closed manually. The remaining opened PRs which were not yet manually fixed, seems to be working without errors (the update works again) - On "old" PRs (the still opened PRs not in the list of problematic PRs returned by your command and which were created in 1.12.4) : When i'm making an update, i've no more the issue - On "new" PRs (the still opened PRs which were created in 1.13 rc1) : Nothing changed, they were already working so they continue to work like expected. So it seems that the 1.13 Dev + having run your fix command have fixed all of our problems. Should I expect again PR failing after an update ?
Author
Owner

@ramasoft-dv commented on GitHub (Oct 28, 2020):

It won't happen again. There was a bug a while back that set these incorrectly. This fixes this. They should have been fixed during automatic db migration when you upgraded - I'm not certain why they weren't.

Thanks, it answer my previous question.

@ramasoft-dv commented on GitHub (Oct 28, 2020): > It won't happen again. There was a bug a while back that set these incorrectly. This fixes this. They should have been fixed during automatic db migration when you upgraded - I'm not certain why they weren't. Thanks, it answer my previous question.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5955