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

500 server error when trying to update a PR that contains conflicts with rebase #16922

Closed
2 of 6 tasks
qwerty287 opened this issue Sep 2, 2021 · 0 comments · Fixed by #16952
Closed
2 of 6 tasks

500 server error when trying to update a PR that contains conflicts with rebase #16922

qwerty287 opened this issue Sep 2, 2021 · 0 comments · Fixed by #16952
Labels
Milestone

Comments

@qwerty287
Copy link
Contributor

qwerty287 commented Sep 2, 2021

  • Gitea version (or commit ref):1.16.0+dev-192-g268b2d0c9
  • Git version:2.30.2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
    • No
  • Logs:
.../api/v1/repo/pull.go:1140:UpdatePullRequest() [E] pull_service.Update: Rebase Error: exit status 1: Whilst Rebasing: <commit hash>
        Rebasing (1/1)\01503derror: could not apply <commit hash>... change README.md
        Resolve all conflicts manually, mark them as resolved with
        "git add/rm <conflicted_files>", then run "git rebase --continue".
        You can instead skip this commit: run "git rebase --skip".
        To abort and get back to the state before "git rebase", run "git rebase --abort".
        Could not apply 5a5fa47... change README.md

        Auto-merging README.md
        CONFLICT (content): Merge conflict in README.md
Completed POST /api/v1/repos/qwerty287/tests/pulls/1/update?style=rebase 500 Internal Server Error in 258.618144ms

Description

If I try to update a PR with conflicts via rebase (using the API), I get a 500 error. If I use the default merge option, I get a 409 Conflict error, which is better. It would be nice if it could return a 409 error if the PR contains conflicts.

@lunny lunny added the type/bug label Sep 2, 2021
zeripath added a commit to zeripath/gitea that referenced this issue Sep 3, 2021
PR go-gitea#16125 did not update the error handlers to handle conflict errors relating
to rebases. This PR adds them.

Fix go-gitea#16922

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added this to the 1.15.3 milestone Sep 4, 2021
zeripath added a commit that referenced this issue Sep 5, 2021
PR #16125 did not update the error handlers to handle conflict errors relating
to rebases. This PR adds them.

Fix #16922

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Sep 5, 2021
Backport go-gitea#16952

PR go-gitea#16125 did not update the error handlers to handle conflict errors relating
to rebases. This PR adds them.

Fix go-gitea#16922

Signed-off-by: Andrew Thornton <[email protected]>
6543 pushed a commit that referenced this issue Sep 5, 2021
Backport #16952

PR #16125 did not update the error handlers to handle conflict errors relating
to rebases. This PR adds them.

Fix #16922

Signed-off-by: Andrew Thornton <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
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.

3 participants