Workspaces not working for public GDK
MR: Pending
Description
Following https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/public_gdk.md to make a public GDK results in the project.http_url_to_repo
and Gitlab::Routing.url_helpers.root_url
to resolve to incorrect port(3000 instead of 443) which creates problems(e.g. project cannot be cloned and thus workspace fails).
This problem was noticed while testing Set and use fields for workspace sudo access (!163888 - merged) .
Steps to reproduce
- Install GDK - https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/index.md#one-line-installation
- Follow local network binding guide for
172.16.123.1
- https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/index.md#one-line-installation - Setup the gdk.yml
--- gitlab_k8s_agent: enabled: true listen_address: 172.16.123.1 gitlab: rails: hostname: 'gitlab.example.com' allowed_hosts: - 'gitlab.example.com' vite: enabled: true webpack: enabled: false
- Expose gdk publically - https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/public_gdk.md
cat >Caddyfile <<EOL gitlab.example.com { reverse_proxy 172.16.123.1:3000 } EOL
- Browse GitLab instance. You would be able to correctly browse through group hierarchies. However, when creating a workspace, the
project.http_url_to_repo
andGitlab::Routing.url_helpers.root_url
returnhttp://gitlab.example.com:3000
instead ofhttps://gitlab.example.com
.
Acceptance Criteria
-
Identify if this is a problem with how GDK is setup. If yes, update the instructions in https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/public_gdk.md to fix it. If not, fix the problem in the code.
Technical Requirements
TODO: Fill out or delete (optional) [If applicable, please list out any technical requirements for this feature/enhancement.]
Design Requirements
TODO: Fill out or delete (optional) [If applicable, please provide a link to the design specifications for this feature/enhancement.]
Impact Assessment
TODO: Fill out or delete (optional) [Please describe the impact this feature/enhancement will have on the user experience and/or the product as a whole.]
User Story
TODO: Fill out or delete (optional) [Provide a user story to illustrate the use case for this feature/enhancement. Include examples to help communicate the intended functionality.]