Backfilling ci_pipelines project_id
What does this MR do and why?
Backfilling ci_pipelines project_id
Setting up a batched migration that will populate this value from either the builds or merge_request association if present
Otherwise will delete the pipeline
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.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Update a couple of
ci_pipelines
so that they don't have aproject_id
- Test 3 cases
- No project_id, but have builds that have a project_id
- No project_id, but has a merge_request that has a project_id
- No project_id and has no associations
- Running the migration will backfill the project_id if applicable otherwise delete the pipeline
Related to #463405
Edited by Max Fan