Expose the standard_factor field from the ci_cost_settings table in the UI.
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Overview
We have heard from many customers that effectively managing CI compute costs is a critical problem. One common challenge is how to allocate the costs of running CI/CD jobs on instance runners to various business lines, departments, or cost centers.
Today, we offer the Runner Fleet dashboard at the Admin and Group Levels, which includes the runner usage by groups/projects exported as a CSV feature. This is a good enough option for some customers to address the question, "which of my lines of business, teams, or organizations drove increased spending and usage?" In other words, we solve the problem of cost allocation—show back, which is the reporting of usage incurred by a specific business unit.
Other customers seek enhanced capabilities, enabling them to implement cost allocation easily via a chargeback model, which is "an actual charge to via accounting systems based on defined categories."
To support a chargeback model, in at least one instance, we have had customers request that we expose to an interface that enables customer admins to set cost factors for various runner types, similar to the model used on GitLab-hosted runners.
Proposal: 2024-11-20
-
In the Fleet Visibility team call @pedropombeiro proposed simply exposing the
standard_factorfield from theci_cost_settingstable in the UI. -
The
standard_factorfield will be a user editable value and therefore this can be used to set the cost value for chargebacks.
With that approach, if we decide in the future to build out capabilities for cost factor management that customers can use, then at least we have started with the same data structures.
Proposal - old
This proposal is positioned as a boring, initial solution to the more intensive requirement.
Add a field to the runner data model titled runner_chargeback_rate.
This field is a user-editable field that can store values in decimal format.
Example data model for ci_runners
| id | description | ip_address | active | paused | is_shared | runner_type | name | online | status | runner_chargeback_rate |
|---|---|---|---|---|---|---|---|---|---|---|
| 16 | null | null | true | false | true | instance_type | null | true | online | 0.01 |
| 17 | null | null | true | false | true | instance_type | null | true | online | 0.03 |
Example data report - Compute minutes used by instance runners (CSV -> spreadsheet)
| Project path | Usage (min) | charge_back_value | compute_cost (charge_back_value x usage) |
|---|---|---|---|
| Software Eng Group / Merge trains | 3460 | 0.03 | 103.80 |
| SRE group / Project Phoenix | 594 | 0.02 | 59.40 |
Technical implementation details
- {placeholder}
