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

feat: config to customize bootstrap data overrides #16386

Merged
merged 2 commits into from
Aug 23, 2021

Conversation

suddjian
Copy link
Member

@suddjian suddjian commented Aug 20, 2021

SUMMARY

Motivation:

  • Preset needs to add some custom sequential color palettes for specific users
  • color palettes are delivered in bootstrap data, via the extra_sequential_color_schemes and extra_categorical_color_schemes fields.
  • Wanted to allow general changes to common bootstrap data as well, to allow open-ended support for customizations in Superset deployments.
  • Decided to add a function which can be configured to get these bootstrap_data.common overrides.

TESTING INSTRUCTIONS

  1. Set EXTRA_SEQUENTIAL_COLOR_SCHEMES to a function that returns a dict of { "foo": "bar" }
  2. Verify that Superset Frontend still renders, and that { "foo": "bar" } was delivered in the bootstrap data.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Aug 20, 2021

Codecov Report

Merging #16386 (1ee961d) into master (a547dcb) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16386      +/-   ##
==========================================
+ Coverage   76.63%   76.68%   +0.04%     
==========================================
  Files        1000     1000              
  Lines       53424    53980     +556     
  Branches     6818     6818              
==========================================
+ Hits        40943    41392     +449     
- Misses      12245    12352     +107     
  Partials      236      236              
Flag Coverage Δ
hive 81.38% <100.00%> (+0.04%) ⬆️
javascript 70.76% <ø> (ø)
mysql 81.72% <100.00%> (+0.12%) ⬆️
postgres 81.78% <100.00%> (+0.12%) ⬆️
presto ?
python 82.14% <100.00%> (-0.03%) ⬇️
sqlite 81.43% <100.00%> (+0.13%) ⬆️

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

Impacted Files Coverage Δ
superset/config.py 91.33% <100.00%> (+0.02%) ⬆️
superset/views/base.py 76.02% <100.00%> (+0.16%) ⬆️
superset/charts/post_processing.py 82.92% <0.00%> (-11.25%) ⬇️
superset/db_engine_specs/presto.py 84.51% <0.00%> (-5.86%) ⬇️
superset/examples/deck.py 10.25% <0.00%> (-2.25%) ⬇️
superset/utils/csv.py 98.21% <0.00%> (-1.79%) ⬇️
superset/connectors/sqla/models.py 88.28% <0.00%> (-1.43%) ⬇️
superset/reports/commands/execute.py 92.03% <0.00%> (-0.57%) ⬇️
superset/models/core.py 89.14% <0.00%> (-0.26%) ⬇️
superset/reports/notifications/email.py 100.00% <0.00%> (ø)
... and 7 more

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 a547dcb...1ee961d. Read the comment docs.

Copy link
Member

@amitmiran137 amitmiran137 left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

@suddjian suddjian merged commit 486ef6b into master Aug 23, 2021
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request Aug 24, 2021
* master: (582 commits)
  feat: config to customize bootstrap data overrides (apache#16386)
  fix: regex for multi-region IPs (apache#16410)
  chore: Changes the DatabaseSelector to use the new Select component (apache#16334)
  chore: Displays the dataset description in a tooltip in the datasets list (apache#16392)
  fix(pylint): Fix master (apache#16405)
  chore(pylint): Enable useless-suppression check (apache#16388)
  feat: Add extraVolumes and extraVolumeMounts to all main containers (apache#16361)
  initial commit (apache#16366)
  fix: big number default date format (apache#16383)
  initial commit (apache#16380)
  fix: import dashboard w/o metadata (apache#16360)
  test: Functional RTL for email report modal II (apache#16148)
  fix: update table ID in query context on chart import (apache#16374)
  docs: document FLASK_APP_MUTATOR (apache#16286)
  feat: Add new dev commands to Makefile (apache#16327)
  fix: call external metadata endpoint with correct rison object (apache#16369)
  fix: Fix parsing onSaving reports toast when user hasn't saved chart (apache#16330)
  fix: columns/index rebuild (apache#16355)
  chore(viz): bump deckgl plugin to 0.4.11 (apache#16353)
  fix: Blank space in Change dataset modal without warning message (apache#16324)
  ...

# Conflicts:
#	superset/app.py
#	superset/models/dashboard.py
#	tests/integration_tests/charts/filter_sets/__init__.py
#	tests/integration_tests/charts/filter_sets/conftest.py
#	tests/integration_tests/charts/filter_sets/consts.py
#	tests/integration_tests/charts/filter_sets/create_api_tests.py
#	tests/integration_tests/charts/filter_sets/delete_api_tests.py
#	tests/integration_tests/charts/filter_sets/get_api_tests.py
#	tests/integration_tests/charts/filter_sets/update_api_tests.py
#	tests/integration_tests/charts/filter_sets/utils.py
#	tests/integration_tests/superset_test_config.py
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
* feat: config to customize bootstrap data overrides

* comments
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
* feat: config to customize bootstrap data overrides

* comments
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the get_bootstrap_overrides branch March 26, 2024 16:12
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 size/S 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants