Skip to content

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

  1. Install GDK - https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/index.md#one-line-installation
  2. 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
  3. 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
  4. 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
  5. Browse GitLab instance. You would be able to correctly browse through group hierarchies. However, when creating a workspace, the project.http_url_to_repo and Gitlab::Routing.url_helpers.root_url return http://gitlab.example.com:3000 instead of https://gitlab.example.com.

Acceptance Criteria

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.]

Edited by 🤖 GitLab Bot 🤖