Add runner_type, sharding_key_id columns to ci_runner_machines
What does this MR do and why?
The changes in this MR are needed because in a future MR, we'll be creating a partitioned copy of the table with an automated trigger to copy data from ci_runner_machines
to the partitioned table. If we don't have all the required columns, the check constraint will fail on the target table.
This MR:
- Adds the
runner_type
andsharding_key_id
columns to theci_runner_machines
table. - Adds logic to populate
runner_type
andsharding_key_id
when a runner manager is created or updated. - Adds a post-deployment migration to backfill the fields from
ci_runners
.
Changelog: added
Part of #497526 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Pedro Pombeiro