diff --git a/CHANGELOG.md b/CHANGELOG.md index 80144af8..ece92141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +### Added + +- Add support for Superset 6.0.0-rc2 ([#680]). + +[#680]: https://github.com/stackabletech/superset-operator/pull/680 + ## [25.11.0] - 2025-11-07 ## [25.11.0-rc1] - 2025-11-06 diff --git a/docs/modules/superset/examples/getting_started/superset.yaml b/docs/modules/superset/examples/getting_started/superset.yaml index 0ecec136..46a93b78 100644 --- a/docs/modules/superset/examples/getting_started/superset.yaml +++ b/docs/modules/superset/examples/getting_started/superset.yaml @@ -5,7 +5,7 @@ metadata: name: simple-superset spec: image: - productVersion: 4.1.4 + productVersion: 6.0.0-rc2 clusterConfig: credentialsSecret: simple-superset-credentials nodes: diff --git a/docs/modules/superset/pages/required-external-components.adoc b/docs/modules/superset/pages/required-external-components.adoc index d6841c2f..47ba4041 100644 --- a/docs/modules/superset/pages/required-external-components.adoc +++ b/docs/modules/superset/pages/required-external-components.adoc @@ -4,7 +4,7 @@ Superset uses an SQL database to store metadata. The supported databases and versions are: -* PostgreSQL 10, 11, 12, 13, 14, 15 +* PostgreSQL 10, 11, 12, 13, 14, 15, 16.X * MySQL 5.7, 8.x Reference: https://superset.apache.org/docs/configuration/configuring-superset/#setting-up-a-production-metadata-database[Superset documentation] diff --git a/docs/modules/superset/partials/supported-versions.adoc b/docs/modules/superset/partials/supported-versions.adoc index 0fdb6256..34293fa2 100644 --- a/docs/modules/superset/partials/supported-versions.adoc +++ b/docs/modules/superset/partials/supported-versions.adoc @@ -2,6 +2,7 @@ // This is a separate file, since it is used by both the direct Superset documentation, and the overarching // Stackable Platform documentation. +- 6.0.0-rc2 (experimental) - 4.1.4 (LTS) - 4.1.2 (deprecated) - 4.0.2 (deprecated) diff --git a/rust/operator-binary/src/config.rs b/rust/operator-binary/src/config.rs index a848e711..9dc32c2f 100644 --- a/rust/operator-binary/src/config.rs +++ b/rust/operator-binary/src/config.rs @@ -33,7 +33,7 @@ pub enum Error { pub const PYTHON_IMPORTS: &[&str] = &[ "import os", "from superset.stats_logger import StatsdStatsLogger", - "from flask_appbuilder.security.manager import (AUTH_DB, AUTH_LDAP, AUTH_OAUTH, AUTH_OID, AUTH_REMOTE_USER)", + "from flask_appbuilder.security.manager import (AUTH_DB, AUTH_LDAP, AUTH_OAUTH, AUTH_REMOTE_USER)", "from log_config import StackableLoggingConfigurator", ]; @@ -43,23 +43,30 @@ pub fn add_superset_config( ) -> Result<(), Error> { config.insert( SupersetConfigOptions::SecretKey.to_string(), - "os.environ.get('SECRET_KEY')".into(), + "os.environ.get('SECRET_KEY')".to_owned(), ); config.insert( SupersetConfigOptions::SqlalchemyDatabaseUri.to_string(), - "os.environ.get('SQLALCHEMY_DATABASE_URI')".into(), + "os.environ.get('SQLALCHEMY_DATABASE_URI')".to_owned(), ); config.insert( SupersetConfigOptions::StatsLogger.to_string(), - "StatsdStatsLogger(host='0.0.0.0', port=9125)".into(), + "StatsdStatsLogger(host='0.0.0.0', port=9125)".to_owned(), ); config.insert( SupersetConfigOptions::MapboxApiKey.to_string(), - "os.environ.get('MAPBOX_API_KEY', '')".into(), + "os.environ.get('MAPBOX_API_KEY', '')".to_owned(), ); config.insert( SupersetConfigOptions::LoggingConfigurator.to_string(), - "StackableLoggingConfigurator()".into(), + "StackableLoggingConfigurator()".to_owned(), + ); + // Flask AppBuilder requires this to be set, otherwise the web ui cannot be used. + // We chose to make it an expression in case the user wants to override it through + // configurationOverrides (though it would require other settings like the private key too). + config.insert( + SupersetConfigOptions::RecaptchaPublicKey.to_string(), + "''".to_owned(), ); append_authentication_config(config, authentication_config)?; diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index ea44d00c..bb94010e 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -110,6 +110,9 @@ pub enum SupersetConfigOptions { AuthOpaRule, AuthOpaCacheMaxEntries, AuthOpaCacheTtlInSec, + // Flask AppBuilder (currently) requires this to be set, even if not used, + // otherwise the web UI cannot be used, + RecaptchaPublicKey, } #[versioned( @@ -425,6 +428,11 @@ impl FlaskAppConfigOptions for SupersetConfigOptions { SupersetConfigOptions::AuthOpaRule => PythonType::StringLiteral, SupersetConfigOptions::AuthOpaCacheMaxEntries => PythonType::IntLiteral, SupersetConfigOptions::AuthOpaCacheTtlInSec => PythonType::IntLiteral, + // Flask AppBuilder (currently) requires this option to be set (even if empty). + // If we set it to a string, the user cannot then get it from an expression in + // configOverrides. So we make it an expression, but will need to manually quote the + // empty string as a default. + SupersetConfigOptions::RecaptchaPublicKey => PythonType::Expression, } } } diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml index b84b89c0..3d612a0a 100644 --- a/tests/test-definition.yaml +++ b/tests/test-definition.yaml @@ -9,12 +9,13 @@ dimensions: - 4.0.2 - 4.1.2 - 4.1.4 + - 6.0.0-rc2 # Or use a custom image: - # - 4.1.4,oci.stackable.tech/razvan/superset:4.1.4-stackable0.0.0-dev + # - x.x.x,oci.stackable.tech/razvan/superset:x.x.x-stackable0.0.0-dev - name: superset-latest values: - - 4.1.4 - # - 4.1.4,oci.stackable.tech/razvan/superset:4.1.4-stackable0.0.0-dev + - 6.0.0-rc2 + # - x.x.x,oci.stackable.tech/razvan/superset:x.x.x-stackable0.0.0-dev - name: ldap-authentication values: - no-tls