Setting up a Development Environment

The documentation in this section is a bit of a patchwork of knowledge representing the multitude of ways that exist to run Superset (docker-compose, just “docker”, on “metal”, using a Makefile).

Now we have evolved to recommend and support docker-compose more actively as the main way to run Superset for development and preserve your sanity. Most people should stick to the first few sections - (“Fork & Clone”, “docker-compose” and “Installing Dev Tools”)

Fork and Clone

First, fork the repository on GitHub, then clone it.

Second, you can clone the main repository directly, but you won’t be able to send pull requests.

  1. git clone git@github.com:your-username/superset.git
  2. cd superset

Setting things up to squeeze an “hello world” into any part of Superset should be as simple as

  1. docker-compose up

Note that:

  • this will pull/build docker images and run a cluster of services, including:
    • A Superset Flask web server, mounting the local python repo/code
    • A Superset Celery worker, also mounting the local python repo/code
    • A Superset Node service, mounting, compiling and bundling the JS/TS assets
    • A Superset Node websocket service to power the async backend
    • Postgres as the metadata database and to store example datasets, charts and dashboards whic should be populated upon startup
    • Redis as the message queue for our async backend and caching backend
  • It’ll load up examples into the database upon first startup
  • all other details and pointers available in docker-compose.yml
  • The local repository is mounted withing the services, meaning updating the code on the host will be reflected in the docker images
  • Superset is served at localhost:8088/
  • You can login with admin/admin

Since docker-compose is primarily designed to run a set of containers on a single host and can’t credibly support high availability as a result, we do not support nor recommend using our docker-compose constructs to support production-type use-cases. For single host environments, we recommend using minikube along our installing on k8s documentation. configured to be secure.

Installing Development Tools

While docker-compose simplifies a lot of the setup, there are still many things you’ll want to set up locally to power your IDE, and things like commit hooks, linters, and test-runners. Note that you can do these things inside docker images with commands like docker-compose exec superset_app bash for instance, but many people like to run that tooling from their host.

Python environment

Assuming you already have a way to setup your python environments like pyenv, virtualenv or something else, all you should have to do is to install our dev, pinned python requirements bundle

  1. pip install -r requirements/development.txt

Git Hooks

Superset uses Git pre-commit hooks courtesy of pre-commit. To install run the following:

  1. pre-commit install

A series of checks will now run when you make a git commit.

Alternatives to docker-compose

This part of the documentation is a patchwork of information related to setting up development environments without docker-compose and are documented/supported to varying degrees. It’s been difficult to maintain this wide array of methods and insure they’re functioning across environments.

Flask server

OS Dependencies

Make sure your machine meets the OS dependencies before following these steps. You also need to install MySQL or MariaDB.

Ensure that you are using Python version 3.9, 3.10 or 3.11, then proceed with:

  1. # Create a virtual environment and activate it (recommended)
  2. python3 -m venv venv # setup a python3 virtualenv
  3. source venv/bin/activate
  4. # Install external dependencies
  5. pip install -r requirements/development.txt
  6. # Install Superset in editable (development) mode
  7. pip install -e .
  8. # Initialize the database
  9. superset db upgrade
  10. # Create an admin user in your metadata database (use `admin` as username to be able to load the examples)
  11. superset fab create-admin
  12. # Create default roles and permissions
  13. superset init
  14. # Load some data to play with.
  15. # Note: you MUST have previously created an admin user with the username `admin` for this command to work.
  16. superset load-examples
  17. # Start the Flask dev web server from inside your virtualenv.
  18. # Note that your page may not have CSS at this point.
  19. # See instructions below how to build the front-end assets.
  20. superset run -p 8088 --with-threads --reload --debugger --debug

Or you can install via our Makefile

  1. # Create a virtual environment and activate it (recommended)
  2. $ python3 -m venv venv # setup a python3 virtualenv
  3. $ source venv/bin/activate
  4. # install pip packages + pre-commit
  5. $ make install
  6. # Install superset pip packages and setup env only
  7. $ make superset
  8. # Setup pre-commit only
  9. $ make pre-commit

Note: the FLASK_APP env var should not need to be set, as it’s currently controlled via .flaskenv, however if needed, it should be set to superset.app:create_app()

If you have made changes to the FAB-managed templates, which are not built the same way as the newer, React-powered front-end assets, you need to start the app without the --with-threads argument like so: superset run -p 8088 --reload --debugger --debug

Dependencies

If you add a new requirement or update an existing requirement (per the install_requires section in setup.py) you must recompile (freeze) the Python dependencies to ensure that for CI, testing, etc. the build is deterministic. This can be achieved via,

  1. $ python3 -m venv venv
  2. $ source venv/bin/activate
  3. $ python3 -m pip install -r requirements/development.txt
  4. $ pip-compile-multi --no-upgrade

When upgrading the version number of a single package, you should run pip-compile-multi with the -P flag:

  1. $ pip-compile-multi -P my-package

To bring all dependencies up to date as per the restrictions defined in setup.py and requirements/*.in, run pip-compile-multi` without any flags:

  1. $ pip-compile-multi

This should be done periodically, but it is recommended to do thorough manual testing of the application to ensure no breaking changes have been introduced that aren’t caught by the unit and integration tests.

Logging to the browser console

This feature is only available on Python 3. When debugging your application, you can have the server logs sent directly to the browser console using the ConsoleLog package. You need to mutate the app, by adding the following to your config.py or superset_config.py:

  1. from console_log import ConsoleLog
  2. def FLASK_APP_MUTATOR(app):
  3. app.wsgi_app = ConsoleLog(app.wsgi_app, app.logger)

Then make sure you run your WSGI server using the right worker type:

  1. gunicorn "superset.app:create_app()" -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -b 127.0.0.1:8088 --reload

You can log anything to the browser console, including objects:

  1. from superset import app
  2. app.logger.error('An exception occurred!')
  3. app.logger.info(form_data)

Frontend

Frontend assets (TypeScript, JavaScript, CSS, and images) must be compiled in order to properly display the web UI. The superset-frontend directory contains all NPM-managed frontend assets. Note that for some legacy pages there are additional frontend assets bundled with Flask-Appbuilder (e.g. jQuery and bootstrap). These are not managed by NPM and may be phased out in the future.

Prerequisite

nvm and node

First, be sure you are using the following versions of Node.js and npm:

  • Node.js: Version 18
  • npm: Version 10

We recommend using nvm to manage your node environment:

  1. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
  2. incase it shows '-bash: nvm: command not found'
  3. export NVM_DIR="$HOME/.nvm"
  4. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  5. [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
  6. cd superset-frontend
  7. nvm install --lts
  8. nvm use --lts

Or if you use the default macOS starting with Catalina shell zsh, try:

  1. sh -c "$(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh)"

For those interested, you may also try out avn to automatically switch to the node version that is required to run Superset frontend.

Install dependencies

Install third-party dependencies listed in package.json via:

  1. # From the root of the repository
  2. cd superset-frontend
  3. # Install dependencies from `package-lock.json`
  4. npm ci

Note that Superset uses Scarf to capture telemetry/analytics about versions being installed, including the scarf-js npm package and an analytics pixel. As noted elsewhere in this documentation, Scarf gathers aggregated stats for the sake of security/release strategy, and does not capture/retain PII. You can read here about the scarf-js package, and various means to opt out of it, but you can opt out of the npm package and the pixel by setting the SCARF_ANALYTICS envinronment variable to false or opt out of the pixel by adding this setting in superset-frontent/package.json:

  1. // your-package/package.json
  2. {
  3. // ...
  4. "scarfSettings": {
  5. "enabled": false
  6. }
  7. // ...
  8. }

Build assets

There are three types of assets you can build:

  1. npm run build: the production assets, CSS/JSS minified and optimized
  2. npm run dev-server: local development assets, with sourcemaps and hot refresh support
  3. npm run build-instrumented: instrumented application code for collecting code coverage from Cypress tests

If while using the above commands you encounter an error related to the limit of file watchers:

  1. Error: ENOSPC: System limit for number of file watchers reached

The error is thrown because the number of files monitored by the system has reached the limit. You can address this this error by increasing the number of inotify watchers.

The current value of max watches can be checked with:

  1. cat /proc/sys/fs/inotify/max_user_watches

Edit the file /etc/sysctl.conf to increase this value. The value needs to be decided based on the system memory (see this StackOverflow answer for more context).

Open the file in editor and add a line at the bottom specifying the max watches values.

  1. fs.inotify.max_user_watches=524288

Save the file and exit editor. To confirm that the change succeeded, run the following command to load the updated value of max_user_watches from sysctl.conf:

  1. sudo sysctl -p

Webpack dev server

The dev server by default starts at http://localhost:9000 and proxies the backend requests to http://localhost:8088.

So a typical development workflow is the following:

  1. run Superset locally using Flask, on port 8088 — but don’t access it directly,
    1. # Install Superset and dependencies, plus load your virtual environment first, as detailed above.
    2. superset run -p 8088 --with-threads --reload --debugger --debug
  2. in parallel, run the Webpack dev server locally on port 9000,
    1. npm run dev-server
  3. access http://localhost:9000 (the Webpack server, not Flask) in your web browser. This will use the hot-reloading front-end assets from the Webpack development server while redirecting back-end queries to Flask/Superset: your changes on Superset codebase — either front or back-end — will then be reflected live in the browser.

It’s possible to change the Webpack server settings:

  1. # Start the dev server at http://localhost:9000
  2. npm run dev-server
  3. # Run the dev server on a non-default port
  4. npm run dev-server -- --port=9001
  5. # Proxy backend requests to a Flask server running on a non-default port
  6. npm run dev-server -- --env=--supersetPort=8081
  7. # Proxy to a remote backend but serve local assets
  8. npm run dev-server -- --env=--superset=https://superset-dev.example.com

The --superset= option is useful in case you want to debug a production issue or have to setup Superset behind a firewall. It allows you to run Flask server in another environment while keep assets building locally for the best developer experience.

Other npm commands

Alternatively, there are other NPM commands you may find useful:

  1. npm run build-dev: build assets in development mode.
  2. npm run dev: built dev assets in watch mode, will automatically rebuild when a file changes

Docker (docker compose)

See docs here

Updating NPM packages

Use npm in the prescribed way, making sure that superset-frontend/package-lock.json is updated according to npm-prescribed best practices.

Feature flags

Superset supports a server-wide feature flag system, which eases the incremental development of features. To add a new feature flag, simply modify superset_config.py with something like the following:

  1. FEATURE_FLAGS = {
  2. 'SCOPED_FILTER': True,
  3. }

If you want to use the same flag in the client code, also add it to the FeatureFlag TypeScript enum in @superset-ui/core. For example,

  1. export enum FeatureFlag {
  2. SCOPED_FILTER = "SCOPED_FILTER",
  3. }

superset/config.py contains DEFAULT_FEATURE_FLAGS which will be overwritten by those specified under FEATURE_FLAGS in superset_config.py. For example, DEFAULT_FEATURE_FLAGS = { 'FOO': True, 'BAR': False } in superset/config.py and FEATURE_FLAGS = { 'BAR': True, 'BAZ': True } in superset_config.py will result in combined feature flags of { 'FOO': True, 'BAR': True, 'BAZ': True }.

The current status of the usability of each flag (stable vs testing, etc) can be found in RESOURCES/FEATURE_FLAGS.md.

Git Hooks

Superset uses Git pre-commit hooks courtesy of pre-commit. To install run the following:

  1. pip3 install -r requirements/development.txt
  2. pre-commit install

A series of checks will now run when you make a git commit.

Alternatively it is possible to run pre-commit via tox:

  1. tox -e pre-commit

Or by running pre-commit manually:

  1. pre-commit run --all-files

Linting

Python

We use Pylint for linting which can be invoked via:

  1. # for python
  2. tox -e pylint

In terms of best practices please avoid blanket disabling of Pylint messages globally (via .pylintrc) or top-level within the file header, albeit there being a few exceptions. Disabling should occur inline as it prevents masking issues and provides context as to why said message is disabled.

Additionally, the Python code is auto-formatted using Black which is configured as a pre-commit hook. There are also numerous editor integrations

TypeScript

  1. cd superset-frontend
  2. npm ci
  3. # run eslint checks
  4. npm run eslint -- .
  5. # run tsc (typescript) checks
  6. npm run type

If using the eslint extension with vscode, put the following in your workspace settings.json file:

  1. "eslint.workingDirectories": [
  2. "superset-frontend"
  3. ]

Testing

Python Testing

All python tests are carried out in tox a standardized testing framework. All python tests can be run with any of the tox environments, via,

  1. tox -e <environment>

For example,

  1. tox -e py38

Alternatively, you can run all tests in a single file via,

  1. tox -e <environment> -- tests/test_file.py

or for a specific test via,

  1. tox -e <environment> -- tests/test_file.py::TestClassName::test_method_name

Note that the test environment uses a temporary directory for defining the SQLite databases which will be cleared each time before the group of test commands are invoked.

There is also a utility script included in the Superset codebase to run python integration tests. The readme can be found here

To run all integration tests for example, run this script from the root directory:

  1. scripts/tests/run.sh

You can run unit tests found in ‘./tests/unit_tests’ for example with pytest. It is a simple way to run an isolated test that doesn’t need any database setup

  1. pytest ./link_to_test.py

Frontend Testing

We use Jest and Enzyme to test TypeScript/JavaScript. Tests can be run with:

  1. cd superset-frontend
  2. npm run test

To run a single test file:

  1. npm run test -- path/to/file.js

Integration Testing

We use Cypress for integration tests. Tests can be run by tox -e cypress. To open Cypress and explore tests first setup and run test server:

  1. export SUPERSET_CONFIG=tests.integration_tests.superset_test_config
  2. export SUPERSET_TESTENV=true
  3. export CYPRESS_BASE_URL="http://localhost:8081"
  4. superset db upgrade
  5. superset load_test_users
  6. superset load-examples --load-test-data
  7. superset init
  8. superset run --port 8081

Run Cypress tests:

  1. cd superset-frontend
  2. npm run build-instrumented
  3. cd cypress-base
  4. npm install
  5. # run tests via headless Chrome browser (requires Chrome 64+)
  6. npm run cypress-run-chrome
  7. # run tests from a specific file
  8. npm run cypress-run-chrome -- --spec cypress/e2e/explore/link.test.ts
  9. # run specific file with video capture
  10. npm run cypress-run-chrome -- --spec cypress/e2e/dashboard/index.test.js --config video=true
  11. # to open the cypress ui
  12. npm run cypress-debug
  13. # to point cypress to a url other than the default (http://localhost:8088) set the environment variable before running the script
  14. # e.g., CYPRESS_BASE_URL="http://localhost:9000"
  15. CYPRESS_BASE_URL=<your url> npm run cypress open

See superset-frontend/cypress_build.sh.

As an alternative you can use docker compose environment for testing:

Make sure you have added below line to your /etc/hosts file: 127.0.0.1 db

If you already have launched Docker environment please use the following command to assure a fresh database instance: docker compose down -v

Launch environment:

CYPRESS_CONFIG=true docker compose up

It will serve backend and frontend on port 8088.

Run Cypress tests:

  1. cd cypress-base
  2. npm install
  3. npm run cypress open

Debugging Server App

Local

For debugging locally using VSCode, you can configure a launch configuration file .vscode/launch.json such as

  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "name": "Python: Flask",
  6. "type": "python",
  7. "request": "launch",
  8. "module": "flask",
  9. "env": {
  10. "FLASK_APP": "superset",
  11. "SUPERSET_ENV": "development"
  12. },
  13. "args": ["run", "-p 8088", "--with-threads", "--reload", "--debugger"],
  14. "jinja": true,
  15. "justMyCode": true
  16. }
  17. ]
  18. }

Raw Docker (without docker-compose)

Follow these instructions to debug the Flask app running inside a docker container. Note that this will run a barebones Superset web server,

First add the following to the ./docker-compose.yaml file

  1. superset:
  2. env_file: docker/.env
  3. image: *superset-image
  4. container_name: superset_app
  5. command: ["/app/docker/docker-bootstrap.sh", "app"]
  6. restart: unless-stopped
  7. + cap_add:
  8. + - SYS_PTRACE
  9. ports:
  10. - 8088:8088
  11. + - 5678:5678
  12. user: "root"
  13. depends_on: *superset-depends-on
  14. volumes: *superset-volumes
  15. environment:
  16. CYPRESS_CONFIG: "${CYPRESS_CONFIG}"

Start Superset as usual

  1. docker compose up

Install the required libraries and packages to the docker container

Enter the superset_app container

  1. docker exec -it superset_app /bin/bash
  2. root@39ce8cf9d6ab:/app#

Run the following commands inside the container

  1. apt update
  2. apt install -y gdb
  3. apt install -y net-tools
  4. pip install debugpy

Find the PID for the Flask process. Make sure to use the first PID. The Flask app will re-spawn a sub-process every time you change any of the python code. So it’s important to use the first PID.

  1. ps -ef
  2. UID PID PPID C STIME TTY TIME CMD
  3. root 1 0 0 14:09 ? 00:00:00 bash /app/docker/docker-bootstrap.sh app
  4. root 6 1 4 14:09 ? 00:00:04 /usr/local/bin/python /usr/bin/flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
  5. root 10 6 7 14:09 ? 00:00:07 /usr/local/bin/python /usr/bin/flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0

Inject debugpy into the running Flask process. In this case PID 6.

  1. python3 -m debugpy --listen 0.0.0.0:5678 --pid 6

Verify that debugpy is listening on port 5678

  1. netstat -tunap
  2. Active Internet connections (servers and established)
  3. Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
  4. tcp 0 0 0.0.0.0:5678 0.0.0.0:* LISTEN 462/python
  5. tcp 0 0 0.0.0.0:8088 0.0.0.0:* LISTEN 6/python

You are now ready to attach a debugger to the process. Using VSCode you can configure a launch configuration file .vscode/launch.json like so.

  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "name": "Attach to Superset App in Docker Container",
  6. "type": "python",
  7. "request": "attach",
  8. "connect": {
  9. "host": "127.0.0.1",
  10. "port": 5678
  11. },
  12. "pathMappings": [
  13. {
  14. "localRoot": "${workspaceFolder}",
  15. "remoteRoot": "/app"
  16. }
  17. ]
  18. }
  19. ]
  20. }

VSCode will not stop on breakpoints right away. We’ve attached to PID 6 however it does not yet know of any sub-processes. In order to “wake up” the debugger you need to modify a python file. This will trigger Flask to reload the code and create a new sub-process. This new sub-process will be detected by VSCode and breakpoints will be activated.

Debugging Server App in Kubernetes Environment

To debug Flask running in POD inside kubernetes cluster. You’ll need to make sure the pod runs as root and is granted the SYS_TRACE capability.These settings should not be used in production environments.

  1. securityContext:
  2. capabilities:
  3. add: ["SYS_PTRACE"]

See (set capabilities for a container)[https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container] for more details.

Once the pod is running as root and has the SYS_PTRACE capability it will be able to debug the Flask app.

You can follow the same instructions as in the docker-compose. Enter the pod and install the required library and packages; gdb, netstat and debugpy.

Often in a Kubernetes environment nodes are not addressable from outside the cluster. VSCode will thus be unable to remotely connect to port 5678 on a Kubernetes node. In order to do this you need to create a tunnel that port forwards 5678 to your local machine.

  1. kubectl port-forward pod/superset-<some random id> 5678:5678

You can now launch your VSCode debugger with the same config as above. VSCode will connect to to 127.0.0.1:5678 which is forwarded by kubectl to your remote kubernetes POD.

Storybook

Superset includes a Storybook to preview the layout/styling of various Superset components, and variations thereof. To open and view the Storybook:

  1. cd superset-frontend
  2. npm run storybook

When contributing new React components to Superset, please try to add a Story alongside the component’s jsx/tsx file.

Tips

Adding a new datasource

  1. Create Models and Views for the datasource, add them under superset folder, like a new my_models.py with models for cluster, datasources, columns and metrics and my_views.py with clustermodelview and datasourcemodelview.

  2. Create DB migration files for the new models

  3. Specify this variable to add the datasource model and from which module it is from in config.py:

    For example:

    1. ADDITIONAL_MODULE_DS_MAP = {'superset.my_models': ['MyDatasource', 'MyOtherDatasource']}

    This means it’ll register MyDatasource and MyOtherDatasource in superset.my_models module in the source registry.

Visualization Plugins

The topic of authoring new plugins, whether you’d like to contribute it back or not has been well documented in the the documentation, and in this blog post.

To contribute a plugin to Superset, your plugin must meet the following criteria:

  • The plugin should be applicable to the community at large, not a particularly specialized use case
  • The plugin should be written with TypeScript
  • The plugin should contain sufficient unit/e2e tests
  • The plugin should use appropriate namespacing, e.g. a folder name of plugin-chart-whatever and a package name of @superset-ui/plugin-chart-whatever
  • The plugin should use them variables via Emotion, as passed in by the ThemeProvider
  • The plugin should provide adequate error handling (no data returned, malformed data, invalid controls, etc.)
  • The plugin should contain documentation in the form of a populated README.md file
  • The plugin should have a meaningful and unique icon
  • Above all else, the plugin should come with a commitment to maintenance from the original author(s)

Submissions will be considered for submission (or removal) on a case-by-case basis.

Adding a DB migration

  1. Alter the model you want to change. This example will add a Column Annotations model.

    Example commit

  2. Generate the migration file

    1. superset db migrate -m 'add_metadata_column_to_annotation_model'

    This will generate a file in migrations/version/{SHA}_this_will_be_in_the_migration_filename.py.

    Example commit

  3. Upgrade the DB

    1. superset db upgrade

    The output should look like this:

    1. INFO [alembic.runtime.migration] Context impl SQLiteImpl.
    2. INFO [alembic.runtime.migration] Will assume transactional DDL.
    3. INFO [alembic.runtime.migration] Running upgrade 1a1d627ebd8e -> 40a0a483dd12, add_metadata_column_to_annotation_model.py
  4. Add column to view

    Since there is a new column, we need to add it to the AppBuilder Model view.

    Example commit

  5. Test the migration’s down method

    1. superset db downgrade

    The output should look like this:

    1. INFO [alembic.runtime.migration] Context impl SQLiteImpl.
    2. INFO [alembic.runtime.migration] Will assume transactional DDL.
    3. INFO [alembic.runtime.migration] Running downgrade 40a0a483dd12 -> 1a1d627ebd8e, add_metadata_column_to_annotation_model.py

Merging DB migrations

When two DB migrations collide, you’ll get an error message like this one:

  1. alembic.util.exc.CommandError: Multiple head revisions are present for
  2. given argument 'head'; please specify a specific target
  3. revision, '<branchname>@head' to narrow to a specific head,
  4. or 'heads' for all heads`

To fix it:

  1. Get the migration heads

    1. superset db heads

    This should list two or more migration hashes. E.g.

    1. 1412ec1e5a7b (head)
    2. 67da9ef1ef9c (head)
  2. Pick one of them as the parent revision, open the script for the other revision and update Revises and down_revision to the new parent revision. E.g.:

    1. --- a/67da9ef1ef9c_add_hide_left_bar_to_tabstate.py
    2. +++ b/67da9ef1ef9c_add_hide_left_bar_to_tabstate.py
    3. @@ -17,14 +17,14 @@
    4. """add hide_left_bar to tabstate
    5. Revision ID: 67da9ef1ef9c
    6. -Revises: c501b7c653a3
    7. +Revises: 1412ec1e5a7b
    8. Create Date: 2021-02-22 11:22:10.156942
    9. """
    10. # revision identifiers, used by Alembic.
    11. revision = "67da9ef1ef9c"
    12. -down_revision = "c501b7c653a3"
    13. +down_revision = "1412ec1e5a7b"
    14. import sqlalchemy as sa
    15. from alembic import op

    Alternatively you may also run superset db merge to create a migration script just for merging the heads.

    1. superset db merge {HASH1} {HASH2}
  3. Upgrade the DB to the new checkpoint

    1. superset db upgrade