FF Cleanup - cost factor admin
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
Today we have the subsidized cost factor 0.008 that overrides the runner cost factors public_projects_minutes_cost_factor or private_projects_minutes_cost_factor depending on some conditions (if the project exists in a namespace created after July 2021, or if the project is a fork of a public project, etc.).
After we enforce CI minutes for all public projects we should remove this condition in the code and convert the cost factor to be set in the database. We realized that choosing a cost factor based on the project visibility become irrelevant. We need to switch cost factor based on standard condition (applied to most of the projects) and discounted condition (subsidized cost factor applied based on some rules: e.g. project is fork of OSS project).
Plan
| Step | Issue |
|---|---|
Add new columns ci_runners.discounted_cost_factor with DEFAULT 0.008 and ci_runners.standard_cost_factor with DEFAULT 1.0
|
#363215 (closed) |
| Add feature flag to switch to the new columns (cost factor, Admin UI, RunnerMatcher, GraphQL) | #363216 |
| Enable the feature flag | #352420 |
| Cleanup old cost factor columns |
|
Full plan described in #352420
Proposal
Step 4 of #352420
Cleanup old cost factor columns
- Remove
Ci::Minutes::CostFactor#for_visibilitysince we will determine cost factor based on a new algorithm. - Remove references to
public_projects_minutes_cost_factorandprivate_projects_minutes_cost_factor.