BulkImports: Add `pipeline_name`, `stage`, `jid` and `status` to `BulkImports::Tracker`
Context
As part of the road to a better concurrent approach (&5544) for the Gitlab Group Migration, we need a way to keep track of the status of each pipeline. Currently, the data-model already have a way to keep track of the pagination requirements for each pipeline in the bulkimport_trackers
table. Since the pagination is already scoped by pipeline, it seems to be a perfect place to add more data required by the concurrent model.
Proposed changes
- Add
stage
,jid
andstatus
toBulkImports::Tracker
- Add
attribute_alias :pipeline_name, :relation
, to make more explicit what's being saved in this column. Adding a new column would add constraints complexity sincerelation
is already required andpipeline_name
would also be required, in case of a database revert we could end up with null values on columns that have anot_null
constraint. - Add the a state machine to
BulkImports::Tracker
, similar to the one inBulkImports::Entity
Based on the spike: !54970 (closed)
Edited by Kassio Borges