Skip to content

Set public project cost factor default to match private

What does this MR do and why?

In harden cost factors we set the cost factors to 1 for public runners to match all private runners. The idea is to no longer give discounts to public runners. We will eventually remove the public cost factor column.

This MR ensures that we no longer default new public runner cost factors to 0 since all public cost factors should match private. See the conversation #363215 (comment 1282172557)

Related to #363215 (closed)

How to set up and validate locally

  1. Run the migration
    rake db:migrate
  2. View the schema definition
    psql -h /Users/allisonbrowne/gitlab/gdk/postgresql -d gitlabhq_development_ci -p 5432
    \d+ ci_runners
  3. Ensure records insert correctly
    rails c
    Ci::Runner.create!(public_projects_minutes_cost_factor: 0.0, runner_type: 'instance_type') => public_projects_minutes_cost_factor: 0.0
    Ci::Runner.create!(public_projects_minutes_cost_factor: 1.0, runner_type: 'instance_type') => public_projects_minutes_cost_factor: 1.0
    Ci::Runner.create!(runner_type: 'instance_type') => public_projects_minutes_cost_factor: 1.0
    
Edited by Allison Browne

Merge request reports