Skip to content

Add cost factor fields to ci runners

Aleksei Lipniagov requested to merge 210570-add-cost-factors-to-ci-runners into master

What does this MR do?

Following the Proposal one in #210570 (closed), we add additional cost factor fields into ci_runners table.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Run the migration locally and check that it worked.

DB Migration output

gitlab git:210570-add-cost-factors-to-ci-runners ❯ be rails db:migrate                                                                                                          ⏎
== 20200320112455 AddCostFactorFiledsToCiRunners: migrating ===================
-- transaction_open?()
   -> 0.0000s
-- execute("SET statement_timeout TO 0")
   -> 0.0002s
-- transaction()
-- add_column(:ci_runners, :public_projects_minutes_cost_factor, :float, {:default=>nil})
   -> 0.0013s
-- change_column_default(:ci_runners, :public_projects_minutes_cost_factor, 0.0)
   -> 0.0018s
   -> 0.0035s
-- columns(:ci_runners)
   -> 0.0011s
-- transaction_open?()
   -> 0.0000s
-- exec_query("SELECT COUNT(*) AS count FROM \"ci_runners\"")
   -> 0.0007s
-- change_column_null(:ci_runners, :public_projects_minutes_cost_factor, false)
   -> 0.0004s
-- execute("RESET ALL")
   -> 0.0001s
-- transaction_open?()
   -> 0.0000s
-- execute("SET statement_timeout TO 0")
   -> 0.0001s
-- transaction()
-- add_column(:ci_runners, :private_projects_minutes_cost_factor, :float, {:default=>nil})
   -> 0.0005s
-- change_column_default(:ci_runners, :private_projects_minutes_cost_factor, 1.0)
   -> 0.0013s
   -> 0.0021s
-- columns(:ci_runners)
   -> 0.0010s
-- transaction_open?()
   -> 0.0000s
-- exec_query("SELECT COUNT(*) AS count FROM \"ci_runners\"")
   -> 0.0003s
-- change_column_null(:ci_runners, :private_projects_minutes_cost_factor, false)
   -> 0.0004s
-- execute("RESET ALL")
   -> 0.0001s
== 20200320112455 AddCostFactorFiledsToCiRunners: migrated (0.0106s) ==========

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Relates to #210570 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports