-
Notifications
You must be signed in to change notification settings - Fork 198
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
Initialize feature flag state on the server #4295
Conversation
909d75f
to
839da3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great refactor, works as expected.
839da3d
to
bc36749
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but one small blocker on the test setup/cleanup when modifying process.env
. It's a blocker because the environment for those tests will leak into others if they themselves fail, potentially causing false-positives/negatives which would be confusing when debugging the specific failure of either of those two tests.
@@ -8,8 +8,8 @@ | |||
it doesn't count as a user preference. | |||
--> | |||
<div | |||
v-for="(group, groupIndex) in featureData.groups" | |||
:key="groupIndex" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof! Good catch to change this to a stable value 😰
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
bc36749
to
53014e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Glad for the comprehensive tests 🎉
Fixes
Fixes #4223 by @obulat
Description
This PR sets the flag states on the server init based on the
DEPLOYMENT_ENV
env variable, instead of checking the state every time we access the flag.The filtering of flags by switchable or by feature groups was moved to the store, too, to simplify the component code.
Testing instructions
The CI checks preferences and sensitive toggle, so the CI passing is a good indicator.
Go to
/preferences
and see that the features are displayed correctly and can be toggled.