Gitlab inconsistency regarding branches of mirrored external repo.

Summary

A project in Gitlab is configured as external CI for a remote repo via pull mirroring. Mirroring is triggered from a webhook via api call, so that there is minimal delay in synchronization. Branches with their latest commits show up in /branches but not in /pipelines/new. This makes it impossible to neither run a pipeline via trigger, via manual invocation and also the automatic pipeline triggering fails (maybe related). Manually hitting the mirroring button does not help at all (it even times out keeping spinning sometimes), what seemed to help was when another user called that /pipeline/new page.

In order to mirror the pull requests to gitlab the git config of that project was changed to

[remote "upstream"]
        url = https://github.com/<org>/repo.git
        fetch = +refs/pull/*/head:refs/heads/*
        fetch = +refs/heads/master:refs/heads/master

Steps to reproduce

  • set up project as external ci for github repo
  • set up a webhook in github to trigger mirroring
  • make changes to the git config
  • create a pull request -> pull request appears in /branches -> pull request does not appear in /pipeline/new => no build pipeline is triggered

Example Project

We have a self-hosted Gitlab server which is not public.

What is the current bug behavior?

Build pipeline is not triggered (not possible to trigger manually)

What is the expected correct behavior?

Branches appear consistently in the gitlab project and mirrored commits trigger the pipeline.

Relevant logs and/or screenshots

How do I get the logs?

Output of checks

?

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.5p335 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.1 Go Version: go1.6.2 linux/amd64

GitLab information Version: 11.4.5-ee Revision: bf6db46 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://gitlab.parity.io HTTP Clone URL: https://gitlab.parity.io/some-group/some-project.git SSH Clone URL: git@gitlab.parity.io:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: github

GitLab Shell Version: 8.3.3 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab Shell ...

GitLab Shell version >= 8.3.3 ? ... OK (8.3.3) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 11/78 ... repository is empty 47/82 ... ok 47/84 ... ok 47/85 ... ok 16/87 ... ok 47/89 ... ok 47/91 ... ok 47/92 ... ok 47/93 ... ok 47/94 ... ok 110/95 ... ok 110/96 ... ok 110/97 ... ok 110/98 ... ok 110/99 ... ok 125/100 ... ok 125/101 ... ok 110/104 ... ok 130/106 ... ok 110/107 ... ok 110/109 ... ok 110/110 ... ok 125/111 ... ok 110/112 ... ok 125/113 ... ok 78/114 ... ok 78/115 ... ok 110/116 ... ok 137/117 ... ok 110/118 ... ok 110/119 ... ok 110/120 ... ok 110/123 ... ok 110/124 ... ok 78/127 ... ok 110/129 ... ok 131/131 ... ok 110/135 ... ok 47/140 ... ok 110/141 ... ok 110/142 ... ok 125/143 ... ok 110/144 ... ok 47/145 ... ok 110/146 ... ok 110/148 ... ok 110/151 ... ok 110/152 ... ok 110/153 ... ok 78/154 ... ok 47/155 ... ok 78/157 ... ok 47/163 ... ok 110/166 ... ok 125/167 ... ok 47/168 ... repository is empty 110/169 ... ok 78/170 ... repository is empty 47/171 ... ok 47/172 ... ok 110/173 ... ok 150/176 ... ok 110/178 ... ok 118/179 ... ok 78/180 ... ok 78/181 ... ok 110/182 ... ok 150/184 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 11/78 ... yes 47/82 ... yes 47/84 ... yes 47/85 ... yes 16/87 ... yes 47/89 ... yes 47/91 ... yes 47/92 ... yes 47/93 ... yes 47/94 ... yes 110/95 ... yes 110/96 ... yes 110/97 ... yes 110/98 ... yes 110/99 ... yes 125/100 ... yes 125/101 ... yes 110/104 ... yes 130/106 ... yes 110/107 ... yes 110/109 ... yes 110/110 ... yes 125/111 ... yes 110/112 ... yes 125/113 ... yes 78/114 ... yes 78/115 ... yes 110/116 ... yes 137/117 ... yes 110/118 ... yes 110/119 ... yes 110/120 ... yes 110/123 ... yes 110/124 ... yes 78/127 ... yes 110/129 ... yes 131/131 ... yes 110/135 ... yes 47/140 ... yes 110/141 ... yes 110/142 ... yes 125/143 ... yes 110/144 ... yes 47/145 ... yes 110/146 ... yes 110/148 ... yes 110/151 ... yes 110/152 ... yes 110/153 ... yes 78/154 ... yes 47/155 ... yes 78/157 ... yes 47/163 ... yes 110/166 ... yes 125/167 ... yes 47/168 ... yes 110/169 ... yes 78/170 ... yes 47/171 ... yes 47/172 ... yes 110/173 ... yes 150/176 ... yes 110/178 ... yes 118/179 ... yes 78/180 ... yes 78/181 ... yes 110/182 ... yes 150/184 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.5) Git version >= 2.9.5 ? ... yes (2.18.1) Git user has default SSH configuration? ... no Try fixing it: mkdir ~/gitlab-check-backup-1541502247 sudo mv /var/opt/gitlab/.ssh/authorized_keys.bak ~/gitlab-check-backup-1541502247 For more information see: doc/ssh/README.md in section "SSH on the GitLab server" Please fix the error above and rerun the checks. Active users: ... 45 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Assignee Loading
Time tracking Loading