Add feature flags per IAM reconciliation sweep
What does this MR do and why?
Adds one ops feature flag for each Layer 4 sweep of the Authn::IamReplication::ReconciliationWorker:
iam_replication_reconciliation_oauth_applicationsiam_replication_reconciliation_oauth_access_tokens
Each sweep runs only when its own flag is on. The two flags do not depend on each other or on iam_data_replication, which keeps gating Layers 1-3. When a flag is off, the run stops before it reads the cursor, so the next run continues from the same place.
The backfill into an empty IAM must finish one application pass before the token pass starts, or IAM refuses the tokens (failed_precondition). Today the only control is the entry in config/schedule.yml, so each change needs an MR and a deploy. With these flags, we change the order with ChatOps.
Both flags are off by default. Today the sweeps run where iam_data_replication is on (staging), so on deploy both sweeps stop there until their flags are on. On self-managed nothing changes, because the new flags are off by default. No docs change: the "All feature flags" page is generated from the flag YAML files.
References
- Staging backfill: https://gitlab.com/gitlab-org/gitlab/-/work_items/634258
- Production backfill: https://gitlab.com/gitlab-org/gitlab/-/work_items/634260
- Replaces !266406 (closed) (closed without a merge).
- Rollout issues: #638572 (applications), #638573 (tokens)
How to set up and validate locally
bin/rspec spec/workers/authn/iam_replication/reconciliation_worker_spec.rb