Fix webIDEUrl for relative URL case
Issue: Incorrect Web IDE URL constructed when relative... (#477551 - closed)
What does this MR do and why?
This MR fixes a bug with webIDEUrl
when the project path contains a string matching relative_url_root
.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
No relative URL | With relative URL |
---|---|
Regression testing: Web IDE URL is constructed correctly as expected. |
Web IDE URL is correct: although we encounter an error in the Here's how it looks with the |
How to set up and validate locally
Enable Web IDE OAuth flag
1. Make sure that web_ide_oauth
feature flag is enabled by visiting /gitlab/rails/features
Set up relative_url_root
locally in your GDK
relative_url_root
locally in your GDK- Stop GDK with
gdk stop
- Add
relative_url_root: "/gitlab"
to yourgdk.yml
- Run
gdk reconfigure
- In resulting
Procfile
, add-authBackend http://localhost:8080/gitlab
to the end of the line that starts withgitlab-workhorse:
(this is an issue withgitlab-workhorse
I discovered while testing. We'll fix theProcfile
generation in a separate MR) - Start GDK with
gdk start
- Now you can visit the GDK at
/gitlab
-
IMPORTANT: You might also need to disable
vite
, since that seems to haverelative_url_root
issues. https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/configuration.md#vite-settings
Related to #477551 (closed)