Optimize Catalog::Flows::CascadeSyncFoundationalFlowsWorker Sidekiq job performance
Summary
The Catalog::Flows::CascadeSyncFoundationalFlowsWorker Sidekiq job takes too long to execute, causing timeouts in large top-level groups. This issue tracks the optimization work needed for sync_foundational_flows_service.rb.
Related Issue
This is related to #585524 (closed) which identified the timeout problem with cascading Duo Foundational Flow settings.
Problem
When cascading foundational flow settings in large groups, the worker times out before completing the sync operation. This prevents settings from being properly propagated to all subgroups and projects.
Proposed Approaches
We should consider the following optimization strategies:
Benchmark and Ensure retries, resume from last position on retries, remove unneeded code
Acceptance Criteria
- Worker completes successfully for large top-level groups (e.g., gitlab-com)
- Progress is not lost on retries
- No duplicate processing of already-synced items
Edited by Alper Akgun