Drop sharding_key_id check constraint on runner models

What does this MR do and why?

This MR:

  • drops the sharding_key_id check constraint on runner models.
  • removes validation of sharding_key_id
  • ensures that new Ci::RunnerManager models are populated with a valid value (-1) if the parent runner has a NULL sharding_key_id. This should avoid a repeat of gitlab-com/gl-infra/production#20245 (closed) (details).

Changelog: other

Overall plan

  1. Merge MR in %18.3:

    • Drop check constraints (including NOT NULL)
    • Remove app-side validations
    • Keep code that populates the field (for backward compatibility)
  2. Merge MR in %18.4:

    • Add ignore_column directives
    • Remove ALL code that references sharding_key_id (both updating existing and populating new)
  3. Merge MR in %18.5:

    • Use PDM to physically drop the column
  4. Merge MR in %18.6:

    • Remove ignore_column directives

References

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

Merge request reports

Loading