Skip to content

Conversation

tadeha
Copy link
Contributor

@tadeha tadeha commented Jul 26, 2025

SUMMARY

This feature introduces dynamic database connection support for Superset Helm Chart, allowing users to select between different database types like PostgreSQL (default) and MySQL. Previously, the SQLALCHEMY_DATABASE_URI was hardcoded to postgresql+psycopg2. This enhancement enables the database backend to be configured directly through values.yaml.

The supersetNode.connections.db_type option controls which database type Superset will connect to.

This change is fully backward compatible:

If supersetNode.connections.db_type is not explicitly set in values.yaml (as would be the case for existing deployments), it defaults to "postgresql", preserving current functionality.

Validation is included to prevent unsupported database_type values from being deployed.

TESTING INSTRUCTIONS

  1. To test PostgreSQL (Default Behavior):

    • Ensure supersetNode.connections.db_type is either commented out or set to "postgresql" in values.yaml.
    • Install/Upgrade Helm chart: helm upgrade --install superset .
    • Verify Superset successfully connects to PostgreSQL.
  2. To test MySQL:

    • Prepare your Superset Image: Build a custom Superset Docker image that includes the mysqlclient Python package (e.g., by adding RUN pip install mysqlclient after installing build dependencies like default-libmysqlclient-dev). Update your values.yaml to use this new image.
    • In values.yaml, set supersetNode.connections.db_type: "mysql".
    • Configure your MySQL connection details:
      • Set supersetNode.connections.db_host to your MySQL server's host.
      • Set supersetNode.connections.db_user, db_pass, db_name, db_port for your MySQL database.
    • Install/Upgrade Helm chart: helm upgrade --install superset .
    • Verify Superset successfully connects to MySQL.
  3. To test Validation (Unsupported Type):

    • In values.yaml, set supersetNode.connections.db_type: "unsupported_db_type".
    • Attempt to install/upgrade Helm chart: helm upgrade --install superset .
    • Verify that the Helm command fails with an error message indicating an unsupported database_type.

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

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

I've completed my review and didn't find any issues.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@dosubot dosubot bot added the deploy:helm label Jul 26, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@tadeha tadeha force-pushed the feat/helm-multi-db-connection-support branch from 31c4bbd to 8cbf755 Compare July 26, 2025 18:53
rusackas
rusackas approved these changes Jul 28, 2025
@rusackas rusackas self-requested a review July 28, 2025 16:08
@tadeha tadeha requested a review from betodealmeida July 30, 2025 06:26
@tadeha
Copy link
Contributor Author

tadeha commented Aug 11, 2025

Can we have one more look, please? @rusackas @betodealmeida

@rusackas
Copy link
Member

Pinged @betodealmeida on Slack about this, but it looks like the PR is also in need of a rebase, if you don't mind brushing it up a little :D

@tadeha
Copy link
Contributor Author

tadeha commented Aug 30, 2025

Pinged @betodealmeida on Slack about this, but it looks like the PR is also in need of a rebase, if you don't mind brushing it up a little :D

Sure. Thank you, and Done.

@tadeha
Copy link
Contributor Author

tadeha commented Sep 22, 2025

Hey there, do we have an update on this? @rusackas

@rusackas rusackas merged commit bc0c40c into apache:master Sep 23, 2025
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants