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

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

Closed
6543 opened this issue Sep 6, 2020 · 15 comments · Fixed by #12839
Closed
Labels
Milestone

Comments

@6543
Copy link
Member

6543 commented 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

@6543 6543 added this to the 1.13.0 milestone Sep 6, 2020
@6543 6543 added the type/bug label Sep 6, 2020
@bagasme
Copy link
Contributor

bagasme commented Sep 8, 2020

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

@6543
Copy link
Member Author

6543 commented 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)

@zeripath
Copy link
Contributor

zeripath commented Sep 8, 2020

Sounds like a race

zeripath added a commit to zeripath/gitea that referenced this issue Sep 14, 2020
Fix go-gitea#12740

Signed-off-by: Andrew Thornton <art27@cantab.net>
techknowlogick pushed a commit that referenced this issue Sep 15, 2020
* Stop cloning unnecessarily on PR update

Fix #12740

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove unnecessary delete

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
zeripath added a commit to zeripath/gitea that referenced this issue Sep 15, 2020
Backport go-gitea#12839

Fix go-gitea#12740

Signed-off-by: Andrew Thornton <art27@cantab.net>
lafriks pushed a commit that referenced this issue Sep 15, 2020
Backport #12839

Fix #12740

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Contributor

Please reopen if the provided PR does not fix.

@6543 6543 reopened this Sep 15, 2020
@6543 6543 closed this as completed Sep 15, 2020
@6543
Copy link
Member Author

6543 commented Sep 15, 2020

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

@ramasoft-dv
Copy link

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.

@zeripath
Copy link
Contributor

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

@ramasoft-dv
Copy link

@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.

@zeripath
Copy link
Contributor

have you considered:

gitea doctor --run recalculate_merge_bases

@ramasoft-dv
Copy link

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

What does it means ?

@zeripath
Copy link
Contributor

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

@ramasoft-dv
Copy link

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 ?

@zeripath
Copy link
Contributor

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.

@ramasoft-dv
Copy link

ramasoft-dv commented 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
Copy link

ramasoft-dv commented 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.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants