Skip to content

Populate next_run_at for PipelineSchedules

What does this MR do and why?

This MR is the first step towards making ci_pipeline_schedule's next_run_at not nullable.

It introduces a batched background migration (BBM) to update all of the existing invalid records which are 235. We decided to use a BBM because in order to get the value to populate the field with, we need to make a service call.

The code that triggers the values to be set to null is disabled under the enforce_full_refs_for_pipeline_schedules Feature Flag, which is currently disabled on production.

Next Steps:

  • Finalize the BBM on a separate MR after it is executed successfully
  • Introduce not null rails validations + DB constraints

Related to #442235 (closed)

Edited by Panos Kanellidis

Merge request reports