Skip to content
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

chore(config): Migrating ENABLE_JAVASCRIPT_CONTROLS from app config to a feature flag #19113

Merged
merged 9 commits into from
Mar 14, 2022

Conversation

rusackas
Copy link
Member

@rusackas rusackas commented Mar 10, 2022

SUMMARY

This PR moves the boolean enablement of the JS controls (i.e. custom tooltips in the DeckGL viz) from app configuration to feature flags. Two main reasons:

  1. To better support deployments who manage feature flags on the fly... this seems more fitting in that area of configuration
  2. To move the feature (with its self-admitted risks, and unknown level of community adoption) to the Feature Flag lifecycle, wherein we may more systematically either secure the feature's development and enablement, or deprecate it and replace it with a newer feature (e.g. jinja/markdown tooltips).

This is considered a breaking change since certain deployments may rely on enabling/disabling this feature, and they may have to adapt their configuration to set it in a new place.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

n/a

TESTING INSTRUCTIONS

Turn on the flag, and see that it works! We can (and shall!) do this on an ephemeral environment on this PR.

ADDITIONAL INFORMATION

@rusackas rusackas added v2.0 risk:breaking-change Issues or PRs that will introduce breaking changes labels Mar 10, 2022
@codecov
Copy link

codecov bot commented Mar 10, 2022

Codecov Report

Merging #19113 (94e458c) into master (3a78165) will increase coverage by 0.00%.
The diff coverage is 66.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #19113   +/-   ##
=======================================
  Coverage   66.52%   66.52%           
=======================================
  Files        1645     1645           
  Lines       63524    63522    -2     
  Branches     6462     6462           
=======================================
- Hits        42260    42259    -1     
+ Misses      19592    19590    -2     
- Partials     1672     1673    +1     
Flag Coverage Δ
hive 52.62% <100.00%> (-0.01%) ⬇️
javascript 51.27% <0.00%> (+<0.01%) ⬆️
mysql 81.83% <100.00%> (-0.01%) ⬇️
postgres 81.88% <100.00%> (-0.01%) ⬇️
presto 52.47% <100.00%> (-0.01%) ⬇️
python 82.31% <100.00%> (-0.01%) ⬇️
sqlite 81.63% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ackages/superset-ui-core/src/utils/featureFlags.ts 100.00% <ø> (ø)
...reset-chart-deckgl/src/utilities/Shared_DeckGL.jsx 86.48% <0.00%> (+2.27%) ⬆️
superset/config.py 91.79% <ø> (-0.03%) ⬇️
superset/views/utils.py 80.93% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a78165...94e458c. Read the comment docs.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 11, 2022
@rusackas rusackas changed the title chore(feature flags): Migrating ENABLE_JAVASCRIPT_CONTROLS from app config to a feature flag chore(feature flags): [WIP] Migrating ENABLE_JAVASCRIPT_CONTROLS from app config to a feature flag Mar 11, 2022
@rusackas rusackas changed the title chore(feature flags): [WIP] Migrating ENABLE_JAVASCRIPT_CONTROLS from app config to a feature flag chore(feature flags): Migrating ENABLE_JAVASCRIPT_CONTROLS from app config to a feature flag Mar 11, 2022
@rusackas rusackas changed the title chore(feature flags): Migrating ENABLE_JAVASCRIPT_CONTROLS from app config to a feature flag chore(config): Migrating ENABLE_JAVASCRIPT_CONTROLS from app config to a feature flag Mar 11, 2022
@rusackas
Copy link
Member Author

Note that in testing, I was encountering potential bugs and usability issues with the JS controls features. However, I was encountering this in both app config and feature flag modes. The intent of this PR is to move the configuration, not to stop and address issues with the feature itself.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's my understanding that the feature flag dict in config.py is meant for temporarily enabling features that aren't yet considered stable. However, anything that needs to be permanently customizable should be a global config flag. For this reason it can be argued that the ENABLE_TEMPLATE_PROCESSING flag should also be moved back to a global config flag. It would be good to hear other people's thoughts on this - @dpgaspar @john-bodley , any thoughts?

@rusackas
Copy link
Member Author

It's my understanding that the feature flag dict in config.py is meant for temporarily enabling features that aren't yet considered stable. However, anything that needs to be permanently customizable should be a global config flag. For this reason it can be argued that the ENABLE_TEMPLATE_PROCESSING flag should also be moved back to a global config flag. It would be good to hear other people's thoughts on this - @dpgaspar @john-bodley , any thoughts?

Agreed, and a part of the motivation to move this back to a feature flag is to de-stabilize the feature. Due to potential bugs, UX difficulties, and security concerns, I think we can move to deprecate it and replace it with a safer/simpler feature in coming versions.

But I must confess this also selfishly provides our org with an easier means to tweak the setting easily with the way we manage deployments, while its deprecation is being considered

Copy link
Member

@suddjian suddjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javascript controls are a feature, this is a flag for that feature, it's a feature flag. QED 😁

@rusackas rusackas merged commit 76b4a14 into master Mar 14, 2022
@rusackas rusackas deleted the javascript-controls-ff branch March 14, 2022 14:54
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset-io risk:breaking-change Issues or PRs that will introduce breaking changes size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2.0] change the ENABLE_JAVASCRIPT_CONTROLS from a config value to a feature flag
5 participants