Remove ci_builds.commands dependency
As of release 13.10, gitlab-exporter is throwing an error:
web_1 | ==> /var/log/gitlab/postgresql/current <==
web_1 | 2021-03-22_16:11:42.28050 ERROR: column ci_builds.commands does not exist at character 825
web_1 | 2021-03-22_16:11:42.28054 STATEMENT: SELECT
web_1 | 2021-03-22_16:11:42.28054 subquery.namespace_id,
web_1 | 2021-03-22_16:11:42.28055 subquery.shared_runners_enabled,
web_1 | 2021-03-22_16:11:42.28055 subquery.project_id,
web_1 | 2021-03-22_16:11:42.28055 subquery.status,
web_1 | 2021-03-22_16:11:42.28056 MAX(subquery.count) as count
web_1 | 2021-03-22_16:11:42.28056 FROM (
web_1 | 2021-03-22_16:11:42.28056 SELECT
web_1 | 2021-03-22_16:11:42.28056 projects.namespace_id,
web_1 | 2021-03-22_16:11:42.28057 projects.shared_runners_enabled,
web_1 | 2021-03-22_16:11:42.28057 ci_builds.project_id,
web_1 | 2021-03-22_16:11:42.28057 ci_builds.commit_id,
web_1 | 2021-03-22_16:11:42.28057 ci_builds.status,
web_1 | 2021-03-22_16:11:42.28058 COUNT(*) AS count
web_1 | 2021-03-22_16:11:42.28058 FROM ci_builds
web_1 | 2021-03-22_16:11:42.28058 JOIN projects
web_1 | 2021-03-22_16:11:42.28059 ON projects.id = ci_builds.project_id
web_1 | 2021-03-22_16:11:42.28059 JOIN namespaces
web_1 | 2021-03-22_16:11:42.28059 ON namespaces.id = projects.namespace_id
web_1 | 2021-03-22_16:11:42.28059 WHERE ci_builds.type = 'Ci::Build'
web_1 | 2021-03-22_16:11:42.28060 AND ci_builds.status IN ('running', 'pending')
web_1 | 2021-03-22_16:11:42.28060 -- The created_at filter has been introduced for performance reasons only
web_1 | 2021-03-22_16:11:42.28060 AND ci_builds.created_at > NOW() - INTERVAL '7 days'
web_1 | 2021-03-22_16:11:42.28061 GROUP BY
web_1 | 2021-03-22_16:11:42.28061 projects.namespace_id,
web_1 | 2021-03-22_16:11:42.28061 projects.shared_runners_enabled,
web_1 | 2021-03-22_16:11:42.28061 ci_builds.project_id,
web_1 | 2021-03-22_16:11:42.28062 ci_builds.commit_id,
web_1 | 2021-03-22_16:11:42.28062 ci_builds.status,
web_1 | 2021-03-22_16:11:42.28062 ci_builds.commands
web_1 | 2021-03-22_16:11:42.28062 HAVING COUNT(*) > 2
web_1 | 2021-03-22_16:11:42.28063 ) AS subquery
web_1 | 2021-03-22_16:11:42.28063 GROUP BY
web_1 | 2021-03-22_16:11:42.28063 subquery.namespace_id,
web_1 | 2021-03-22_16:11:42.28064 subquery.shared_runners_enabled,
web_1 | 2021-03-22_16:11:42.28065 subquery.project_id,
web_1 | 2021-03-22_16:11:42.28065 subquery.commit_id,
web_1 | 2021-03-22_16:11:42.28065 subquery.status
web_1 | 2021-03-22_16:11:42.28066
web_1 |
web_1 | ==> /var/log/gitlab/gitlab-exporter/current <==
web_1 | 2021-03-22_16:11:42.28078 E, [2021-03-22T16:11:42.280683 #992] ERROR -- : Error connecting to the database: ERROR: column ci_builds.commands does not exist
web_1 | 2021-03-22_16:11:42.28082 LINE 30: ci_builds.commands
web_1 | 2021-03-22_16:11:42.28083 ^
web_1 | 2021-03-22_16:11:42.28083
web_1 | 2021-03-22_16:11:42.49100 127.0.0.1 - - [22/Mar/2021:16:11:42 UTC] "GET /database HTTP/1.1" 200 1420
web_1 | 2021-03-22_16:11:42.49104 - -> /database
This error is caused by removal of the commands column via this migration.