-
Notifications
You must be signed in to change notification settings - Fork 9
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
SIMSBIOHUB-79: Feature Flag Guard #1219
Conversation
ba07abf
to
2598d77
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1219 +/- ##
==========================================
+ Coverage 56.43% 56.45% +0.01%
==========================================
Files 576 577 +1
Lines 17626 17645 +19
Branches 2745 2749 +4
==========================================
+ Hits 9948 9962 +14
- Misses 7014 7018 +4
- Partials 664 665 +1 ☔ View full report in Codecov by Sentry. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1219 +/- ##
==========================================
+ Coverage 53.26% 53.29% +0.02%
==========================================
Files 547 548 +1
Lines 16237 16256 +19
Branches 2519 2523 +4
==========================================
+ Hits 8649 8663 +14
- Misses 7007 7011 +4
- Partials 581 582 +1 ☔ View full report in Codecov by Sentry. |
Openshift URLs for the PR Deployment: |
Quality Gate passedIssues Measures |
Quality Gate passedIssues Measures |
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.
S H I P I T
Links to Jira Tickets
(must have been deleted or removed)
Description of Changes
Adds a new env var FEATURE_FLAGS which is a general purpose flag variable that can be used to disable frontend or backend features as needed.
APP
Adds a new type of guard that uses the FEATURE_FLAGS vars to disable child components.
The guard can be used to wrap components, which will be rendered as normal unless feature flags are specified and at least one matching flag is defined in the associated env var.
Replaced the
REACT_APP_BIOHUB_FEATURE_FLAG
with a new feature flag:APP_FF_SUBMIT_BIOHUB
API
Included the feature flags in the api pipeline/docker-compose as well, and added some helper util functions for working with the feature flag env var.
Replaced the
BACKBONE_INTAKE_ENABLED
with a new feature flag:API_FF_SUBMIT_BIOHUB
Testing Notes
Ex: If you set the FEATURE_FLAGS var in
.env
toFEATURE_FLAGS=APP_FF_SUBMIT_BIOHUB
the publish button should be hidden from the UI.