Commit data not retrieved in case of skipped directory level #9037

Closed
ehuelsmann opened this Issue Mar 27, 2015 · 12 comments

Projects

None yet

5 participants

@ehuelsmann

Hi,

GitLab 7.9.0 doesn't correctly retrieve commit data; see this URL: https://gitlab.common-lisp.net/cl-unification/cl-unification/tree/master/docs/html ; however, in the project root, the previous URL is a sibling of this one https://gitlab.common-lisp.net/cl-unification/cl-unification/tree/master/lib-dependent (note: no skipped directory levels). The second URL does retrieve its commit data correctly.

Regards,

Erik.

@melvinvermeeren

I am experiencing the same issue.

There are no warnings or errors in the log files, it simply doesn't load.
It also seems that some other non-skipped directories also don't work properly. I can't find any logic in it, but generally speaking the deeper you go in the folder structure the more often it fails. A subdirectory of a folder that fails to load history will also fail to load history.
Gitlab 7.9.0, Ruby 2.1.5p273 and git 2.3.4.

@ehuelsmann

More links with not-loading commit data (GitLab 7.9.1):

https://gitlab.common-lisp.net/clo/cvs-fast-export/tree/master/tests/oldhead.testrepo
https://gitlab.common-lisp.net/clo/cvs-fast-export/tree/master/tests/t9605.testrepo
https://gitlab.common-lisp.net/slime/slime/tree/master/contrib/test
https://gitlab.common-lisp.net/xhtmlambda/XHTMLambda/tree/master/docs/blog
https://gitlab.common-lisp.net/xhtmlambda/XHTMLambda/tree/master/docs/html

Note that these are links from 3 separate projects of which I didn't paste links before. So, I'm now up to 4 projects not loading correctly. I've only sampled ~6 or 7 projects, so that's about half the project which suffer from this problem.

@ehuelsmann

@Razer6 I've locally applied the one-liner and ran 'gitlab-rake assets:precompile'.

However, I see no change in the behaviour of the pages in the links above. Is there more I can do to help?

@melvinvermeeren

It seems to be caused by something else indeed.
Cannot seem to find any more information on this either, is nobody else noticing this at all?

@ehuelsmann

Ok. So, I researched the logs of the reverse proxy (Apache in my case) and I found this entry for one of the URLs which isn't loading the commit data:

94.209.179.229 - - [17/Apr/2015:07:15:46 +0000] "GET /cmucl/cmucl/refs/master/logs_tree/src%2Flisp?_=1429254858719 HTTP/1.1" 200 -

Note that the last dash is supposed to be the response length. Is GitLab generating a chunked response? I'll see if I can dig into the other logs and find something around the same time to add to this ticket.

@ehuelsmann

This is what I found in the production log as a request around that time:

Started GET "/cmucl/cmucl/refs/master/logs_tree/src%252Flisp?=1429254858719" for 94.209.179.229 at 2015-04-17 07:15:46 +0000
Processing by Projects::RefsController#logs_tree as JS
Parameters: {"
"=>"1429254858719", "namespace_id"=>"cmucl", "project_id"=>"cmucl", "id"=>"master", "path"=>"src%2Flisp"}
Completed 200 OK in 27ms (Views: 0.7ms | ActiveRecord: 3.2ms)

So far nothing weird (even the 27ms seems to be a normal response time on our system, so, it's not exceptionally quickly done, but for this project a response in the hundreds of milliseconds would be more appropriate).

@AlbertWeichselbraun

I am experiencing the same problem at our systems but noticed that your links are now working fine. Have you applied any changes to get the commit data working?

@ehuelsmann

Hi,

Yes, I've applied the fix pointed out in the comment of this ticket: https://gitlab.com/gitlab-org/gitlab-ce/issues/1478#note_1148655

Wondering if I should close this one, otoh, the referred ticket isn't closed either (yet).

Regards,

Erik.

@stanhu
Member
stanhu commented Apr 27, 2015

I've updated the merge request with a reference to this ticket:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/581

@AlbertWeichselbraun

Hi Erik,

Thank you! - I applied the patch, restarted gitlab and everything is working fine again 😄

Cheers,
Albert

@melvinvermeeren

The fix is working for me too, thanks a lot!
Glad to see GitLab improve every day. :)

@DouweM DouweM added a commit that closed this issue Apr 28, 2015
@DouweM DouweM Merge branch 'fix-commit-data-url-generation' into 'master'
Fix bug where commit data would not appear in some subdirectories

Fix issue where commit data would not show up in some subdirectories due to escaped slashes. For example:

https://gitlab.common-lisp.net/ecl/ecl/tree/develop/src/gc (now patched with fix)

The upgrade from Rails v4.1.2 to v4.1.9 (76aad9b) caused slashes in a tree to be escaped automatically. Using a wildcard glob in the route prevents this behavior.

* Closes #1478, #1459
* Closes #9037

See merge request !581
822ba95
@DouweM DouweM closed this in 822ba95 Apr 28, 2015
@DouweM DouweM added a commit that referenced this issue May 6, 2015
@DouweM @randx DouweM + randx Merge branch 'fix-commit-data-url-generation' into 'master'
Fix bug where commit data would not appear in some subdirectories

Fix issue where commit data would not show up in some subdirectories due to escaped slashes. For example:

https://gitlab.common-lisp.net/ecl/ecl/tree/develop/src/gc (now patched with fix)

The upgrade from Rails v4.1.2 to v4.1.9 (76aad9b) caused slashes in a tree to be escaped automatically. Using a wildcard glob in the route prevents this behavior.

* Closes #1478, #1459
* Closes #9037

See merge request !581
c99f4e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment