500 error on creating pull request
- Gogs version (or commit ref): 0.9.46.0717
- Git version: 2.8.1
- Operating system: debian jessie
- Database: Sqlite
- Can you reproduce the bug at http://try.gogs.io: No
- Log gist: https://gist.github.com/akademic/afef02f8954f9b210d1e7146f8fb5480
Description
Steps for reproduction:
- user1 create repo1 with commits
- user2 forks user1/repo1 as user2/repo1
- user2 adds new commit to user2/repo2 and push it
- user2 clicks on Create Pull Request
- See 500 error
I got the same behavior on all my repos when trying create issues (have not tried pull request yet):
[E] NewIssue: newIssue: GetRepositoryByID: repository does not exist
I don't know what update broke this but it worked a week ago.
I'm using the gogs docker image.
Having the same problem (a 500) when creating new issues on Debian Jessie (edit: and sqlite). Version 0.9.46 here, aka 1c7dcdd6b948b9c177b5ed4e036e612508ee9832.
[...outers/repo/issue.go:435 NewIssuePost()] [E] NewIssue: newIssue: GetRepositoryByID: repository does not exist [id: 14, uid: 0, name: ]
If I get a moment, I'll try to reproduce it against HEAD.
I bisected, and f1b8d52eb3ac230ed5a275f4a844ddb0cf48041e appears to be the offending commit.
Aha!
I think I fixed it. I just created #3297; I'd appreciate some feedback.
Seems like the SQLite driver for xorm can't retrieve data once an update occurs. A comment in issue.go says as much, at least:
// During the session, SQLite3 dirver cannot handle retrieve objects after update something.
// So we have to get all needed labels first.
Patch has pushed to fix this issue, please test on master branch or https://try.gogs.io.
Testing on c2fb01a257cfcddf5dc279fcd66175280778f7a9 just now Works fine!
Works on latest gogs docker (0.9.47.0721)!
For anyone blocking on this, I'll have a new revision release ASAP.