gitlab.yml port is misconfigured for CI

Right now, Capybara server is running on a (random?) port that's not 80 while our config is set to 80. This generally doesn't cause problems because we use relative paths in most parts of our application. But I noticed some JS that was using gon.gitlab_url.

The following discussion from gitlab-ee!15112 should be addressed:

  • @engwan started a discussion: (+1 comment)

    I tried setting this to our static port 45537 but apparently a lot of our tests depend on this being set to 80 (Asserting on the generated URLs, etc..).

    I think we should address this because some AJAX requests were using the absolute path and returning 404s. One example I found is: https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/assets/javascripts/repository/log_tree.js#L40

    We should probably just change that to a relative URL without gon.gitlab_url. I'm not sure why our tests have been passing all this time with the random Capybara ports. Maybe missing test coverage for that?

Edited Sep 29, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading