test: MM 1525 - Create a production sync job to sync feature flags from PROD#27405
test: MM 1525 - Create a production sync job to sync feature flags from PROD#27405LeVinhGithub merged 56 commits intomainfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
NicolasMassart
left a comment
There was a problem hiding this comment.
Nice work, just a few comments that require change imo:
- GH action targeting main (security risk, blocking)
- risk of label invalid values (silent failure risk, blocking)
- use of strings instead of enums in test (not blocking)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
None of these changes:
Running any E2E test tags would provide zero validation value for these changes and would waste CI resources. Performance Test Selection: |
|




Description
Automates detection of drift between the local feature flag registry and production, with CI workflow and Slack notification so the team is alerted when the registry diverges from what is live.
Why: The local feature flag registry can drift from production without notice, causing E2E or config problems.
What was added:
tests/feature-flags/sync-production-flags.ts): Fetches from production client-config API, compares to registry, and reports drift (new flags, removed flags, value mismatches, inProd mismatches). ExcludesmobileMinimumVersions.yarn feature-flags:sync,yarn feature-flags:sync:check,yarn feature-flags:sync:updateChangelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-1525
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a scheduled GitHub Actions workflow that fetches production flags, writes artifacts, and can open PRs/notify Slack, which could generate noise or unintended updates if the sync logic or API behavior is wrong.
Overview
Adds an automated production drift detector for the feature-flag registry. A new
tests/feature-flags/sync-production-flags.tsCLI fetches flags from the production client-config API, compares them totests/feature-flags/feature-flag-registry.ts, emits a JSON report, and supports--check(exit 1 on drift) and--update(rewrite registry values, add/remove entries, and flip staleinProdflags).Introduces unit coverage for drift detection and registry rewriting, and wires it into CI via a scheduled/manual GitHub Actions workflow that runs the check weekly, uploads drift artifacts, opens an automated PR with the updated registry, and posts a Slack notification when drift is found.
Written by Cursor Bugbot for commit 0bc4a67. This will update automatically on new commits. Configure here.