Skip to content

Add runner_type, sharding_key_id columns to ci_runner_machines

🚨 NOTE: There is urgency in getting this MR merged soon, since the batched background migrations must make it to %17.5 (which is a required stop), so we can finalize them in %17.6 🚨

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 and sharding_key_id columns to the ci_runner_machines table.
  • Adds logic to populate runner_type and sharding_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

Merge request reports

Loading