Closed
Description
-
Gitea version (or commit ref):
https://github.com/gogits/gogs/commit/8ee14db51ebc92728e1edba4545c7d4ea4b21c65
This is exactly the Gogs release version0.9.97.0901
-
Git version:
git version 2.7.4
-
Operating system:
`Ubuntu Server 16.04 -
Database (use
[x]
):- PostgreSQLMySQLSQLite
-
Log gist:
31630 Nov 25 16:37:37 DIR-101 gogs[32041]: [Macaron] 2016-11-25 16:37:37: Started POST /test/BCM-Android-Linux-Test/compare/master...mura:master for 192.168.222.65
31631 Nov 25 16:37:37 DIR-101 gogs[32041]: 2016/11/25 16:37:37 [D] Session ID: f64a95bdfc4e1143
31632 Nov 25 16:37:37 DIR-101 gogs[32041]: 2016/11/25 16:37:37 [D] CSRF Token: cl6PKtu_cFKSebHPtlJdAv0Y9-k6MTQ4MDA1OTY5NjgzOTI2NTkzMA==
31633 Nov 25 16:37:37 DIR-101 gogs[32041]: 2016/11/25 16:37:37 [T] PullRequest[0].testPatch (patchPath): /home/git/gogs-repositories/test/bcm-android-linux-test.git/pulls/1.patch
31634 Nov 25 16:41:38 DIR-101 gogs[32041]: 2016/11/25 16:41:38 [T] PushToBaseRepo[37]: pushing commits to base repo 'refs/pull/1/head'
31635 Nov 25 16:41:38 DIR-101 gogs[32041]: 2016/11/25 16:41:38 [T] DeliverHooks [repo_id: 37]
31636 Nov 25 16:41:39 DIR-101 gogs[32041]: 2016/11/25 16:41:39 [T] Pull request created: 37/19
31637 Nov 25 16:41:39 DIR-101 gogs[32041]: [Macaron] 2016-11-25 16:41:39: Completed /test/BCM-Android-Linux-Test/compare/master...mura:master 302 Found in 4m1.573187867s
31638 Nov 25 16:41:39 DIR-101 gogs[32041]: [Macaron] 2016-11-25 16:41:39: Started GET /test/BCM-Android-Linux-Test/pulls/1 for 192.168.222.65
31639 Nov 25 16:41:39 DIR-101 gogs[32041]: 2016/11/25 16:41:39 [D] Session ID: f64a95bdfc4e1143
31640 Nov 25 16:41:39 DIR-101 gogs[32041]: 2016/11/25 16:41:39 [D] CSRF Token: cl6PKtu_cFKSebHPtlJdAv0Y9-k6MTQ4MDA1OTY5NjgzOTI2NTkzMA==
31641 Nov 25 16:41:39 DIR-101 gogs[32041]: 2016/11/25 16:41:39 [D] Template: repo/issue/view
31642 Nov 25 16:41:39 DIR-101 gogs[32041]: [Macaron] 2016-11-25 16:41:39: Completed /test/BCM-Android-Linux-Test/pulls/1 200 OK in 266.321449ms
Description
If I am not misinterpreting the log, it took around 4 minutes to reply the POST of the PR creation.
...
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
tboerger commentedon Nov 25, 2016
Since you are posting this issue to Gitea, have you also tried the same with Gitea master? Just to confirm this is a remaining issue.
typeless commentedon Nov 25, 2016
@tboerger Since the log was captured on a production server which is not entirely controlled by me, it's a bit of risky to upgrade and test the setup right now. I am trying to come up with a way to make it easier to be reproduced (and test it with latest Gitea).
typeless commentedon Nov 25, 2016
The alleged culprit https://github.com/go-gitea/gitea/blob/master/models/pull.go#L342, according to the log.
tboerger commentedon Nov 25, 2016
I will mark it as a bug for now, but please try to provide more feedback on this.
typeless commentedon Nov 25, 2016
@tboerger Confirmed. The latest Gitea exhibits the same behavior.
typeless commentedon Nov 26, 2016
The above is the relevant call trace for creating a PR.
The method
testPatch
is responsible for reporting the status of the PR. (PullRequestStatusConflict
,PullRequestStatusChecking
orPullRequestStatusMergeable
)The problem here is that Gogs/Gitea will try to clone or checkout the entire repository just for checking if there is any conflict. FWIW, the cloned repository will be stored at
data/tmp
.strk commentedon Nov 26, 2016
typeless commentedon Nov 27, 2016
The above seems to be a viable approach to test patches with solely bare repository. I have tested on my laptop with a much simplified Gitea setup.
modules/process: add ExecDirEnv (next to ExecDir)
3 remaining items
tboerger commentedon Nov 29, 2016
Moved like the pending pr to 1.1 because it requires further testing
Speed up conflict checking in pull request creation (#276)
Changes from gitea:master (go-gitea#130)
lunny commentedon Feb 23, 2017
So this has been resolved by #276 ?
lunny commentedon Feb 23, 2017
@typeless
typeless commentedon Feb 23, 2017
@lunny Yes.