Skip to content

Remove any broken symlink before creating it for .gitlab_shell_secret

What does this MR do and why?

In #372223 (comment 1084237785), I discovered that under certain circumstances, /tmp/tests/gitlab-shell/.gitlab_shell_secret could be a broken symlink.

This shouldn't happen in normal cases, but since we had the problem on CI, I thought we could cope up with it so that if it ever happens on a real installation, we can automatically work around this.

This MR detects if <path-to-gitlab-shell-installation>/.gitlab_shell_secret is a broken symlink and destroys it before creating the actual non-broken symlink.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rémy Coutable

Merge request reports

Loading