FOSS master broken due to missing `tmp/tests` for `gitlab_workhorse_secret`
It started failing at https://gitlab.com/gitlab-org/gitlab-foss/-/jobs/466589139 for setup-test-env
, starting from gitlab-foss@219eead2 where it changed config/gitlab.yml.example
and added:
workhorse:
secret_file: tmp/tests/gitlab_workhorse_secret
This might cause tmp/tests
being removed at some point, because we're trying to Gitlab::Workhorse.write_secret
where it's writing the secret, the error:
Errno::ENOENT: No such file or directory @ rb_sysopen - tmp/tests/gitlab_workhorse_secret
/builds/gitlab-org/gitlab-foss/lib/gitlab/jwt_authenticatable.rb:35:in `initialize'
/builds/gitlab-org/gitlab-foss/lib/gitlab/jwt_authenticatable.rb:35:in `open'
/builds/gitlab-org/gitlab-foss/lib/gitlab/jwt_authenticatable.rb:35:in `write_secret'
/builds/gitlab-org/gitlab-foss/config/initializers/gitlab_workhorse_secret.rb:4:in `rescue in <main>'
/builds/gitlab-org/gitlab-foss/config/initializers/gitlab_workhorse_secret.rb:1:in `<main>'
Should only happen when tmp/tests
doesn't exist, because we're trying to write into it not read from it.