Adoption by Group table links throw 404 when GitLab is configured with a relative URL
Summary
When a self-managed Ultimate GitLab instance is configured with a relative URL, /admin/dev_ops_reports
"Adoption by Group" table renders incomplete links.
Relevant ticket info:
- US Federal ticket (Internal access to verified US Citizens only)
- SFDC (internal)
Steps to reproduce
The following steps only apply for Ultimate licensed instances:
- Configure GitLab under a relative URL --
https://domain/gitlab
- Visit
https://domain/gitlab/admin/dev_ops_reports
- Visit group/subgroup in "Adoption by Group" table
Example Project
What is the current bug behavior?
At present, links are rendered with https://domain/groups/group-name
, throwing a 404 error. This is dude to the URI missing the relative URL
What is the expected correct behavior?
GitLab should present the links as https://domain/gitlab/groups/group-name
in /admin/dev_ops_reports
Relevant logs and/or screenshots
==> /var/log/gitlab/nginx/gitlab_error.log <==
2022/11/29 21:21:39 [error] 2541016#0: *22963 open() "/var/opt/gitlab/nginx/html/groups/subgroup-1/-/analytics/devops_adoption" failed (2: No such file or directory), client: 107.211.59.65, server: domain, request: "GET /groups/subgroup-1/-/analytics/devops_adoption HTTP/1.1", host: "domain", referrer: "http://domain/gitlab/admin/dev_ops_reports"
==> /var/log/gitlab/nginx/gitlab_access.log <==
107.211.59.65 - - [29/Nov/2022:21:21:39 +0000] "GET /groups/subgroup-1/-/analytics/devops_adoption HTTP/1.1" 404 1625 "http://domain/gitlab/admin/dev_ops_reports" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36" 1.99
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
$ gitlab-rake gitlab:env:info System information System: Ubuntu 20.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.7.5p203 Gem Version: 3.1.6 Bundler Version:2.3.15 Rake Version: 13.0.6 Redis Version: 6.2.7 Sidekiq Version:6.4.2 Go Version: unknown GitLab information Version: 15.5.4-ee Revision: d3dda7548e0 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.10 URL: http://domain/gitlab HTTP Clone URL: http://domain/gitlab/some-group/some-project.git SSH Clone URL: git@domain:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 14.12.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Results of GitLab application Check
Expand for output related to the GitLab application check
$ gitlab-rake gitlab:check SANITIZE=true Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 14.12.0 ? ... OK (14.12.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
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? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 2/1 ... yes 1/2 ... yes 1/3 ... yes 1/4 ... yes 1/5 ... yes 14/6 ... yes 14/7 ... yes 2/8 ... yes 2/9 ... yes 22/10 ... yes 17/11 ... yes 17/12 ... yes Redis version >= 6.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.5) Git user has default SSH configuration? ... yes Active users: ... 11 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x-8.x or OpenSearch version 1.x ... skipped (Advanced Search is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished