You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "helong001 (via GitHub)" <gi...@apache.org> on 2025/06/04 15:41:04 UTC

[I] ๐Ÿ› Bug: bootstrapScript does not install Trino connector, Trino option missing in Superset UI [superset]

helong001 opened a new issue, #33691:
URL: https://github.com/apache/superset/issues/33691

   ### Bug description
   
   #### Description
   
   When deploying Superset via the official Helm Chart, I attempted to install the Trino connector using the `bootstrapScript` with `uv pip install .[trino]`. However, after deployment, the Trino option does not appear in the UI under โ€œ+ Dataโ€ datasource options. It seems the bootstrap script is either not executed or does not take effect.
   
   #### Relevant YAML snippet
   ```yaml
   init:
     loadExamples: true
   
   bootstrapScript: |
     #!/bin/bash
     uv pip install .[trino] &&
     if [ ! -f ~/bootstrap ]; then
       echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap
     fi
   ```
   
   #### Expected Behavior
   - The Trino connector should be installed via pip during bootstrap;
   - Trino should appear as an option in the Superset UI datasource creation dialog;
   - Superset should be able to connect to Trino backend without additional manual steps.
   
   #### Actual Behavior
   - Trino does not appear in the datasource list in UI;
   - Checking inside the running pod, the ~/bootstrap file is missing, suggesting bootstrapScript was not run;
   - Possibly the bootstrap script runs only once during initial image build or first pod start, but not on helm upgrades or helmfile apply.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.1.2
   
   ### Python version
   
   3.9
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] ๐Ÿ› Bug: bootstrapScript does not install Trino connector, Trino option missing in Superset UI [superset]

Posted by "helong001 (via GitHub)" <gi...@apache.org>.
helong001 commented on issue #33691:
URL: https://github.com/apache/superset/issues/33691#issuecomment-2940592391

   @dosubot I found that Iโ€™m deploying Superset using the Bitnami Helm chart, not the official Apache Superset Helm chart.
   
   It turns out that bootstrapScript is not supported in the Bitnami version, which explains why my Trino connector installation script was never executed. The container logs confirmed this โ€” no custom script output was seen, and Trino didnโ€™t appear in the UI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] ๐Ÿ› Bug: bootstrapScript does not install Trino connector, Trino option missing in Superset UI [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33691:
URL: https://github.com/apache/superset/issues/33691#issuecomment-2940584591

   <!-- Answer -->
   If the Trino connector still does not appear in the Superset UI after installing it with the recommended method, here are the most likely causes and next steps:
   
   1. **Backend Denylist Configuration**: Superset controls which database engines appear in the UI using the `DBS_AVAILABLE_DENYLIST` configuration in the backend. If Trino is listed here, it will not show up as an option, regardless of whether the driver is installed. Check your Superset configuration (typically in `superset_config.py` or environment variables) and ensure that Trino is not present in the denylist. The frontend simply reflects what the backend exposesโ€”there are no Trino-specific feature flags or UI toggles. For reference, see how engine visibility is managed in the backend [source](https://github.com/apache/superset/blob/20519158d2ab6325f7564b16615a99fe0ebe7a38/superset/db_engine_specs/__init__.py).
   
   2. **Driver Installation**: The Trino connector is an optional dependency. If the Python package is not installed in the correct environment, Superset cannot register the engine. Double-check that `/app/.venv/bin/pip install .[trino]` (or `pip install trino sqlalchemy-trino`) completes successfully in your running container. You can verify this by running `/app/.venv/bin/pip list` inside the pod and confirming that `trino` and `sqlalchemy-trino` are present. If not, the installation step may have failed or run in the wrong environment [source](https://github.com/apache/superset/issues/32186).
   
   3. **Pod Restart and Script Execution**: If the `~/bootstrap` file is missing, the bootstrap script may not have run or may have failed. Check the pod logs for errors during startup, especially around the time the bootstrap script should execute. Ensure the script has execute permissions and that the container user has the necessary rights to install Python packages and write to the home directory.
   
   4. **Custom Images for Production**: For production deployments, it is recommended to build a custom Docker image with all required drivers pre-installed, rather than relying on runtime installation via bootstrap scripts. This avoids issues with missing dependencies and ensures consistent environments across pods.
   
   5. **Database Engine Registration**: The Trino engine spec is implemented in Superset and should be auto-registered if the driver is present [source](https://github.com/apache/superset/blob/20519158d2ab6325f7564b16615a99fe0ebe7a38/superset/db_engine_specs/trino.py). There are no extra steps required to "enable" it in the UI beyond having the driver installed and not being denied by config.
   
   If you have confirmed all of the above and Trino still does not appear, please share the output of `/app/.venv/bin/pip list` from your running Superset container and any relevant log messages from pod startup. This will help pinpoint whether the issue is with package installation, configuration, or something else.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/02915738-2e74-4c3d-9f83-e8a858d1b8a4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/02915738-2e74-4c3d-9f83-e8a858d1b8a4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/02915738-2e74-4c3d-9f83-e8a858d1b8a4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/02915738-2e74-4c3d-9f83-e8a858d1b8a4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/02915738-2e74-4c3d-9f83-e8a858d1b8a4?feedback_type=hallucination) | [Report ๐Ÿ›](https://app.dosu.dev/response-feedback/02915738-2e74-4c3d-9f83-e8a858d1b8a4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/02915738-2e74-4c3d-9f83-e8a858d1b8a4?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33691)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] ๐Ÿ› Bug: bootstrapScript does not install Trino connector, Trino option missing in Superset UI [superset]

Posted by "helong001 (via GitHub)" <gi...@apache.org>.
helong001 commented on issue #33691:
URL: https://github.com/apache/superset/issues/33691#issuecomment-2940573088

   > Hi [@helong001](https://github.com/helong001)! I'm [Dosu](https://go.dosu.dev/dosubot) and Iโ€™m helping the superset team.
   > 
   > Your issue is likely caused by two factors: the use of the uv command and the way Superset now manages its Python environment in recent versions.
   > 
   > First, the uv command is not present in the official Superset Docker images by default, which means any script using uv pip will fail silently or log an error that may not be visible unless you check the container logs directly. This is a known issue for users trying to install additional Python packages at runtime in containers built from the official image. The recommended workaround is to use the pip executable from the virtual environment Superset uses, which is located at /app/.venv/bin/pip in recent images. For example:
   > 
   > bootstrapScript: |
   >   #!/bin/bash
   >   /app/.venv/bin/pip install .[trino] &&
   >   if [ ! -f ~/bootstrap ]; then
   >     echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap
   >   fi
   > This approach is confirmed to work for installing additional drivers and dependencies in the current containerized setup, as Superset now runs inside a virtual environment at /app/.venv, and packages installed with the system pip will not be visible to Superset itself. If you need to ensure pip is available, you can also run /app/.venv/bin/python -m ensurepip before the install step if you encounter pip not found errors. [Reference](https://github.com/apache/superset/issues/32186)
   > 
   > Second, the bootstrapScript is executed at pod startup as part of the default Helm Chart configuration. Unless you have overridden the container command or removed the script mount, it should always run. If ~/bootstrap is missing, it strongly suggests the script failed (likely due to the uv command error) and exited before reaching that line. [Reference](https://github.com/apache/superset/blob/20519158d2ab6325f7564b16615a99fe0ebe7a38/helm/superset/values.yaml)
   > 
   > After making this change, redeploy your Helm release and check the logs of the Superset pods for any errors during startup. Once the Trino connector is installed in the correct environment, it should appear in the "+ Data" UI dialog.
   > 
   > If you continue to have issues, ensure your container user (runAsUser) has sufficient permissions to install Python packages and write to the home directory, and that you have not overridden the default container command or volume mounts in your Helm values.
   > 
   > Let me know if you need more details or troubleshooting steps.
   > 
   > _To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot)._
   > 
   > How did I do? [Good](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=hallucination) | [Report ๐Ÿ›](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=other)ย ย [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64
 732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot)ย [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33691)
   
   @dosu Despite following your recommended method to install the Trino connector, it still does not appear as a data source option in the Superset UI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] ๐Ÿ› Bug: bootstrapScript does not install Trino connector, Trino option missing in Superset UI [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33691:
URL: https://github.com/apache/superset/issues/33691#issuecomment-2940600270

   <!-- Answer -->
   You are correctโ€”the Bitnami Helm chart for Superset does not support the bootstrapScript, which is why your Trino connector installation script was never executed and Trino did not appear in the UI. This is a known limitation of the Bitnami chart and has been confirmed in community discussions as a common source of confusion for users migrating from the official Apache Superset Helm chart or following its documentation [source](https://github.com/apache/superset/discussions/31500).
   
   To install additional Python packages like the Trino connector when using the Bitnami Helm chart, the recommended approach is to build a custom Docker image that includes the required dependencies. This is also the best practice for production deployments, as it ensures all necessary drivers are present and avoids runtime installation issues [source](https://github.com/apache/superset/blob/20519158d2ab6325f7564b16615a99fe0ebe7a38/docs/docs/installation/kubernetes.mdx).
   
   **How to proceed:**
   
   1. Create a custom Dockerfile based on the Bitnami Superset image (or the image you are using).
   2. Add a line to install the Trino connector, for example:  
      ```
      RUN pip install trino
      ```
      or, if you need the SQLAlchemy dialect as well:
      ```
      RUN pip install trino sqlalchemy-trino
      ```
   3. Build and push your custom image to your container registry.
   4. Update your Bitnami Helm chart values to use your custom image.
   
   Once you redeploy with this image, the Trino connector should be available in the Superset UI under "+ Data" as long as it is not excluded by the backend configuration (such as the `DBS_AVAILABLE_DENYLIST`) [source](https://github.com/apache/superset/blob/20519158d2ab6325f7564b16615a99fe0ebe7a38/docs/docs/configuration/databases.mdx).
   
   There are no Bitnami-specific overrides or configuration options to install Python packages at runtime, so building a custom image is the only reliable method in this scenario. If you need more details on building a custom image or updating your Helm values, let me know!
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/77bd5bff-f7f6-4476-be43-6702991281a3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/77bd5bff-f7f6-4476-be43-6702991281a3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/77bd5bff-f7f6-4476-be43-6702991281a3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/77bd5bff-f7f6-4476-be43-6702991281a3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/77bd5bff-f7f6-4476-be43-6702991281a3?feedback_type=hallucination) | [Report ๐Ÿ›](https://app.dosu.dev/response-feedback/77bd5bff-f7f6-4476-be43-6702991281a3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/77bd5bff-f7f6-4476-be43-6702991281a3?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33691)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] ๐Ÿ› Bug: bootstrapScript does not install Trino connector, Trino option missing in Superset UI [superset]

Posted by "helong001 (via GitHub)" <gi...@apache.org>.
helong001 closed issue #33691: ๐Ÿ› Bug: bootstrapScript does not install Trino connector, Trino option missing in Superset UI
URL: https://github.com/apache/superset/issues/33691


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] ๐Ÿ› Bug: bootstrapScript does not install Trino connector, Trino option missing in Superset UI [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33691:
URL: https://github.com/apache/superset/issues/33691#issuecomment-2940524521

   <!-- Greeting -->
   Hi @helong001! I'm [Dosu](https://go.dosu.dev/dosubot) and Iโ€™m helping the superset team.
   
   <!-- Answer -->
   Your issue is likely caused by two factors: the use of the uv command and the way Superset now manages its Python environment in recent versions.
   
   First, the uv command is not present in the official Superset Docker images by default, which means any script using uv pip will fail silently or log an error that may not be visible unless you check the container logs directly. This is a known issue for users trying to install additional Python packages at runtime in containers built from the official image. The recommended workaround is to use the pip executable from the virtual environment Superset uses, which is located at /app/.venv/bin/pip in recent images. For example:
   
   ```yaml
   bootstrapScript: |
     #!/bin/bash
     /app/.venv/bin/pip install .[trino] &&
     if [ ! -f ~/bootstrap ]; then
       echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap
     fi
   ```
   This approach is confirmed to work for installing additional drivers and dependencies in the current containerized setup, as Superset now runs inside a virtual environment at /app/.venv, and packages installed with the system pip will not be visible to Superset itself. If you need to ensure pip is available, you can also run /app/.venv/bin/python -m ensurepip before the install step if you encounter pip not found errors.  
   [Reference](https://github.com/apache/superset/issues/32186)
   
   Second, the bootstrapScript is executed at pod startup as part of the default Helm Chart configuration. Unless you have overridden the container command or removed the script mount, it should always run. If ~/bootstrap is missing, it strongly suggests the script failed (likely due to the uv command error) and exited before reaching that line.  
   [Reference](https://github.com/apache/superset/blob/20519158d2ab6325f7564b16615a99fe0ebe7a38/helm/superset/values.yaml)
   
   After making this change, redeploy your Helm release and check the logs of the Superset pods for any errors during startup. Once the Trino connector is installed in the correct environment, it should appear in the "+ Data" UI dialog.
   
   If you continue to have issues, ensure your container user (runAsUser) has sufficient permissions to install Python packages and write to the home directory, and that you have not overridden the default container command or volume mounts in your Helm values.
   
   Let me know if you need more details or troubleshooting steps.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=hallucination) | [Report ๐Ÿ›](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/14be77c4-b6af-4542-994e-cb08ce000cdc?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33691)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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