Branches created in SVN not found by GitLab

Hi,

I’m using
GitLab 12.10.3-ee
SubGit version 3.3.9 (‘Bobique’) build #4351

When I create a branch in SVN,

  • it is correctly created in git, I can git checkout it => Great
  • GitLab sees it in $my-gitlab/$namespace/$project/-/branches => Great
  • GitLab gives me a 404 when I navigate to $my-gitlab/$namespace/$project/-/tree/$branch => :-/
  • I cannot create a merge request on it => :-/
  • If I git push an empty commit on the branch, the problem goes away.

Any idea what might cause this?

Maybe relevant: in SVN, my branches are in a subdirectory of ^/branches, so I have
branches = branches/*/*:refs/heads/*/*
in my subig config file.
Maybe the slash in the branch name is not properly escaped at some point?

Thanks.

Hi Julien,

it might be the reason, indeed, but it’s hard to tell for sure, need to take a glance at the logs. May we ask you to provide us SubGit logs from the affected repository?

I’m sorry, I’ve sent you the logs of my previous post by mistake… The current logs are coming…

EDIT: Here are the new logs logs.tar.gz (2.0 MB)

I’m writing a new message to be sure that you see my edit. My apologies if you worked with the previous logs I had attached.

I’m noticing another problem:
Still with GitLab, in a merge request, I can’t use the “Apply suggestion” button.
The put query is responded with 400 (Bad Request) and the web page displays “The file has been changed.”
This problem only appears if the branch is created on the SVN side. If I create the branch in git, I don’t have this problem.

Hello Julien,

thank you for letting us know, we’re investigating the issue.

Hello Julien,

We have checked the logs and also tried to re-produce the issue, but unfortunately we haven’t managed to do it. We have set an environment similar to what you have, but haven’t got 404 or any other issues you mentioned. The log doesn’t contain any obvious issues, too – there’s one exception that states there’s no hooks/post-receive hook there, but it’s pretty normal and expected on GitLab 12.10. WE must be missing something about your setup, could you please describe it in a little more detail? Do you have any special settings in GitLab? Also, could you please check GitLab logs (or collect them for us) for any errors/suspicious events?

I think the problem was on me.

I made several mistakes with user permissions in the repository on the git server. I first ran “subgit configure” as root (by mistake), I corrected the permission to use the git user, then I ran the daemon as root (by mistake) at least once during normal operations.

I had some files belonging to root:root in the repository. So I chown’ed git:git everything and restarted the daemon as git, and both problems seem to be gone.

I guess the subgit daemon was running as root => the git branches from SVN were created as root and GitLab couldn’t use them.

Sorry for making you work for nothing and thanks for the quick answers.

Hi Julien,

that indeed seems to be a possible reason for the issue. Glad to know everything’s working! And thanks for letting us know what the problem was.