This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(flagpole): Updates feature flag docs for Flagpole rollout (#1299)
Co-authored-by: Mark Story <mark@mark-story.com>
- Loading branch information
1 parent
db8730b
commit d79b239
Showing
4 changed files
with
124 additions
and
85 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Options Backed Features [DEPRECATED] | ||
Options backed features using the `OPTIONS` strategy enum were a temporary stopgap | ||
that was used to formalize options-backed feature flags. These have since been | ||
replaced by [Flagpole](/feature-flags/flagpole/), which is Sentry's preferred | ||
means of setting feature flags now. | ||
|
||
|
||
## Building your options based feature | ||
Declare your feature in sentry/features/temporary.py or | ||
sentry/features/permanent.py like so: | ||
```python | ||
manager.add("organizations:your-new-flag", OrganizationFeature, FeatureHandlerStrategy.OPTIONS) | ||
``` | ||
|
||
This automatically registers a feature handler for you in getsentry, and also | ||
auto registers the relevant options. | ||
|
||
To roll out your feature, you'll want to set the rollout options via options | ||
automator. To figure out the options you need to configure, you can run the | ||
following script in getsentry: | ||
```python | ||
./bin/generate_automator_feature_options.py --flag organizations:your-new-flag | ||
``` | ||
|
||
It will then produce output like | ||
|
||
```python | ||
Generating automator options for feature flag `organizations:your-new-flag` | ||
Add these to the appropriate file in options automator to roll out your feature | ||
For example, to roll out in the US, you can add them to https://github.com/getsentry/sentry-options-automator/blob/main/options/regions/us/app.yaml | ||
To roll out to all production regions, you can add them to https://github.com/getsentry/sentry-options-automator/blob/main/options/default/app.yaml | ||
Options: | ||
organizations.your-new-flag.la-rollout: 0.0 | ||
organizations.your-new-flag.ea-rollout: 0.0 | ||
organizations.your-new-flag.ga-rollout: 0.0 | ||
organizations.your-new-flag.la-orgs: [ | ||
"codecov", | ||
"sentry", | ||
"sentry-sdks", | ||
"sentry-test", | ||
"sentry-st", | ||
"sentry-emerging-tech", | ||
"specto-dev", | ||
] | ||
``` | ||
|
||
Open a pr in https://github.com/getsentry/sentry-options-automator to set | ||
these options and you can roll out your feature flag. You can also customize | ||
which orgs will be in your la rollout by modifying `la-orgs` |