Closed
Description
Description
Details can be found in the Forgejo bug report https://codeberg.org/forgejo/forgejo/issues/680
An PR that is closed and fails to check patch will try forever and clutter the patch queue. This behavior is a regression introduced by #23324.
Example PR is https://codeberg.org/calckey/calckey/pulls/3033
Test PR[54635] from patch checking queue
21 seconds ago
TestPatch: PR[54635]calckey/calckey#3033[develop...develop]
21 seconds ago
/usr/bin/git fetch --no-tags --no-write-commit-graph head_repo refs/heads/develop:tracking [repo_path: /data/git/data/tmp/local-repo/pull.git3604001873]
10 seconds ago
Logs
2023/04/28 21:47:53 ...ervices/pull/pull.go:454:pushToBaseRepoHelper() [I] Unable to push PR head for calckey/calckey#3033 (54011:calckey/calckey:refs/pull/3033/head) due to rejection:
Stdout:
Stderr: remote: error: cannot lock ref 'refs/pull/3033/head': is at 68172bc5991c5975c0d1bc86ee300f24711c694e but expected 6157c41ffb25f551494cdd44c25fbcd96441d49c
remote: fatal: Unable to create '/mnt/ceph-cluster/git/gitea-repositories/calckey/calckey.git/./packed-refs.lock': File exists.
remote:
remote: Another git process seems to be running in this repository, e.g.
remote: an editor opened by 'git commit'. Please make sure all processes
remote: are terminated then try again. If it still fails, a git process
remote: may have crashed in this repository earlier:
remote: remove the file manually to continue.
remote: fatal: failed to run pack-refs
To /mnt/ceph-cluster/git/gitea-repositories/calckey/calckey.git
! [remote rejected] develop -> refs/pull/3033/head (failed to update ref)
error: failed to push some refs to '/mnt/ceph-cluster/git/gitea-repositories/calckey/calckey.git'
Error: exit status 1
Repeats
2023/04/28 21:46:11 ...ervices/pull/pull.go:454:pushToBaseRepoHelper() [I] Unable to push PR head for calckey/calckey#3033 (54011:calckey/calckey:refs/pull/3033/head) due to rejection:
2023/04/28 21:46:53 ...ervices/pull/pull.go:454:pushToBaseRepoHelper() [I] Unable to push PR head for calckey/calckey#3033 (54011:calckey/calckey:refs/pull/3033/head) due to rejection:
2023/04/28 21:47:53 ...ervices/pull/pull.go:454:pushToBaseRepoHelper() [I] Unable to push PR head for calckey/calckey#3033 (54011:calckey/calckey:refs/pull/3033/head) due to rejection:
2023/04/29 00:07:20 ...ervices/pull/pull.go:454:pushToBaseRepoHelper() [I] Unable to push PR head for calckey/calckey#3033 (54011:calckey/calckey:refs/pull/3033/head) due to rejection:
2023/04/29 08:00:07 ...ervices/pull/pull.go:454:pushToBaseRepoHelper() [I] Unable to push PR head for calckey/calckey#3033 (54011:calckey/calckey:refs/pull/3033/head) due to rejection:
Gitea Version
v1.19.2
Can you reproduce the bug on the Gitea demo site?
No
Git Version
2.30
Operating System
GNU/Linux
How are you running Gitea?
Database
PostgreSQL