SuperSet upgrade 2.0.0 - incorporating the Tanzania work

Note: This manual is based on a notes gathered on a meeting and may be changed while working on an upgrade.

The work needs to be conducted in openlmis-ref-distro, inside reporting folder: https://github.com/OpenLMIS/openlmis-ref-distro/tree/master/reporting

  1. These are the Superset 2.0.0 requirements we need to fulfill: https://github.com/apache/superset/blob/2.0.0/requirements/base.txt
    We need to adjust our requirements.txt file so it has the same package versions as base.txt: https://github.com/OpenLMIS/openlmis-ref-distro/blob/master/reporting/superset/requirements.txt

  2. Change SUPERSET_VERSION to 2.0.0 here: https://github.com/OpenLMIS/openlmis-ref-distro/blob/master/reporting/superset/docker-compose.yml

  3. Inside Dockerfile, update versions being installed by pip package manager, so they are compatible with base.txt. Change also SUPERSET_VERSION to 2.0.0 at the top.
    https://github.com/OpenLMIS/openlmis-ref-distro/blob/master/reporting/superset/Dockerfile

  4. Inside app-customizations create a separate 2.0.0 folder: https://github.com/OpenLMIS/openlmis-ref-distro/tree/master/reporting/config/services/superset/app-customizations/

Create two folders inside:

  • /views

  • /superset-frontend

In views directory add core.py file, it should be copy-pasted from: https://github.com/apache/superset/blob/2.0.0/superset/views/core.py

In superset-frontend add js_build.sh, copy-paste it from folder containing previous superset version: https://github.com/OpenLMIS/openlmis-ref-distro/blob/master/reporting/config/services/superset/app-customizations/1.5.2/superset-frontend/js_build.sh

Then in superset-frontend create a following folder structure: src/dashboard/components/Header, add index.jsx inside.
It should be copy-pasted from: https://github.com/apache/superset/blob/2.0.0/superset-frontend/src/dashboard/components/Header/index.jsx

  1. Make sure to re-add two OpenLMIS customizations, previously existing in core.py file.
    https://github.com/OpenLMIS/openlmis-ref-distro/blob/2d6b855fd14fa8a30d1cf30ef4a6724d031e52f2/reporting/config/services/superset/app-customizations/1.5.2/views/core.py#L28
    https://github.com/OpenLMIS/openlmis-ref-distro/blob/2d6b855fd14fa8a30d1cf30ef4a6724d031e52f2/reporting/config/services/superset/app-customizations/1.5.2/views/core.py#L3020

Keeping in mind possible issues with compatibility, the upgrade should take one week as an upper limit.

OpenLMIS: the global initiative for powerful LMIS software