Page MenuHomePhabricator

Feature Flag component
ClosedPublic

Authored by sashank on Aug 9 2019, 8:35 PM.

Details

Reviewers
alangenfeld
Group Reviewers
Restricted Project
Commits
R1:e4cd32f2217d: Feature Flag component
Summary

Create a config file (.dagsterrc) stored in $DAGSTER_HOME with feature flags for dagit. These flags can be queries using graphql:

query {
  enabledFeatures
}

Example config:

[FEATURES]
ShowSchedule=
Test Plan

Added feature flag in TopNav.tsx

Diff Detail

Repository
R1 dagster
Branch
feature-flag
Lint
Lint OK
Unit
No Unit Test Coverage

Event Timeline

sashank created this revision.Aug 9 2019, 8:35 PM
sashank edited the summary of this revision. (Show Details)Aug 9 2019, 8:39 PM
sashank edited the test plan for this revision. (Show Details)
sashank updated this revision to Diff 3567.Aug 9 2019, 8:46 PM

Add check

alangenfeld requested changes to this revision.Aug 9 2019, 8:54 PM
alangenfeld added a subscriber: alangenfeld.

should we be more explicit with experimental status in the name of the section or the feature?

js_modules/dagit/src/FlaggedFeature.js
10–20

will this end up re-executing the query every time it is used on the page? im not familiar with how apollo handles stuff like this

it would be nice to have both a module API as well as this component API for working with feature flags - so building out a module level version might be the best path to solve for both

python_modules/dagster/dagster/utils/__init__.py
257

prefer something a little more explicit and not hidden dagster.cfg, dagster.ini

This revision now requires changes to proceed.Aug 9 2019, 8:54 PM
alangenfeld added inline comments.Aug 9 2019, 8:57 PM
python_modules/dagster/dagster/utils/__init__.py
257

this should check for is_dagster_home_set and continue gracefully

sashank marked 2 inline comments as done.Aug 9 2019, 9:27 PM
sashank updated this revision to Diff 3571.Aug 9 2019, 9:28 PM

Update config location + add fetchPolicy

sashank updated this revision to Diff 3572.Aug 9 2019, 9:30 PM

Change && to || in Query data check

sashank marked an inline comment as done.Aug 9 2019, 9:33 PM
sashank added inline comments.
js_modules/dagit/src/FlaggedFeature.js
10–20

The cache-first fetchPolicy makes sure to use the cache first.

As per discussion, will implement the module API later when needed

alangenfeld accepted this revision.Aug 9 2019, 9:46 PM
alangenfeld added inline comments.
js_modules/dagit/src/TopNav.tsx
64

nit: scheduler or experimentalScheduler feel better to me

This revision is now accepted and ready to land.Aug 9 2019, 9:46 PM
sashank updated this revision to Diff 3575.Aug 9 2019, 11:01 PM
sashank marked an inline comment as done.

Rename flag

This revision was automatically updated to reflect the committed changes.