-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rollout Infra] Adds the fallback flags, creates the script to upload to GCS and modifies the loading logic. #4871
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gmechali
added a commit
that referenced
this pull request
Jan 23, 2025
…n a global Var (#4869) Uploaded feature_flags.json in datcom-website-[ENV]-resources GCS buckets in format as: ` [{ "name": "autocomplete", "enabled": true }, { "name": "dev_place_experiment", "enabled": false }, { "name": "dev_place_ga", "enabled": false }] ` On server startup, it ingests this file, and exposes the feature status through api/features. Also adds an api/features/{feature_name} endpoint to expose whether it's enabled. Starts reading the feature flags for place autocomplete, place page experiment rollout and place page GA rollout. The feature flags were uploaded as: - autocomplete: Enabled for all environments - dev place experiment: Enabled for autopush - dev place GA rollout: Enabled for autopush This implementation is as outlined in https://docs.google.com/document/d/19CqgKt6aIbFs5v2zhm3TagDfPJF-K_SpH-9VPP9FeRw/edit?resourcekey=0-qM2XvR7dYp4j0jXshva04g&tab=t.0 In a followup, I will add the fallback flag values, ingest them in the load_feature_flags method, and write the script to auto update the GCS buckets. See PR - #4871
…script to update buckets.
…ment run should use the local flags.
… allowing a push to prod.
dwnoble
reviewed
Jan 23, 2025
dwnoble
approved these changes
Jan 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modifies the logic for reading the feature flags such that it falls back to local files if for some reason the GCS bucket file is not found, if there's a permission error, etc.
We also modify the logic on the 3 existing flags (autocomplete, Place page experiment, Place page GA) to represent what is needed.
We create the local files to be used as fallback, and from which the GCS files will get updated. Note that we enabled Autocomplete on all environment (for the next release). But kept Place page experiment and GA disabled for now.
Creates the script to update the GCS files from the local files.
For production, we also diff the file in the staging GCS bucket in order to ensure it has been verified.
Lastly the script is able to trigger a Kubernetes restart.
This has all been tested end to end.