Drop sharding_key_id check constraint on runner models
What does this MR do and why?
This MR:
- drops the
sharding_key_idcheck constraint on runner models. - removes validation of
sharding_key_id - ensures that new
Ci::RunnerManagermodels are populated with a valid value (-1) if the parent runner has a NULLsharding_key_id. This should avoid a repeat of gitlab-com/gl-infra/production#20245 (closed) (details).
Changelog: other
Overall plan
-
Merge MR in %18.3:
- Drop check constraints (including
NOT NULL) - Remove app-side validations
- Keep code that populates the field (for backward compatibility)
- Drop check constraints (including
-
Merge MR in %18.4:
- Add
ignore_columndirectives - Remove ALL code that references
sharding_key_id(both updating existing and populating new)
- Add
-
Merge MR in %18.5:
- Use PDM to physically drop the column
-
Merge MR in %18.6:
- Remove
ignore_columndirectives
- Remove
References
- Drop check constraints on sharding_key_id colum... (#557226 - closed)
- Ignore `sharding_key_id` column on runner models (!197682 - merged)
- Revert "Merge branch 'pedropombeiro/547654/igno... (!198810 - merged)
- 2025-07-22: QA smoke tests failing due to pipel... (gitlab-com/gl-infra/production#20245 - closed)
MR acceptance checklist
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