Skip to content

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

  1. Update a couple of ci_pipelines so that they don't have a project_id
  2. Test 3 cases
    1. No project_id, but have builds that have a project_id
    2. No project_id, but has a merge_request that has a project_id
    3. No project_id and has no associations
  3. Running the migration will backfill the project_id if applicable otherwise delete the pipeline

Related to #463405

Edited by Max Fan

Merge request reports