Replace absolute URLs on related branches/MRs with relative url to avoid hostname
What does this MR do?
EE MR, https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3626
- Replace absolute URLs on related branches/MRs with relative url to avoid hostname
Are there points in the code the reviewer needs to double check?
I tested this with a relative URL but I don't think that is the actual issue because it works before this fix.
I think the problem is the same as https://gitlab.com/gitlab-org/gitlab-ce/issues/39364 and the hostname
not being honored with the _url
helper. So we switch the to relative _path
helpers which do not include the hostname
and handle a relative URL just fine.
Why was this MR needed?
When using a different hostname, the URL would point to something that doesn't exist (404). In the local development case, this may work because localhost
still responds.
I think this was broken since 8.7 when we started using the
_url
helpers for related MRs/branches, https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3678/diffs#ad9731dd71c7dbcf115e11bf539028679eba6fe9_70_70 - Is this reasonable or is thehostname
changed often and someone would have run into this sooner?https://gitlab.com/gitlab-org/gitlab-ce/issues/40555#note_50056843
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug- Do we have tests for a relative URL setup somewhere?
- Review
-
Has been reviewed by Frontend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered
What are the relevant issue numbers?
Closes #40555 (closed)