Create Columns for standard and OSS cost factor admin
What does this MR do and why?
Issue: #363215 (closed)
In Gitlab::Ci::Minutes::CostFactor
we find a cost factor based on a runner_matcher
and a project
.
-
1
standard cost factor(normally1
but could vary based on runner)- We still have remnants of public/private cost factors which are stored on the
ci_runner
but these will be going away soon and will be consolidated intostandard
. We don't want to give discounts to public projects anymore.
- We still have remnants of public/private cost factors which are stored on the
-
0.5
(if the project has an open source plan. This won't currently vary based on the runner.) -
0.008
(if the project is a open-source contribution. This won't currently vary based on runner.)
Here we introduce a new table to store these cost factors with a 1-to-1 relationship to the runner. These can then be set by admins.
Since we only bill for shared runners the table will only have 70ish rows.
How to set up and validate locally
- Migrate the database
rake db:migrate
- View the new table
psql -h <path_to_gdk>/postgresql -d gitlabhq_development_ci -p 5432 select * from ci_cost_settings; /d+ ci_cost_settings
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Allison Browne