When creating an MR targeting a stable branch, the stable upstream branches are not pulled
I found out a bug in our pipelines when submitted !3428 (closed) and it failed in the test_global_nav_links
job:
public/runner/index.html:
[ ERROR ] internal_links - broken reference to file:///ee/administration/operations/extra_sidekiq_processes.html
[ ERROR ] internal_links - broken reference to file:///ee/administration/operations/extra_sidekiq_routing.html
[ ERROR ] internal_links - broken reference to file:///ee/administration/operations/sidekiq_memory_killer.html
[ ERROR ] internal_links - broken reference to file:///ee/operations/tracing.html
The MR is targeting the 15.5 branch, but compile_dev
pulls from the default upstream branches. It should pull the 15.5 instead.
As we can see, the 15-5-stable-ee
branch contains those files that fail https://gitlab.com/gitlab-org/gitlab/-/tree/15-5-stable-ee/doc/administration/operations. However, since the job pulls the files from master
, it cannot find them because they changed location https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc/administration/operations.
Proposal
If there's a way to check the target branch with an env variable, we should use it to pull from the right branches. Probably set it in https://gitlab.com/gitlab-org/gitlab-docs/-/blob/4461d4b78188042f0b42da1a69a58ecfbd74f4f1/lib/tasks/task_helpers.rb#L37.