-
Notifications
You must be signed in to change notification settings - Fork 357
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
feat: implement feature switch [WEB-535] #5310
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for storybook-det ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
||
return ( | ||
<ul> | ||
<li>{feature.isOn('trials_comparison') && 'trials_comparison'}</li> |
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.
So that this isn't reliant on the current set of feature switches you should do a cast:
const feature1 = 'feature1' as ValidFeature
const feature2 = 'feature2' as ValidFeature
Then you can test if feature1 is on and feature2 is off.
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!
@@ -50,6 +50,8 @@ message GetMasterResponse { | |||
string branding = 9; | |||
// Feature flag for RBAC and user groups. | |||
bool rbac_enabled = 10; | |||
// List of features that is on. | |||
repeated string feature_switches = 11; |
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.
can we please tag it as = 12
? otherwise it'll conflict with this SaaS change we are yet to move to OSS.
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.
No problem
b4c0e06
to
028304d
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.
This looks good to me. Please wait for approval from @ioga before merging.
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
Description
Add
feature_switch
to master config, and every valid switch in the list is considered “on” for feature switching at front end.Test Plan
Add
feature_switch
to master configVerify that
/master
return withfeatureSwitch
Commentary (optional)
Checklist
docs/release-notes/
.See Release Note for details.