[Feature flag] Rollout of skip_pipelines_for_mirror_first_sync_non_default_branches
Summary
This issue tracks the rollout of the skip_pipelines_for_mirror_first_sync_non_default_branches feature flag.
When a pull mirror performs its first sync, it imports all branches and tags from the upstream repository. Previously, this triggered a pipeline for every branch and tag, causing a "pipeline explosion" that could overwhelm CI resources.
This feature flag gates the fix that ensures only the default branch triggers a pipeline on first sync, while other branches and tags are created without triggering pipelines.
Owners
- Team: Source Code
- Most appropriate slack channel to reach out to: #g_source_code
- Best individual to reach out to: @kerrizor
Expectations
What are we expecting to happen?
When enabled, pull mirror first sync will:
- Create the default branch normally (pipeline runs)
- Create all other branches with
skip_ci(no pipelines) - Create all tags with
create_pipelines: false(no pipelines)
Subsequent delta syncs continue to work normally.
What might happen if this goes wrong?
- Worst case: Default branch pipeline doesn't run on first sync (user would need to manually trigger)
- The fix includes proper first-sync detection, so delta syncs should be unaffected
What can we monitor to detect problems?
- Monitor for user reports of missing pipelines after mirror setup
- Check Sidekiq error rates for
RepositoryUpdateMirrorWorker
Rollout Steps
Rollout on GitLab.com 🚀
- Enable on GitLab.com for a small percentage of projects
Feature.enable_percentage_of_actors(:skip_pipelines_for_mirror_first_sync_non_default_branches, 5) - Monitor for errors/issues
- Increase to 50%
Feature.enable_percentage_of_actors(:skip_pipelines_for_mirror_first_sync_non_default_branches, 50) - Monitor for errors/issues
- Enable for 100%
Feature.enable(:skip_pipelines_for_mirror_first_sync_non_default_branches)
Rollout on Self-managed 🚢
- Ensure the feature flag is removed in a future release (flag type is
gitlab_com_deriskwith 2-month max lifespan)
Rollback Steps
If something goes wrong:
Feature.disable(:skip_pipelines_for_mirror_first_sync_non_default_branches)Related Links
- Implementation MR: !247467 (merged)
- Original issue: #598486
- Related incident: https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/incident-management/-/issues/3336