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

Error 500 while creating a Pull Request from Gitea WebUI #22716

Closed
zedalaye opened this issue Feb 1, 2023 · 6 comments
Closed

Error 500 while creating a Pull Request from Gitea WebUI #22716

zedalaye opened this issue Feb 1, 2023 · 6 comments
Labels

Comments

@zedalaye
Copy link

zedalaye commented Feb 1, 2023

Description

When I try to create a pull request to merge a branch into master, at the end of the process (the last step ?) I get an error 500.

I tracked down things in the log up to 👍

2023-02-01 17:25:22 | 2023/02/01 16:25:22 ...ers/web/repo/pull.go:1265:CompareAndPullRequestPost() [E] [63da9272] NewPullRequest: generate pull request index failed: pq: syntax error at or near "ON"

Gitea Version

1.18.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/zedalaye/b91153f2cf321b5b9af5813c6f9e7b65

Screenshots

No response

Git Version

2.36.4

Operating System

Linux (Docker)

How are you running Gitea?

Using official docker image gitea:1.18

Database

PostgreSQL

@lunny
Copy link
Member

lunny commented Feb 2, 2023

What's your postgres database version?

@zedalaye
Copy link
Author

zedalaye commented Feb 2, 2023

9.5 (don't remember exactly which variant). In process to migrate to 15

@lunny
Copy link
Member

lunny commented Feb 5, 2023

Could you try that version because Gitea needs at least 10.
ref. https://docs.gitea.io/en-us/database-prep/#database-preparation

@zero-sky
Copy link

zero-sky commented Apr 13, 2023

i have the same question。gitea1.19.0, sqlite

@zero-sky
Copy link

2023/04/13 10:56:23 ...ervices/pull/pull.go:764:GetIssuesAllCommitStatus() [E] [64376f57-8] getAllCommitStatus: cant get commit statuses of pull [32]: object does not exist [id: refs/pull/19/head, rel_path: ]
2023/04/13 10:56:45 ...ervices/pull/pull.go:461:pushToBaseRepoHelper() [E] [64376f6d-37] Unable to push PR head for westlake/qr_wl#34 (21:westlake/qr_wl:refs/pull/34/head) due to Error: exit status 1 - Invalid remote name "/mnt/dataDisk/git/data/gitea-repositories/westlake/qr_wl.git": Invalid remote name: "/mnt/dataDisk/git/data/gitea-repositories/westlake/qr_wl.git"
error: failed to push some refs to '/mnt/dataDisk/git/data/gitea-repositories/westlake/qr_wl.git'

2023/04/13 10:56:45 ...ers/web/repo/pull.go:1282:CompareAndPullRequestPost() [E] NewPullRequest: Push: westlake/qr_wl:dev/zyl/bug0413 westlake/qr_wl:refs/pull/34/head exit status 1 - Invalid remote name "/mnt/dataDisk/git/data/gitea-repositories/westlake/qr_wl.git": Invalid remote name: "/mnt/dataDisk/git/data/gitea-repositories/westlake/qr_wl.git"
error: failed to push some refs to '/mnt/dataDisk/git/data/gitea-repositories/westlake/qr_wl.git'

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 13, 2023

This issue could be closed, it's 100% a postgresql version problem.

@zero-sky

Your problem is different for the issue author's, you could open a new issue.

At the moment, I have no idea, but I think we can continue investigating the problem.

It looks like your git repository qr_wl.git is out-of-sync.

Could you please try to:

  1. Enable DEBUG level log ,and set RUN_MODE=dev
  2. Try to reproduce
  3. Collect the logs, especially the git commands

Then you could try to:

  1. Manually run the key commands to see what's the detailed error message.
  2. Check your repository's internal state, eg: branches

@lunny lunny closed this as completed Jun 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants