You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "thatguyatgithub (via GitHub)" <gi...@apache.org> on 2026/07/29 22:39:13 UTC

[D] superset helm 0.15.0 chart broken [superset]

GitHub user thatguyatgithub created a discussion: superset helm 0.15.0 chart broken

### Bug description

When using bring your own DB, the superset-init-db k8s main job breaks under this error:

```pgrading DB schema...
Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
2025-09-17 12:41:33,296:ERROR:superset.app:Failed to create app
Traceback (most recent call last):
  File "/app/.venv/lib/python3.10/site-packages/superset/app.py", line 40, in create_app
    app_initializer.init_app()
[...]
  File "/app/.venv/lib/python3.10/site-packages/click/core.py", line 1685, in invoke
    super().invoke(ctx)
  File "/app/.venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/app/.venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/app/.venv/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/app/.venv/lib/python3.10/site-packages/flask/cli.py", line 355, in decorator
    app = __ctx.ensure_object(ScriptInfo).load_app()
  File "/app/.venv/lib/python3.10/site-packages/flask/cli.py", line 309, in load_app
    app = locate_app(import_name, name)
  File "/app/.venv/lib/python3.10/site-packages/flask/cli.py", line 238, in locate_app
    return find_app_by_string(module, app_name)
  File "/app/.venv/lib/python3.10/site-packages/flask/cli.py", line 166, in find_app_by_string
    app = attr(*args, **kwargs)
  File "/app/.venv/lib/python3.10/site-packages/superset/app.py", line 40, in create_app
    app_initializer.init_app()
  File "/app/.venv/lib/python3.10/site-packages/superset/initialization/__init__.py", line 466, in init_app
    self.setup_db()
  File "/app/.venv/lib/python3.10/site-packages/superset/initialization/__init__.py", line 662, in setup_db
    pessimistic_connection_handling(db.engine)
  File "/app/.venv/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 998, in engine
    return self.get_engine()
  File "/app/.venv/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 1017, in get_engine
    return connector.get_engine()
  File "/app/.venv/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 594, in get_engine
    self._engine = rv = self._sa.create_engine(sa_url, options)
  File "/app/.venv/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 1027, in create_engine
    return sqlalchemy.create_engine(sa_url, **engine_opts)
  File "<string>", line 2, in create_engine
  File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 375, in warned
    return fn(*args, **kwargs)
  File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 544, in create_engine
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 811, in dbapi
    import psycopg2
ModuleNotFoundError: No module named 'psycopg2'```

GitHub link: https://github.com/apache/superset/discussions/42584

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] superset helm 0.15.0 chart broken [superset]

Posted by "ataquino (via GitHub)" <gi...@apache.org>.
GitHub user ataquino added a comment to the discussion: superset helm 0.15.0 chart broken

Did you find any solution to this, @NiklasRosenstein ? Getting this error now after upgrading to 0.15.2 and setting the redis and postgres images to the legacy bitnami repository. `bootstrapScript` doesn't solve it since the error is in the init-db pod, as you showed.

GitHub link: https://github.com/apache/superset/discussions/42584#discussioncomment-17832841

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] superset helm 0.15.0 chart broken [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
GitHub user rusackas added a comment to the discussion: superset helm 0.15.0 chart broken

@villebro we keep seeing issues like this arise. Any idea how to resolve this more permanently? Tempted to bump these to Discussions when they arise, but clearly it's a recurring issue.

GitHub link: https://github.com/apache/superset/discussions/42584#discussioncomment-17832839

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] superset helm 0.15.0 chart broken [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: superset helm 0.15.0 chart broken

<!-- Greeting -->
Hi @thatguyatgithub! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.

<!-- Answer -->
This is a known issue: the default Superset Docker image used by the Helm chart does not include database drivers like psycopg2, which are required to connect to external PostgreSQL databases. You have a few options to resolve this:

1. **Add a bootstrapScript to your Helm values.yaml** to install psycopg2-binary and its system dependencies at container startup. For Superset v5 and newer (which use `uv` as the Python package manager), use:

   ```yaml
   bootstrapScript: |
     #!/bin/bash
     apt update && apt install -y gcc libpq-dev python3-dev pkg-config
     uv pip install psycopg2-binary
   ```
   [Reference](https://github.com/apache/superset/discussions/34109)

   For older versions, replace `uv pip install` with `pip install`.

2. **Use a custom Docker image** that pre-installs psycopg2-binary and any other required drivers. This is recommended for production deployments. Example Dockerfile:

   ```dockerfile
   FROM apache/superset:latest
   RUN pip install --no-cache-dir psycopg2-binary
   ```
   [Reference](https://github.com/apache/superset/issues/33945)

3. **Use the `-dev` tagged Superset image** (e.g., `apache/superset:latest-dev`), which includes common database drivers by default. [Reference](https://github.com/apache/superset/issues/32217)

Make sure you also disable the internal PostgreSQL by setting `postgresql.enabled: false` in your values.yaml when using an external DB, and provide your DB connection details under `supersetNode.connections` (do not set `SQLALCHEMY_DATABASE_URI` directly) [Reference](https://github.com/apache/superset/issues/33945).

This approach should resolve the `ModuleNotFoundError: No module named 'psycopg2'` in your Helm-based deployment.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*

---

Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=fa259a3f-71c2-48b6-a4e1-d3073eb7c148) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC4
 5ODU2MyA4NS4zNjUyID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ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)

GitHub link: https://github.com/apache/superset/discussions/42584#discussioncomment-17832838

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] superset helm 0.15.0 chart broken [superset]

Posted by "NiklasRosenstein (via GitHub)" <gi...@apache.org>.
GitHub user NiklasRosenstein added a comment to the discussion: superset helm 0.15.0 chart broken

I'm also running into this issue. And to @rusackas point, I've run into it before two years ago already: https://github.com/apache/superset/issues/23577 (note how I had to install `psycopg2` in the `bootstrapScript`).

I get this error not when connecting to an external database. It seems reasonable to require installing additional drivers in some way explicitly for various reasons (e.g. license, image bloat, maintenance, etc.). The error appears with when the Pods try to connect to the **internal** Postgres DB...

<img width="805" height="182" alt="Image" src="https://github.com/user-attachments/assets/c23d2660-15cc-4a55-871d-63163d7d052c" />

<img width="876" height="128" alt="Image" src="https://github.com/user-attachments/assets/1ba86a85-f302-47c0-b678-6caf6c87765b" />

We're looking to evaluate Superset against other (some not open source) competitors in the space, but this doesn't exactly inspire confidence in the project unfortunately.

```yaml
# helmfile.yaml
repositories:
  - name: superset
    url: https://apache.github.io/superset

releases:
- name: superset
  namespace: superset
  chart: superset/superset
  version: "0.15.0"
  values:
    # Bitnami has moved their container images behind a paywall. The Superset Helm charts have not been updated yet.
    # See https://github.com/apache/superset/issues/34414#issuecomment-3307806333
    - postgresql:
        image:
          repository: bitnamilegacy/postgresql
      redis:
        image:
          repository: bitnamilegacy/redis
    - configOverrides:
        secret: |
          SECRET_KEY = 'CHANGE_ME_TO_A_SECRET'
```

If Postgres is the default database of choice, it doesn't make sense IMO to exclude the `psycopg2` driver that is obviously needed from the image. At the very least, the Kubernetes deployment documentation could provide the steps to install the driver e.g. via `bootstrapScript`.

Note how https://superset.apache.org/docs/installation/kubernetes/#dependencies mentions that additional drivers may need to be installed, but only on the topic of connecting to external databases, _not_ for Superset to actually be coming up healthy.

<img width="897" height="338" alt="Image" src="https://github.com/user-attachments/assets/1615fda0-f31c-4d5e-b3c1-a85536b6e84c" />

Interestingly, the Postgres section here (https://superset.apache.org/docs/configuration/databases/#postgres) mentions that the driver comes pre-installed when using docker-compose. Then why not with Kubernetes?

<img width="864" height="245" alt="Image" src="https://github.com/user-attachments/assets/45b5ee8c-e617-43c7-873f-91dba0821b10" />



GitHub link: https://github.com/apache/superset/discussions/42584#discussioncomment-17832840

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] superset helm 0.15.0 chart broken [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
GitHub user rusackas added a comment to the discussion: superset helm 0.15.0 chart broken

Since this keeps recurring (same root cause as #23577 from a couple years back) and it's really a deployment/docs gap rather than a Superset code bug, I'm going to move this to a Discussion. Think the actual fix here is a clear doc note in the helm chart README about installing the right DB driver via `bootstrapScript` for BYODB setups, happy to review a PR for that if someone wants to take it.

GitHub link: https://github.com/apache/superset/discussions/42584#discussioncomment-17832842

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org