Skip to content

Commit 49b63b3

Browse files
authored
chore: Add support Superset 6.0.0-rc2 (#680)
* fix: Remove deprecated and removed import Flask AppBuilder 5 no longer has the AUTH_OID module. It is possible a user still relies on this for old Superset versions. * fix: Set required config (to an empty value Flask AppBuilder 5, for some reason, requires `RECAPTCHA_PUBLIC_KEY` to be set, or the UI cannot be used, and the following error is emitted on the container console: ``` File "/stackable/app/lib64/python3.11/site-packages/superset/views/base.py", line 417, in cached_common_bootstrap_data frontend_config["RECAPTCHA_PUBLIC_KEY"] = app.config["RECAPTCHA_PUBLIC_KEY"] ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'RECAPTCHA_PUBLIC_KEY' ``` * chore: Use to_owned for &str -> String * test(kuttl): Add Superset 6.0.0-rc2 to test-definitions. This requires the product image to be merged and built: stackabletech/docker-images#1337 * chore: Update changelog * docs: Update getting started * docs: Update supported versions By SDP 26.3, this should no longer be rc2 * chore: Update changelog * docs: Update required-external-components
1 parent b17d3c4 commit 49b63b3

File tree

7 files changed

+34
-11
lines changed

7 files changed

+34
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## [Unreleased]
44

5+
### Added
6+
7+
- Add support for Superset 6.0.0-rc2 ([#680]).
8+
9+
[#680]: https://github.com/stackabletech/superset-operator/pull/680
10+
511
## [25.11.0] - 2025-11-07
612

713
## [25.11.0-rc1] - 2025-11-06

docs/modules/superset/examples/getting_started/superset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
name: simple-superset
66
spec:
77
image:
8-
productVersion: 4.1.4
8+
productVersion: 6.0.0-rc2
99
clusterConfig:
1010
credentialsSecret: simple-superset-credentials
1111
nodes:

docs/modules/superset/pages/required-external-components.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Superset uses an SQL database to store metadata.
55
The supported databases and versions are:
66

7-
* PostgreSQL 10, 11, 12, 13, 14, 15
7+
* PostgreSQL 10, 11, 12, 13, 14, 15, 16.X
88
* MySQL 5.7, 8.x
99
1010
Reference: https://superset.apache.org/docs/configuration/configuring-superset/#setting-up-a-production-metadata-database[Superset documentation]

docs/modules/superset/partials/supported-versions.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// This is a separate file, since it is used by both the direct Superset documentation, and the overarching
33
// Stackable Platform documentation.
44

5+
- 6.0.0-rc2 (experimental)
56
- 4.1.4 (LTS)
67
- 4.1.2 (deprecated)
78
- 4.0.2 (deprecated)

rust/operator-binary/src/config.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub enum Error {
3333
pub const PYTHON_IMPORTS: &[&str] = &[
3434
"import os",
3535
"from superset.stats_logger import StatsdStatsLogger",
36-
"from flask_appbuilder.security.manager import (AUTH_DB, AUTH_LDAP, AUTH_OAUTH, AUTH_OID, AUTH_REMOTE_USER)",
36+
"from flask_appbuilder.security.manager import (AUTH_DB, AUTH_LDAP, AUTH_OAUTH, AUTH_REMOTE_USER)",
3737
"from log_config import StackableLoggingConfigurator",
3838
];
3939

@@ -43,23 +43,30 @@ pub fn add_superset_config(
4343
) -> Result<(), Error> {
4444
config.insert(
4545
SupersetConfigOptions::SecretKey.to_string(),
46-
"os.environ.get('SECRET_KEY')".into(),
46+
"os.environ.get('SECRET_KEY')".to_owned(),
4747
);
4848
config.insert(
4949
SupersetConfigOptions::SqlalchemyDatabaseUri.to_string(),
50-
"os.environ.get('SQLALCHEMY_DATABASE_URI')".into(),
50+
"os.environ.get('SQLALCHEMY_DATABASE_URI')".to_owned(),
5151
);
5252
config.insert(
5353
SupersetConfigOptions::StatsLogger.to_string(),
54-
"StatsdStatsLogger(host='0.0.0.0', port=9125)".into(),
54+
"StatsdStatsLogger(host='0.0.0.0', port=9125)".to_owned(),
5555
);
5656
config.insert(
5757
SupersetConfigOptions::MapboxApiKey.to_string(),
58-
"os.environ.get('MAPBOX_API_KEY', '')".into(),
58+
"os.environ.get('MAPBOX_API_KEY', '')".to_owned(),
5959
);
6060
config.insert(
6161
SupersetConfigOptions::LoggingConfigurator.to_string(),
62-
"StackableLoggingConfigurator()".into(),
62+
"StackableLoggingConfigurator()".to_owned(),
63+
);
64+
// Flask AppBuilder requires this to be set, otherwise the web ui cannot be used.
65+
// We chose to make it an expression in case the user wants to override it through
66+
// configurationOverrides (though it would require other settings like the private key too).
67+
config.insert(
68+
SupersetConfigOptions::RecaptchaPublicKey.to_string(),
69+
"''".to_owned(),
6370
);
6471

6572
append_authentication_config(config, authentication_config)?;

rust/operator-binary/src/crd/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ pub enum SupersetConfigOptions {
110110
AuthOpaRule,
111111
AuthOpaCacheMaxEntries,
112112
AuthOpaCacheTtlInSec,
113+
// Flask AppBuilder (currently) requires this to be set, even if not used,
114+
// otherwise the web UI cannot be used,
115+
RecaptchaPublicKey,
113116
}
114117

115118
#[versioned(
@@ -425,6 +428,11 @@ impl FlaskAppConfigOptions for SupersetConfigOptions {
425428
SupersetConfigOptions::AuthOpaRule => PythonType::StringLiteral,
426429
SupersetConfigOptions::AuthOpaCacheMaxEntries => PythonType::IntLiteral,
427430
SupersetConfigOptions::AuthOpaCacheTtlInSec => PythonType::IntLiteral,
431+
// Flask AppBuilder (currently) requires this option to be set (even if empty).
432+
// If we set it to a string, the user cannot then get it from an expression in
433+
// configOverrides. So we make it an expression, but will need to manually quote the
434+
// empty string as a default.
435+
SupersetConfigOptions::RecaptchaPublicKey => PythonType::Expression,
428436
}
429437
}
430438
}

tests/test-definition.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ dimensions:
99
- 4.0.2
1010
- 4.1.2
1111
- 4.1.4
12+
- 6.0.0-rc2
1213
# Or use a custom image:
13-
# - 4.1.4,oci.stackable.tech/razvan/superset:4.1.4-stackable0.0.0-dev
14+
# - x.x.x,oci.stackable.tech/razvan/superset:x.x.x-stackable0.0.0-dev
1415
- name: superset-latest
1516
values:
16-
- 4.1.4
17-
# - 4.1.4,oci.stackable.tech/razvan/superset:4.1.4-stackable0.0.0-dev
17+
- 6.0.0-rc2
18+
# - x.x.x,oci.stackable.tech/razvan/superset:x.x.x-stackable0.0.0-dev
1819
- name: ldap-authentication
1920
values:
2021
- no-tls

0 commit comments

Comments
 (0)