restore spec failing in master and 1-1-stable
Pipeline here: https://gitlab.com/charts/gitlab/-/jobs/96354098
Error is:
== 20180826111825 RecalculateSiteStatistics: migrating ========================
-- transaction()
-- execute("SET LOCAL statement_timeout TO 0")
-> 0.0004srake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
No such file or directory @ rb_sysopen - config/prometheus/common_metrics.yml
/srv/gitlab/db/importers/common_metrics_importer.rb:39:in `initialize'
/srv/gitlab/db/migrate/20180831164910_import_common_metrics.rb:11:in `new'
/srv/gitlab/db/migrate/20180831164910_import_common_metrics.rb:11:in `up'
The file does actually exist, but the migration is currently looking for it in the wrong place.
Our task runner does not cd into a the gitlab directory here: https://gitlab.com/gitlab-org/build/CNG/blob/master/gitlab-task-runner/scripts/bin/gitlab-rake (unlike omnibus, which does have it's gitlab-rake wrapper cd to the folder)
For us in the distribution team, we should update the task-runner to cd to the gitlab directory in the rake task wrapper.
@ayufan should the common metrics importer scope to Rails.root
as well? https://gitlab.com/gitlab-org/gitlab-ce/blob/master/db/importers/common_metrics_importer.rb#L38