From bbc49501b4e8b3593d5453d9501ca20b3eb71c33 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 5 Jun 2026 09:24:24 +0200 Subject: [PATCH 01/16] build: switch to smooth-operator branch and vendor the Flask config writer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the [patch] key (it was missing the .git suffix, so the patch could never apply) and activates the smooth-operator branch of operator-rs (matching trino/hdfs/airflow/kafka) as the foundation for the v2 config_overrides adoption later in this series. Vendors the Flask Python-config writer into config/writer — byte-identical to airflow-operator's config/writer.rs (both are candidates for one shared crate; keeping them diff-empty makes that a trivial lift) — and repoints crd/mod.rs and resources/configmap.rs to it. No behaviour change (33 tests pass). Regenerated Cargo.nix/crate-hashes.json. Co-Authored-By: Claude Opus 4.8 --- Cargo.lock | 122 +++-- Cargo.nix | 419 +++++++++++------- Cargo.toml | 3 +- crate-hashes.json | 18 +- rust/operator-binary/src/config/mod.rs | 1 + rust/operator-binary/src/config/writer.rs | 331 ++++++++++++++ rust/operator-binary/src/crd/mod.rs | 2 +- .../src/resources/configmap.rs | 16 +- 8 files changed, 694 insertions(+), 218 deletions(-) create mode 100644 rust/operator-binary/src/config/writer.rs diff --git a/Cargo.lock b/Cargo.lock index 9b4c258d..f7b42a48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1481,6 +1481,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f300e415e2134745ef75f04562dd0145405c2f7fd92065db029ac4b16b57fe90" dependencies = [ "jsonptr", + "schemars", "serde", "serde_json", "thiserror 1.0.69", @@ -1525,11 +1526,11 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#7a5f0c3fbcd091340214a23f0607fcd4b4fcc152" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" dependencies = [ "darling", "regex", - "snafu 0.9.0", + "snafu 0.9.1", ] [[package]] @@ -1850,9 +1851,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "opentelemetry" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bcd6ae87133e903af7ef497404dda70c60d0ea14895fc8a5e6722754fc2a0" +checksum = "b0142c63252a9e054e68a4c61a5778f7b14f576274d593f8ce883d191a099682" dependencies = [ "futures-core", "futures-sink", @@ -1864,9 +1865,9 @@ dependencies = [ [[package]] name = "opentelemetry-appender-tracing" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef6a1ac5ca3accf562b8c306fa8483c85f4390f768185ab775f242f7fe8fdcc2" +checksum = "2c0080f0dc1d7c786f467cd85a4e395fcab11ee852004f39a29a18ab7c25d837" dependencies = [ "opentelemetry", "tracing", @@ -1876,9 +1877,9 @@ dependencies = [ [[package]] name = "opentelemetry-http" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a6d09a73194e6b66df7c8f1b680f156d916a1a942abf2de06823dd02b7855d" +checksum = "5683015d09e2df236ef005b17f6f196f0d5f6313c4fa43a7b6a53b52776e4331" dependencies = [ "async-trait", "bytes", @@ -1889,9 +1890,9 @@ dependencies = [ [[package]] name = "opentelemetry-otlp" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f69cd6acbb9af919df949cd1ec9e5e7fdc2ef15d234b6b795aaa525cc02f71f" +checksum = "9966929966d17620d7c316c643ba62631826e10021409357772d5eea84f62c35" dependencies = [ "http", "opentelemetry", @@ -1903,14 +1904,14 @@ dependencies = [ "thiserror 2.0.18", "tokio", "tonic", - "tracing", + "tonic-types", ] [[package]] name = "opentelemetry-proto" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7175df06de5eaee9909d4805a3d07e28bb752c34cab57fa9cff549da596b30f" +checksum = "56d658ba1faf63f7b9c492cfbe6e0ec365440a16132d3270c1065f7b33f1b638" dependencies = [ "opentelemetry", "opentelemetry_sdk", @@ -1921,21 +1922,22 @@ dependencies = [ [[package]] name = "opentelemetry-semantic-conventions" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e62e29dfe041afb8ed2a6c9737ab57db4907285d999ef8ad3a59092a36bdc846" +checksum = "6ca2f98a0437b427b4b08f19f1caa3c44db885a202bc12cfea13d6c702243d68" [[package]] name = "opentelemetry_sdk" -version = "0.31.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ae4f5991976fd48df6d843de219ca6d31b01daaab2dad5af2badeded372bd" +checksum = "9b59f80e1ac4d5ff7a2db8fb6c80badb7f0f3f858211fba08dd9aaec750894f9" dependencies = [ "futures-channel", "futures-executor", "futures-util", "opentelemetry", "percent-encoding", + "portable-atomic", "rand 0.9.4", "thiserror 2.0.18", "tokio", @@ -2218,6 +2220,15 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "prost-types" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" +dependencies = [ + "prost", +] + [[package]] name = "quote" version = "1.0.45" @@ -2357,9 +2368,9 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" -version = "0.12.28" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64", "bytes", @@ -2375,9 +2386,6 @@ dependencies = [ "log", "percent-encoding", "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", "sync_wrapper", "tokio", "tower", @@ -2820,11 +2828,11 @@ dependencies = [ [[package]] name = "snafu" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1d4bced6a69f90b2056c03dcff2c4737f98d6fb9e0853493996e1d253ca29c6" +checksum = "d1a012328be2e3f5d5f6f3218147ca02588cea4cb865e876849ab6debcf36522" dependencies = [ - "snafu-derive 0.9.0", + "snafu-derive 0.9.1", ] [[package]] @@ -2852,9 +2860,9 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54254b8531cafa275c5e096f62d48c81435d1015405a91198ddb11e967301d40" +checksum = "5f103c50866b8743da9429b8a581d81a27c2d3a9c4ac7df8f8571c1dd7896eda" dependencies = [ "heck", "proc-macro2", @@ -2897,7 +2905,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#7a5f0c3fbcd091340214a23f0607fcd4b4fcc152" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" dependencies = [ "const-oid", "ecdsa", @@ -2909,7 +2917,7 @@ dependencies = [ "rsa", "sha2", "signature", - "snafu 0.9.0", + "snafu 0.9.1", "stackable-shared", "tokio", "tokio-rustls", @@ -2921,7 +2929,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.111.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#7a5f0c3fbcd091340214a23f0607fcd4b4fcc152" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" dependencies = [ "base64", "clap", @@ -2945,7 +2953,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "snafu 0.9.0", + "snafu 0.9.1", "stackable-operator-derive", "stackable-shared", "stackable-telemetry", @@ -2957,12 +2965,13 @@ dependencies = [ "tracing-appender", "tracing-subscriber", "url", + "uuid", ] [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#7a5f0c3fbcd091340214a23f0607fcd4b4fcc152" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" dependencies = [ "darling", "proc-macro2", @@ -2972,8 +2981,8 @@ dependencies = [ [[package]] name = "stackable-shared" -version = "0.1.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#7a5f0c3fbcd091340214a23f0607fcd4b4fcc152" +version = "0.1.1" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" dependencies = [ "jiff", "k8s-openapi", @@ -2982,7 +2991,7 @@ dependencies = [ "semver", "serde", "serde_yaml", - "snafu 0.9.0", + "snafu 0.9.1", "strum", "time", ] @@ -3003,7 +3012,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "snafu 0.9.0", + "snafu 0.9.1", "stackable-operator", "strum", "tokio", @@ -3012,8 +3021,8 @@ dependencies = [ [[package]] name = "stackable-telemetry" -version = "0.6.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#7a5f0c3fbcd091340214a23f0607fcd4b4fcc152" +version = "0.6.4" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" dependencies = [ "axum", "clap", @@ -3024,7 +3033,7 @@ dependencies = [ "opentelemetry-semantic-conventions", "opentelemetry_sdk", "pin-project", - "snafu 0.9.0", + "snafu 0.9.1", "strum", "tokio", "tower", @@ -3037,21 +3046,21 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.10.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#7a5f0c3fbcd091340214a23f0607fcd4b4fcc152" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" dependencies = [ "kube", "schemars", "serde", "serde_json", "serde_yaml", - "snafu 0.9.0", + "snafu 0.9.1", "stackable-versioned-macros", ] [[package]] name = "stackable-versioned-macros" version = "0.10.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#7a5f0c3fbcd091340214a23f0607fcd4b4fcc152" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" dependencies = [ "convert_case", "convert_case_extras", @@ -3069,7 +3078,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#7a5f0c3fbcd091340214a23f0607fcd4b4fcc152" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" dependencies = [ "arc-swap", "async-trait", @@ -3085,7 +3094,7 @@ dependencies = [ "rand 0.9.4", "serde", "serde_json", - "snafu 0.9.0", + "snafu 0.9.1", "stackable-certs", "stackable-shared", "stackable-telemetry", @@ -3421,6 +3430,17 @@ dependencies = [ "tonic", ] +[[package]] +name = "tonic-types" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a875a902255423d34c1f20838ab374126db8eb41625b7947a1d54113b0b7399" +dependencies = [ + "prost", + "prost-types", + "tonic", +] + [[package]] name = "tower" version = "0.5.3" @@ -3532,9 +3552,9 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac28f2d093c6c477eaa76b23525478f38de514fa9aeb1285738d4b97a9552fc" +checksum = "adbc64cba7137545b8044cb1fe9814f7aacf3c6b5f9b45be8bb5db538befdb26" dependencies = [ "js-sys", "opentelemetry", @@ -3650,6 +3670,16 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d258b83ceec21034727ecee8c382cfa6c3e133699b0742c64571814fb420c9f7" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.1" diff --git a/Cargo.nix b/Cargo.nix index d77e5e01..c1fdd941 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4714,6 +4714,11 @@ rec { name = "jsonptr"; packageId = "jsonptr"; } + { + name = "schemars"; + packageId = "schemars"; + optional = true; + } { name = "serde"; packageId = "serde"; @@ -4729,6 +4734,10 @@ rec { } ]; devDependencies = [ + { + name = "schemars"; + packageId = "schemars"; + } { name = "serde_json"; packageId = "serde_json"; @@ -4740,7 +4749,7 @@ rec { "schemars" = [ "dep:schemars" ]; "utoipa" = [ "dep:utoipa" ]; }; - resolvedDefaultFeatures = [ "default" "diff" ]; + resolvedDefaultFeatures = [ "default" "diff" "schemars" ]; }; "jsonpath-rust" = rec { crateName = "jsonpath-rust"; @@ -4866,8 +4875,8 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7a5f0c3fbcd091340214a23f0607fcd4b4fcc152"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "128e1afca7761d07058624091217b6d695fa790c"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "k8s_version"; @@ -4886,7 +4895,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.0"; + packageId = "snafu 0.9.1"; } ]; features = { @@ -6067,9 +6076,9 @@ rec { }; "opentelemetry" = rec { crateName = "opentelemetry"; - version = "0.31.0"; + version = "0.32.0"; edition = "2021"; - sha256 = "18629xsj4rsyiby9aj511q6wcw6s9m09gx3ymw1yjcvix1mcsjxq"; + sha256 = "10ln14d1jgc8rvw97mblc9blzcgpg1bimim4d170b7ia4mijq55h"; dependencies = [ { name = "futures-core"; @@ -6106,24 +6115,24 @@ rec { ]; features = { "default" = [ "trace" "metrics" "logs" "internal-logs" "futures" ]; + "experimental_metrics_bound_instruments" = [ "metrics" ]; "futures" = [ "futures-core" "futures-sink" "pin-project-lite" ]; "futures-core" = [ "dep:futures-core" ]; "futures-sink" = [ "dep:futures-sink" ]; "internal-logs" = [ "tracing" ]; "pin-project-lite" = [ "dep:pin-project-lite" ]; - "spec_unstable_logs_enabled" = [ "logs" ]; "testing" = [ "trace" ]; "thiserror" = [ "dep:thiserror" ]; "trace" = [ "futures" "thiserror" ]; "tracing" = [ "dep:tracing" ]; }; - resolvedDefaultFeatures = [ "default" "futures" "futures-core" "futures-sink" "internal-logs" "logs" "metrics" "pin-project-lite" "spec_unstable_logs_enabled" "thiserror" "trace" "tracing" ]; + resolvedDefaultFeatures = [ "default" "futures" "futures-core" "futures-sink" "internal-logs" "logs" "metrics" "pin-project-lite" "thiserror" "trace" "tracing" ]; }; "opentelemetry-appender-tracing" = rec { crateName = "opentelemetry-appender-tracing"; - version = "0.31.1"; + version = "0.32.0"; edition = "2021"; - sha256 = "1hnwizzgfhpjfnvml638yy846py8hf2gl1n3p1igbk1srb2ilspg"; + sha256 = "0dyq4myan64sl8wly02jx0gb3jjz7575mn3w8rpphz0xvkq8001c"; libName = "opentelemetry_appender_tracing"; dependencies = [ { @@ -6166,18 +6175,15 @@ rec { ]; features = { "experimental_metadata_attributes" = [ "dep:tracing-log" ]; - "experimental_use_tracing_span_context" = [ "tracing-opentelemetry" ]; "log" = [ "dep:log" ]; - "spec_unstable_logs_enabled" = [ "opentelemetry/spec_unstable_logs_enabled" ]; - "tracing-opentelemetry" = [ "dep:tracing-opentelemetry" ]; }; resolvedDefaultFeatures = [ "default" ]; }; "opentelemetry-http" = rec { crateName = "opentelemetry-http"; - version = "0.31.0"; + version = "0.32.0"; edition = "2021"; - sha256 = "0pc5nw1ds8v8w0nvyall39m92v8m1xl1p3vwvxk6nkhrffdd19np"; + sha256 = "0ca3drvm4fx5nskl7yn42dimy3bg35ppzc85y1p27pz215fh30sn"; libName = "opentelemetry_http"; dependencies = [ { @@ -6213,16 +6219,16 @@ rec { "internal-logs" = [ "opentelemetry/internal-logs" ]; "reqwest" = [ "dep:reqwest" ]; "reqwest-blocking" = [ "dep:reqwest" "reqwest/blocking" ]; - "reqwest-rustls" = [ "dep:reqwest" "reqwest/rustls-tls-native-roots" ]; - "reqwest-rustls-webpki-roots" = [ "dep:reqwest" "reqwest/rustls-tls-webpki-roots" ]; + "reqwest-rustls" = [ "dep:reqwest" "reqwest/default-tls" ]; + "reqwest-rustls-webpki-roots" = [ "dep:reqwest" "reqwest/default-tls" "reqwest/webpki-roots" ]; }; - resolvedDefaultFeatures = [ "internal-logs" "reqwest" "reqwest-blocking" ]; + resolvedDefaultFeatures = [ "reqwest" "reqwest-blocking" ]; }; "opentelemetry-otlp" = rec { crateName = "opentelemetry-otlp"; - version = "0.31.1"; + version = "0.32.0"; edition = "2021"; - sha256 = "07zp0b62b9dajnvvcd6j2ppw5zg7wp4ixka9z6fr3bxrrdmcss8z"; + sha256 = "0d9cys2flpidfxbr6h1103hjc633cax47ihnqgbj0xnicscr4rlr"; libName = "opentelemetry_otlp"; dependencies = [ { @@ -6283,10 +6289,9 @@ rec { usesDefaultFeatures = false; } { - name = "tracing"; - packageId = "tracing"; + name = "tonic-types"; + packageId = "tonic-types"; optional = true; - usesDefaultFeatures = false; } ]; devDependencies = [ @@ -6311,16 +6316,19 @@ rec { ]; features = { "default" = [ "http-proto" "reqwest-blocking-client" "trace" "metrics" "logs" "internal-logs" ]; + "experimental-grpc-retry" = [ "grpc-tonic" "opentelemetry_sdk/experimental_async_runtime" "opentelemetry_sdk/rt-tokio" ]; + "experimental-http-retry" = [ "opentelemetry_sdk/experimental_async_runtime" "opentelemetry_sdk/rt-tokio" "tokio" "httpdate" ]; "flate2" = [ "dep:flate2" ]; - "grpc-tonic" = [ "tonic" "prost" "http" "tokio" "opentelemetry-proto/gen-tonic" ]; + "grpc-tonic" = [ "tonic" "tonic-types" "prost" "http" "tokio" "opentelemetry-proto/gen-tonic" ]; "gzip-http" = [ "flate2" ]; "gzip-tonic" = [ "tonic/gzip" ]; "http" = [ "dep:http" ]; "http-json" = [ "serde_json" "prost" "opentelemetry-http" "opentelemetry-proto/gen-tonic-messages" "opentelemetry-proto/with-serde" "http" "trace" "metrics" ]; "http-proto" = [ "prost" "opentelemetry-http" "opentelemetry-proto/gen-tonic-messages" "http" "trace" "metrics" ]; + "httpdate" = [ "dep:httpdate" ]; "hyper-client" = [ "opentelemetry-http/hyper" ]; "integration-testing" = [ "tonic" "prost" "tokio/full" "trace" "logs" ]; - "internal-logs" = [ "tracing" "opentelemetry_sdk/internal-logs" "opentelemetry-http/internal-logs" ]; + "internal-logs" = [ "opentelemetry_sdk/internal-logs" "opentelemetry/internal-logs" ]; "logs" = [ "opentelemetry/logs" "opentelemetry_sdk/logs" "opentelemetry-proto/logs" ]; "metrics" = [ "opentelemetry/metrics" "opentelemetry_sdk/metrics" "opentelemetry-proto/metrics" ]; "opentelemetry-http" = [ "dep:opentelemetry-http" ]; @@ -6333,27 +6341,27 @@ rec { "serde" = [ "dep:serde" ]; "serde_json" = [ "dep:serde_json" ]; "serialize" = [ "serde" "serde_json" ]; - "tls" = [ "tonic/tls-ring" ]; + "tls" = [ "tls-ring" ]; "tls-aws-lc" = [ "tonic/tls-aws-lc" ]; "tls-provider-agnostic" = [ "tonic/_tls-any" ]; "tls-ring" = [ "tonic/tls-ring" ]; - "tls-roots" = [ "tls" "tonic/tls-native-roots" ]; - "tls-webpki-roots" = [ "tls" "tonic/tls-webpki-roots" ]; + "tls-roots" = [ "tonic/tls-native-roots" ]; + "tls-webpki-roots" = [ "tonic/tls-webpki-roots" ]; "tokio" = [ "dep:tokio" ]; "tonic" = [ "dep:tonic" ]; + "tonic-types" = [ "dep:tonic-types" ]; "trace" = [ "opentelemetry/trace" "opentelemetry_sdk/trace" "opentelemetry-proto/trace" ]; - "tracing" = [ "dep:tracing" ]; "zstd" = [ "dep:zstd" ]; "zstd-http" = [ "zstd" ]; "zstd-tonic" = [ "tonic/zstd" ]; }; - resolvedDefaultFeatures = [ "default" "grpc-tonic" "gzip-tonic" "http" "http-proto" "internal-logs" "logs" "metrics" "opentelemetry-http" "prost" "reqwest" "reqwest-blocking-client" "tokio" "tonic" "trace" "tracing" ]; + resolvedDefaultFeatures = [ "default" "grpc-tonic" "gzip-tonic" "http" "http-proto" "internal-logs" "logs" "metrics" "opentelemetry-http" "prost" "reqwest" "reqwest-blocking-client" "tokio" "tonic" "tonic-types" "trace" ]; }; "opentelemetry-proto" = rec { crateName = "opentelemetry-proto"; - version = "0.31.0"; + version = "0.32.0"; edition = "2021"; - sha256 = "03xkjsjrsm7zkkx5gascqd9bg2z20wymm06l16cyxsp5dpq5s5x7"; + sha256 = "0f5ny4rpnpq6q5q34b8k2q548rf31rpbxkwjqjwzfqxg3yx5imjn"; libName = "opentelemetry_proto"; dependencies = [ { @@ -6397,30 +6405,29 @@ rec { "const-hex" = [ "dep:const-hex" ]; "default" = [ "full" ]; "full" = [ "gen-tonic" "trace" "logs" "metrics" "zpages" "with-serde" "internal-logs" ]; - "gen-tonic" = [ "gen-tonic-messages" "tonic/channel" ]; - "gen-tonic-messages" = [ "tonic" "tonic-prost" "prost" ]; + "gen-tonic" = [ "gen-tonic-messages" "tonic" "tonic-prost" "tonic/channel" ]; + "gen-tonic-messages" = [ "prost" ]; "internal-logs" = [ "opentelemetry/internal-logs" ]; "logs" = [ "opentelemetry/logs" "opentelemetry_sdk/logs" ]; "metrics" = [ "opentelemetry/metrics" "opentelemetry_sdk/metrics" ]; "prost" = [ "dep:prost" ]; "schemars" = [ "dep:schemars" ]; "serde" = [ "dep:serde" ]; - "serde_json" = [ "dep:serde_json" ]; "testing" = [ "opentelemetry/testing" ]; "tonic" = [ "dep:tonic" ]; "tonic-prost" = [ "dep:tonic-prost" ]; "trace" = [ "opentelemetry/trace" "opentelemetry_sdk/trace" ]; "with-schemars" = [ "schemars" ]; - "with-serde" = [ "serde" "const-hex" "base64" "serde_json" ]; + "with-serde" = [ "serde" "const-hex" "base64" ]; "zpages" = [ "trace" ]; }; resolvedDefaultFeatures = [ "gen-tonic" "gen-tonic-messages" "logs" "metrics" "prost" "tonic" "tonic-prost" "trace" ]; }; "opentelemetry-semantic-conventions" = rec { crateName = "opentelemetry-semantic-conventions"; - version = "0.31.0"; + version = "0.32.0"; edition = "2021"; - sha256 = "0in8plv2l2ar7anzi7lrbll0fjfvaymkg5vc5bnvibs1w3gjjbp6"; + sha256 = "0s1x4h1cgmhkxb7i5g02la2vhkf4lg5g26cgn2s2gd1p0j5gk8kc"; libName = "opentelemetry_semantic_conventions"; features = { }; @@ -6428,9 +6435,9 @@ rec { }; "opentelemetry_sdk" = rec { crateName = "opentelemetry_sdk"; - version = "0.31.0"; + version = "0.32.1"; edition = "2021"; - sha256 = "1gbjsggdxfpjbanjvaxa3nq32vfa37i3v13dvx4gsxhrk7sy8jp1"; + sha256 = "1ycl11syranrinhgn4c2hlzhyzyvpa06ryxq5mxgzmf4387ghncv"; dependencies = [ { name = "futures-channel"; @@ -6456,6 +6463,13 @@ rec { packageId = "percent-encoding"; optional = true; } + { + name = "portable-atomic"; + packageId = "portable-atomic"; + usesDefaultFeatures = false; + target = { target, features }: (!("64" == target."has_atomic" or null)); + features = [ "fallback" ]; + } { name = "rand"; packageId = "rand 0.9.4"; @@ -6480,10 +6494,18 @@ rec { optional = true; } ]; + devDependencies = [ + { + name = "tokio"; + packageId = "tokio"; + usesDefaultFeatures = false; + features = [ "macros" "rt-multi-thread" ]; + } + ]; features = { "default" = [ "trace" "metrics" "logs" "internal-logs" ]; "experimental_logs_batch_log_processor_with_async_runtime" = [ "logs" "experimental_async_runtime" ]; - "experimental_logs_concurrent_log_processor" = [ "logs" ]; + "experimental_metrics_bound_instruments" = [ "metrics" "opentelemetry/experimental_metrics_bound_instruments" ]; "experimental_metrics_custom_reader" = [ "metrics" ]; "experimental_metrics_disable_name_validation" = [ "metrics" ]; "experimental_metrics_periodicreader_with_async_runtime" = [ "metrics" "experimental_async_runtime" ]; @@ -6500,15 +6522,14 @@ rec { "rt-tokio-current-thread" = [ "tokio/rt" "tokio/time" "tokio-stream" "experimental_async_runtime" ]; "serde" = [ "dep:serde" ]; "serde_json" = [ "dep:serde_json" ]; - "spec_unstable_logs_enabled" = [ "logs" "opentelemetry/spec_unstable_logs_enabled" ]; "spec_unstable_metrics_views" = [ "metrics" ]; - "testing" = [ "opentelemetry/testing" "trace" "metrics" "logs" "rt-tokio" "rt-tokio-current-thread" "tokio/macros" "tokio/rt-multi-thread" ]; + "testing" = [ "opentelemetry/testing" "trace" "metrics" "logs" "tokio/sync" ]; "tokio" = [ "dep:tokio" ]; "tokio-stream" = [ "dep:tokio-stream" ]; "trace" = [ "opentelemetry/trace" "rand" "percent-encoding" ]; "url" = [ "dep:url" ]; }; - resolvedDefaultFeatures = [ "default" "experimental_async_runtime" "internal-logs" "logs" "metrics" "percent-encoding" "rand" "rt-tokio" "spec_unstable_logs_enabled" "tokio" "tokio-stream" "trace" ]; + resolvedDefaultFeatures = [ "default" "experimental_async_runtime" "internal-logs" "logs" "metrics" "percent-encoding" "rand" "rt-tokio" "tokio" "tokio-stream" "trace" ]; }; "ordered-float" = rec { crateName = "ordered-float"; @@ -7017,7 +7038,7 @@ rec { "default" = [ "fallback" ]; "serde" = [ "dep:serde" ]; }; - resolvedDefaultFeatures = [ "require-cas" ]; + resolvedDefaultFeatures = [ "fallback" "require-cas" ]; }; "portable-atomic-util" = rec { crateName = "portable-atomic-util"; @@ -7285,6 +7306,34 @@ rec { ]; }; + "prost-types" = rec { + crateName = "prost-types"; + version = "0.14.3"; + edition = "2021"; + sha256 = "1mrxrciryfgi6a0vmrgyj3g27r9hdhlgwkq71cgv3icbvg5w94c9"; + libName = "prost_types"; + authors = [ + "Dan Burkert " + "Lucio Franco " + "Casper Meijn " + "Tokio Contributors " + ]; + dependencies = [ + { + name = "prost"; + packageId = "prost"; + usesDefaultFeatures = false; + features = [ "derive" ]; + } + ]; + features = { + "arbitrary" = [ "dep:arbitrary" ]; + "chrono" = [ "dep:chrono" ]; + "default" = [ "std" ]; + "std" = [ "prost/std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; "quote" = rec { crateName = "quote"; version = "1.0.45"; @@ -7714,9 +7763,9 @@ rec { }; "reqwest" = rec { crateName = "reqwest"; - version = "0.12.28"; + version = "0.13.4"; edition = "2021"; - sha256 = "0iqidijghgqbzl3bjg5hb4zmigwa4r612bgi0yiq0c90b6jkrpgd"; + sha256 = "1hy1plns9krbh3h1dy2sdjygsfkdcnxm6pbxdi0ya9b5vq8mi711"; authors = [ "Sean McArthur " ]; @@ -7733,7 +7782,7 @@ rec { name = "futures-channel"; packageId = "futures-channel"; optional = true; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); } { name = "futures-core"; @@ -7753,62 +7802,44 @@ rec { { name = "http-body"; packageId = "http-body"; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); } { name = "http-body-util"; packageId = "http-body-util"; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); } { name = "hyper"; packageId = "hyper"; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); features = [ "http1" "client" ]; } { name = "hyper-util"; packageId = "hyper-util"; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); features = [ "http1" "client" "client-legacy" "client-proxy" "tokio" ]; } { name = "js-sys"; packageId = "js-sys"; - target = { target, features }: ("wasm32" == target."arch" or null); + target = { target, features }: (("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null))); } { name = "log"; packageId = "log"; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); } { name = "percent-encoding"; packageId = "percent-encoding"; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); } { name = "pin-project-lite"; packageId = "pin-project-lite"; - target = { target, features }: (!("wasm32" == target."arch" or null)); - } - { - name = "serde"; - packageId = "serde"; - } - { - name = "serde_json"; - packageId = "serde_json"; - optional = true; - } - { - name = "serde_json"; - packageId = "serde_json"; - target = { target, features }: ("wasm32" == target."arch" or null); - } - { - name = "serde_urlencoded"; - packageId = "serde_urlencoded"; + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); } { name = "sync_wrapper"; @@ -7819,27 +7850,27 @@ rec { name = "tokio"; packageId = "tokio"; usesDefaultFeatures = false; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); features = [ "net" "time" ]; } { name = "tower"; packageId = "tower"; usesDefaultFeatures = false; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); features = [ "retry" "timeout" "util" ]; } { name = "tower-http"; packageId = "tower-http"; usesDefaultFeatures = false; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); features = [ "follow-redirect" ]; } { name = "tower-service"; packageId = "tower-service"; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); } { name = "url"; @@ -7848,17 +7879,17 @@ rec { { name = "wasm-bindgen"; packageId = "wasm-bindgen"; - target = { target, features }: ("wasm32" == target."arch" or null); + target = { target, features }: (("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null))); } { name = "wasm-bindgen-futures"; packageId = "wasm-bindgen-futures"; - target = { target, features }: ("wasm32" == target."arch" or null); + target = { target, features }: (("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null))); } { name = "web-sys"; packageId = "web-sys"; - target = { target, features }: ("wasm32" == target."arch" or null); + target = { target, features }: (("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null))); features = [ "AbortController" "AbortSignal" "Headers" "Request" "RequestInit" "RequestMode" "Response" "Window" "FormData" "Blob" "BlobPropertyBag" "ServiceWorkerGlobalScope" "RequestCredentials" "File" "ReadableStream" "RequestCache" ]; } ]; @@ -7867,33 +7898,27 @@ rec { name = "futures-util"; packageId = "futures-util"; usesDefaultFeatures = false; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); features = [ "std" "alloc" ]; } { name = "hyper"; packageId = "hyper"; usesDefaultFeatures = false; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); features = [ "http1" "http2" "client" "server" ]; } { name = "hyper-util"; packageId = "hyper-util"; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); features = [ "http1" "http2" "client" "client-legacy" "server-auto" "server-graceful" "tokio" ]; } - { - name = "serde"; - packageId = "serde"; - target = { target, features }: (!("wasm32" == target."arch" or null)); - features = [ "derive" ]; - } { name = "tokio"; packageId = "tokio"; usesDefaultFeatures = false; - target = { target, features }: (!("wasm32" == target."arch" or null)); + target = { target, features }: (!(("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)))); features = [ "macros" "rt-multi-thread" ]; } { @@ -7905,40 +7930,37 @@ rec { { name = "wasm-bindgen"; packageId = "wasm-bindgen"; - target = { target, features }: ("wasm32" == target."arch" or null); + target = { target, features }: (("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null))); features = [ "serde-serialize" ]; } ]; features = { + "__native-tls" = [ "dep:hyper-tls" "dep:native-tls-crate" "__tls" "dep:tokio-native-tls" ]; + "__native-tls-alpn" = [ "native-tls-crate?/alpn" "hyper-tls?/alpn" ]; "__rustls" = [ "dep:hyper-rustls" "dep:tokio-rustls" "dep:rustls" "__tls" ]; - "__rustls-ring" = [ "hyper-rustls?/ring" "tokio-rustls?/ring" "rustls?/ring" "quinn?/ring" ]; + "__rustls-aws-lc-rs" = [ "hyper-rustls?/aws-lc-rs" "tokio-rustls?/aws-lc-rs" "rustls?/aws-lc-rs" "quinn?/rustls-aws-lc-rs" ]; "__tls" = [ "dep:rustls-pki-types" "tokio/io-util" ]; "blocking" = [ "dep:futures-channel" "futures-channel?/sink" "dep:futures-util" "futures-util?/io" "futures-util?/sink" "tokio/sync" ]; "brotli" = [ "tower-http/decompression-br" ]; "charset" = [ "dep:encoding_rs" "dep:mime" ]; "cookies" = [ "dep:cookie_crate" "dep:cookie_store" ]; "default" = [ "default-tls" "charset" "http2" "system-proxy" ]; - "default-tls" = [ "dep:hyper-tls" "dep:native-tls-crate" "__tls" "dep:tokio-native-tls" ]; + "default-tls" = [ "rustls" ]; "deflate" = [ "tower-http/decompression-deflate" ]; + "form" = [ "dep:serde" "dep:serde_urlencoded" ]; "gzip" = [ "tower-http/decompression-gzip" ]; - "h2" = [ "dep:h2" ]; "hickory-dns" = [ "dep:hickory-resolver" "dep:once_cell" ]; - "http2" = [ "h2" "hyper/http2" "hyper-util/http2" "hyper-rustls?/http2" ]; - "http3" = [ "rustls-tls-manual-roots" "dep:h3" "dep:h3-quinn" "dep:quinn" "tokio/macros" ]; - "json" = [ "dep:serde_json" ]; - "macos-system-configuration" = [ "system-proxy" ]; + "http2" = [ "dep:h2" "hyper/http2" "hyper-util/http2" "hyper-rustls?/http2" ]; + "http3" = [ "rustls" "dep:h3" "dep:h3-quinn" "dep:quinn" "tokio/macros" ]; + "json" = [ "dep:serde" "dep:serde_json" ]; "multipart" = [ "dep:mime_guess" "dep:futures-util" ]; - "native-tls" = [ "default-tls" ]; - "native-tls-alpn" = [ "native-tls" "native-tls-crate?/alpn" "hyper-tls?/alpn" ]; - "native-tls-vendored" = [ "native-tls" "native-tls-crate?/vendored" ]; - "rustls-tls" = [ "rustls-tls-webpki-roots" ]; - "rustls-tls-manual-roots" = [ "rustls-tls-manual-roots-no-provider" "__rustls-ring" ]; - "rustls-tls-manual-roots-no-provider" = [ "__rustls" ]; - "rustls-tls-native-roots" = [ "rustls-tls-native-roots-no-provider" "__rustls-ring" ]; - "rustls-tls-native-roots-no-provider" = [ "dep:rustls-native-certs" "hyper-rustls?/native-tokio" "__rustls" ]; - "rustls-tls-no-provider" = [ "rustls-tls-manual-roots-no-provider" ]; - "rustls-tls-webpki-roots" = [ "rustls-tls-webpki-roots-no-provider" "__rustls-ring" ]; - "rustls-tls-webpki-roots-no-provider" = [ "dep:webpki-roots" "hyper-rustls?/webpki-tokio" "__rustls" ]; + "native-tls" = [ "__native-tls" "__native-tls-alpn" ]; + "native-tls-no-alpn" = [ "__native-tls" ]; + "native-tls-vendored" = [ "__native-tls" "native-tls-crate?/vendored" "__native-tls-alpn" ]; + "native-tls-vendored-no-alpn" = [ "__native-tls" "native-tls-crate?/vendored" ]; + "query" = [ "dep:serde" "dep:serde_urlencoded" ]; + "rustls" = [ "__rustls-aws-lc-rs" "dep:rustls-platform-verifier" "__rustls" ]; + "rustls-no-provider" = [ "dep:rustls-platform-verifier" "__rustls" ]; "stream" = [ "tokio/fs" "dep:futures-util" "dep:tokio-util" "dep:wasm-streams" ]; "system-proxy" = [ "hyper-util/client-proxy-system" ]; "zstd" = [ "tower-http/decompression-zstd" ]; @@ -9312,29 +9334,25 @@ rec { }; resolvedDefaultFeatures = [ "alloc" "default" "rust_1_61" "rust_1_65" "std" ]; }; - "snafu 0.9.0" = rec { + "snafu 0.9.1" = rec { crateName = "snafu"; - version = "0.9.0"; + version = "0.9.1"; edition = "2018"; - sha256 = "1ii9r99x5qcn754m624yzgb9hzvkqkrcygf0aqh0pyb9dbnvrm6i"; + sha256 = "08k5yfydxdlshivfhrdq9km8qn02r93q28gkyvazbqz2icr1586i"; authors = [ "Jake Goulding " ]; dependencies = [ { name = "snafu-derive"; - packageId = "snafu-derive 0.9.0"; + packageId = "snafu-derive 0.9.1"; } ]; features = { - "backtrace" = [ "dep:backtrace" ]; - "backtraces-impl-backtrace-crate" = [ "backtrace" ]; + "backtraces-impl-backtrace-crate" = [ "dep:backtrace" ]; "default" = [ "std" "rust_1_81" ]; - "futures" = [ "futures-core-crate" "pin-project" ]; - "futures-core-crate" = [ "dep:futures-core-crate" ]; - "futures-crate" = [ "dep:futures-crate" ]; - "internal-dev-dependencies" = [ "futures-crate" ]; - "pin-project" = [ "dep:pin-project" ]; + "futures" = [ "dep:futures-core" "dep:pin-project" ]; + "internal-dev-dependencies" = [ "dep:futures" ]; "std" = [ "alloc" ]; "unstable-provider-api" = [ "snafu-derive/unstable-provider-api" ]; }; @@ -9402,11 +9420,11 @@ rec { }; resolvedDefaultFeatures = [ "rust_1_61" ]; }; - "snafu-derive 0.9.0" = rec { + "snafu-derive 0.9.1" = rec { crateName = "snafu-derive"; - version = "0.9.0"; + version = "0.9.1"; edition = "2018"; - sha256 = "0h0x61kyj4fvilcr2nj02l85shw1ika64vq9brf2gyna662ln9al"; + sha256 = "1nkfi7bis72pz3w7vb64m79w49qsv20sbf19jkd471vbhr83q42z"; procMacro = true; libName = "snafu_derive"; authors = [ @@ -9432,7 +9450,7 @@ rec { name = "syn"; packageId = "syn 2.0.117"; usesDefaultFeatures = false; - features = [ "clone-impls" "derive" "full" "parsing" "printing" "proc-macro" ]; + features = [ "clone-impls" "derive" "full" "parsing" "printing" "proc-macro" "visit-mut" ]; } ]; features = { @@ -9540,8 +9558,8 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7a5f0c3fbcd091340214a23f0607fcd4b4fcc152"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "128e1afca7761d07058624091217b6d695fa790c"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_certs"; @@ -9600,7 +9618,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.0"; + packageId = "snafu 0.9.1"; } { name = "stackable-shared"; @@ -9643,8 +9661,8 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7a5f0c3fbcd091340214a23f0607fcd4b4fcc152"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "128e1afca7761d07058624091217b6d695fa790c"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_operator"; @@ -9702,6 +9720,7 @@ rec { { name = "json-patch"; packageId = "json-patch"; + features = [ "schemars" ]; } { name = "k8s-openapi"; @@ -9751,7 +9770,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.0"; + packageId = "snafu 0.9.1"; } { name = "stackable-operator-derive"; @@ -9805,12 +9824,17 @@ rec { packageId = "url"; features = [ "serde" ]; } + { + name = "uuid"; + packageId = "uuid"; + } ]; features = { "certs" = [ "dep:stackable-certs" ]; + "client-feature-gates" = [ "dep:winnow" ]; "crds" = [ "dep:stackable-versioned" ]; "default" = [ "crds" ]; - "full" = [ "crds" "certs" "time" "webhook" "kube-ws" ]; + "full" = [ "client-feature-gates" "crds" "certs" "time" "webhook" "kube-ws" ]; "kube-ws" = [ "kube/ws" ]; "time" = [ "stackable-shared/time" ]; "webhook" = [ "dep:stackable-webhook" ]; @@ -9823,8 +9847,8 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7a5f0c3fbcd091340214a23f0607fcd4b4fcc152"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "128e1afca7761d07058624091217b6d695fa790c"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; procMacro = true; @@ -9854,12 +9878,12 @@ rec { }; "stackable-shared" = rec { crateName = "stackable-shared"; - version = "0.1.0"; + version = "0.1.1"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7a5f0c3fbcd091340214a23f0607fcd4b4fcc152"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "128e1afca7761d07058624091217b6d695fa790c"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_shared"; @@ -9904,7 +9928,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.0"; + packageId = "snafu 0.9.1"; } { name = "strum"; @@ -9989,7 +10013,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.0"; + packageId = "snafu 0.9.1"; } { name = "stackable-operator"; @@ -10041,12 +10065,12 @@ rec { }; "stackable-telemetry" = rec { crateName = "stackable-telemetry"; - version = "0.6.3"; + version = "0.6.4"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7a5f0c3fbcd091340214a23f0607fcd4b4fcc152"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "128e1afca7761d07058624091217b6d695fa790c"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_telemetry"; @@ -10090,7 +10114,7 @@ rec { { name = "opentelemetry_sdk"; packageId = "opentelemetry_sdk"; - features = [ "rt-tokio" "logs" "rt-tokio" "spec_unstable_logs_enabled" ]; + features = [ "rt-tokio" "logs" "rt-tokio" ]; } { name = "pin-project"; @@ -10098,7 +10122,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.0"; + packageId = "snafu 0.9.1"; } { name = "strum"; @@ -10155,8 +10179,8 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7a5f0c3fbcd091340214a23f0607fcd4b4fcc152"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "128e1afca7761d07058624091217b6d695fa790c"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_versioned"; @@ -10190,7 +10214,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.0"; + packageId = "snafu 0.9.1"; } { name = "stackable-versioned-macros"; @@ -10205,8 +10229,8 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7a5f0c3fbcd091340214a23f0607fcd4b4fcc152"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "128e1afca7761d07058624091217b6d695fa790c"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; procMacro = true; @@ -10273,8 +10297,8 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7a5f0c3fbcd091340214a23f0607fcd4b4fcc152"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "128e1afca7761d07058624091217b6d695fa790c"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_webhook"; @@ -10347,7 +10371,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.0"; + packageId = "snafu 0.9.1"; } { name = "stackable-certs"; @@ -11438,6 +11462,33 @@ rec { } ]; + }; + "tonic-types" = rec { + crateName = "tonic-types"; + version = "0.14.5"; + edition = "2021"; + sha256 = "16bk1cxi2m0xgaabf98nnj7dn9j16ymkh27jq4s3shjm4a85m1ra"; + libName = "tonic_types"; + authors = [ + "Lucio Franco " + "Rafael Lemos " + ]; + dependencies = [ + { + name = "prost"; + packageId = "prost"; + } + { + name = "prost-types"; + packageId = "prost-types"; + } + { + name = "tonic"; + packageId = "tonic"; + usesDefaultFeatures = false; + } + ]; + }; "tower" = rec { crateName = "tower"; @@ -11894,9 +11945,9 @@ rec { }; "tracing-opentelemetry" = rec { crateName = "tracing-opentelemetry"; - version = "0.32.1"; + version = "0.33.0"; edition = "2021"; - sha256 = "1z2jjmxbkm1qawlb3bm99x8xwf4g8wjkbcknm9z4fv1w14nqzhhs"; + sha256 = "09nvxy5m7nxmifz4b6szdcyczapp2jcgxcac0jw4ax8klz5n9g5d"; libName = "tracing_opentelemetry"; dependencies = [ { @@ -12298,6 +12349,66 @@ rec { }; resolvedDefaultFeatures = [ "default" ]; }; + "uuid" = rec { + crateName = "uuid"; + version = "1.23.2"; + edition = "2021"; + sha256 = "1xy942s4z0bi8p3441wvd4ry3hx6ry1c7s6fgrr38462xqybhn6j"; + authors = [ + "Ashley Mannix" + "Dylan DPC" + "Hunar Roop Kahlon" + ]; + dependencies = [ + { + name = "js-sys"; + packageId = "js-sys"; + optional = true; + usesDefaultFeatures = false; + target = { target, features }: (("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null)) && (builtins.elem "atomics" targetFeatures)); + } + { + name = "wasm-bindgen"; + packageId = "wasm-bindgen"; + optional = true; + usesDefaultFeatures = false; + target = { target, features }: (("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null))); + } + ]; + devDependencies = [ + { + name = "wasm-bindgen"; + packageId = "wasm-bindgen"; + target = { target, features }: (("wasm32" == target."arch" or null) && (("unknown" == target."os" or null) || ("none" == target."os" or null))); + } + ]; + features = { + "arbitrary" = [ "dep:arbitrary" ]; + "atomic" = [ "dep:atomic" ]; + "borsh" = [ "dep:borsh" "dep:borsh-derive" ]; + "bytemuck" = [ "dep:bytemuck" ]; + "default" = [ "std" ]; + "fast-rng" = [ "rng" "dep:rand" ]; + "js" = [ "dep:wasm-bindgen" "dep:js-sys" ]; + "md5" = [ "dep:md-5" ]; + "rng" = [ "dep:getrandom" ]; + "rng-getrandom" = [ "rng" "dep:getrandom" "uuid-rng-internal-lib" "uuid-rng-internal-lib/getrandom" ]; + "rng-rand" = [ "rng" "dep:rand" "uuid-rng-internal-lib" "uuid-rng-internal-lib/rand" ]; + "serde" = [ "dep:serde_core" ]; + "sha1" = [ "dep:sha1_smol" ]; + "slog" = [ "dep:slog" ]; + "std" = [ "wasm-bindgen?/std" "js-sys?/std" ]; + "uuid-rng-internal-lib" = [ "dep:uuid-rng-internal-lib" ]; + "v1" = [ "atomic" ]; + "v3" = [ "md5" ]; + "v4" = [ "rng" ]; + "v5" = [ "sha1" ]; + "v6" = [ "atomic" ]; + "v7" = [ "rng" ]; + "zerocopy" = [ "dep:zerocopy" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; "valuable" = rec { crateName = "valuable"; version = "0.1.1"; diff --git a/Cargo.toml b/Cargo.toml index ff9518a7..d1e01a2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ strum = { version = "0.28", features = ["derive"] } tokio = { version = "1.40", features = ["full"] } tracing = "0.1" -[patch."https://github.com/stackabletech/operator-rs"] +[patch."https://github.com/stackabletech/operator-rs.git"] +stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "smooth-operator" } # stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" } # stackable-operator = { path = "../operator-rs/crates/stackable-operator" } diff --git a/crate-hashes.json b/crate-hashes.json index 86f2b840..5b0037c5 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,12 +1,12 @@ { - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#k8s-version@0.1.3": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#stackable-certs@0.4.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#stackable-operator-derive@0.3.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#stackable-operator@0.111.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#stackable-shared@0.1.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#stackable-telemetry@0.6.3": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#stackable-versioned-macros@0.10.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#stackable-versioned@0.10.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.111.1#stackable-webhook@0.9.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#k8s-version@0.1.3": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-certs@0.4.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-operator-derive@0.3.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-operator@0.111.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-shared@0.1.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-telemetry@0.6.4": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-versioned-macros@0.10.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-versioned@0.10.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-webhook@0.9.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", "git+https://github.com/stackabletech/product-config.git?tag=0.8.0#product-config@0.8.0": "1dz70kapm2wdqcr7ndyjji0lhsl98bsq95gnb2lw487wf6yr7987" } \ No newline at end of file diff --git a/rust/operator-binary/src/config/mod.rs b/rust/operator-binary/src/config/mod.rs index c09ab723..e97ef1e4 100644 --- a/rust/operator-binary/src/config/mod.rs +++ b/rust/operator-binary/src/config/mod.rs @@ -1,3 +1,4 @@ pub mod commands; pub mod product_logging; pub mod superset; +pub mod writer; diff --git a/rust/operator-binary/src/config/writer.rs b/rust/operator-binary/src/config/writer.rs new file mode 100644 index 00000000..7c34dec7 --- /dev/null +++ b/rust/operator-binary/src/config/writer.rs @@ -0,0 +1,331 @@ +//! Writer for Flask App configurations (Python config files). +//! +//! Vendored verbatim from `product_config::flask_app_config_writer` so the +//! operator does not depend on the `product-config` crate. Applications based +//! on the Flask App Builder (e.g. Apache Airflow, Apache Superset) use +//! configuration files written in Python. This writer only covers top-level +//! assignments of a few primitive types and expressions — it is not a general +//! Python code generator. +//! +//! Primitive types are escaped accordingly. Python expressions are written as-is; +//! invalid expressions produce invalid configuration files. Config overrides that do +//! not map to a known option are treated as plain expressions. +//! +// TODO: This file is vendored identically in airflow-operator and superset-operator; +// it is a candidate for a shared crate (e.g. operator-rs) so the duplication can be +// removed. Until such a home exists it is kept identical in both operators and to the +// upstream source. + +use std::{ + io::{self, Write}, + num::ParseIntError, + str::{FromStr, ParseBoolError}, +}; + +use snafu::{ResultExt, Snafu}; + +/// Errors which can occur when using this module +// Variant names share the `Error` suffix; kept as-is from the vendored +// `product_config::flask_app_config_writer` source. +#[allow(clippy::enum_variant_names)] +#[derive(Debug, Snafu)] +pub enum FlaskAppConfigWriterError { + #[snafu(display("failed to convert '{value}' into a identifier"))] + ConvertIdentifierError { value: String }, + + #[snafu(display("failed to convert '{value}' into a boolean literal"))] + ConvertBoolLiteralError { + value: String, + source: ParseBoolError, + }, + + #[snafu(display("failed to convert '{value}' into an integer literal"))] + ConvertIntLiteralError { + value: String, + source: ParseIntError, + }, + + #[snafu(display("failed to convert '{value}' into an ASCII string literal"))] + ConvertStringLiteralError { value: String }, + + #[snafu(display("failed to convert '{value}' into a Python expression"))] + ConvertExpressionError { value: String }, + + #[snafu(display("Configuration cannot be written."))] + WriteConfigError { source: io::Error }, +} + +/// Mapping from configuration options to Python types. +pub trait FlaskAppConfigOptions { + fn python_type(&self) -> PythonType; +} + +/// All supported Python types +pub enum PythonType { + /// Python identifier + Identifier, + /// Boolean literal + BoolLiteral, + /// Integer literal + IntLiteral, + /// ASCII string literal + StringLiteral, + /// Python expression + Expression, +} + +impl PythonType { + /// Converts the given string to Python. + fn convert_to_python(&self, value: &str) -> Result { + let convert = match self { + PythonType::Identifier => PythonType::convert_to_python_identifier, + PythonType::BoolLiteral => PythonType::convert_to_python_bool_literal, + PythonType::IntLiteral => PythonType::convert_to_python_int_literal, + PythonType::StringLiteral => PythonType::convert_to_python_string_literal, + PythonType::Expression => PythonType::convert_to_python_expression, + }; + + convert(value) + } + + fn convert_to_python_identifier(value: &str) -> Result { + if value.chars().all(|c| c.is_ascii_alphanumeric() || c == '_') + && value + .chars() + .next() + .filter(|c| !c.is_ascii_digit()) + .is_some() + { + Ok(value.to_string()) + } else { + ConvertIdentifierSnafu { value }.fail() + } + } + + fn convert_to_python_bool_literal(value: &str) -> Result { + value + .parse::() + .map(|b| if b { "True".into() } else { "False".into() }) + .context(ConvertBoolLiteralSnafu { value }) + } + + fn convert_to_python_int_literal(value: &str) -> Result { + value + .parse::() + .map(|i| i.to_string()) + .context(ConvertIntLiteralSnafu { value }) + } + + fn convert_to_python_string_literal(value: &str) -> Result { + if value.is_ascii() { + Ok(format!("\"{}\"", value.escape_default())) + } else { + ConvertStringLiteralSnafu { value }.fail() + } + } + + fn convert_to_python_expression(value: &str) -> Result { + if !value.trim().is_empty() { + Ok(value.to_string()) + } else { + ConvertExpressionSnafu { value }.fail() + } + } +} + +/// Writes a configuration file according to the given `FlaskAppConfigOptions` type. +pub fn write<'a, O, P, W>( + writer: &mut W, + properties: P, + imports: &[&str], +) -> Result<(), FlaskAppConfigWriterError> +where + O: FlaskAppConfigOptions + FromStr, + P: Iterator, + W: Write, +{ + for import in imports { + writeln!(writer, "{import}").context(WriteConfigSnafu)?; + } + + writeln!(writer).context(WriteConfigSnafu)?; + + for (name, value) in properties { + let variable = PythonType::Identifier.convert_to_python(name)?; + + // If an option cannot be mapped to a Python type then it is a config override and treated + // as Python expression. + let content = O::from_str(name) + .map(|option| option.python_type()) + .unwrap_or(PythonType::Expression) + .convert_to_python(value)?; + + writeln!(writer, "{variable} = {content}").context(WriteConfigSnafu)?; + } + + Ok(()) +} + +#[cfg(test)] +mod tests { + use std::{ + collections::BTreeMap, + str::{FromStr, from_utf8}, + }; + + use rstest::*; + + use super::{FlaskAppConfigOptions, FlaskAppConfigWriterError, PythonType, write}; + + #[rstest] + #[case::valid_identifiers_are_converted_to_python( + PythonType::Identifier, &[ + ("_", "_"), + ("a", "a"), + ("A", "A"), + ("__", "__"), + ("_a", "_a"), + ("_A", "_A"), + ("_0", "_0"), + ("SECRET_KEY", "SECRET_KEY"), + ] + )] + #[case::valid_booleans_are_converted_to_python( + PythonType::BoolLiteral, &[ + ("False", "false"), + ("True", "true"), + ] + )] + #[case::valid_integers_are_converted_to_python( + PythonType::IntLiteral, &[ + ("-9223372036854775808", "-9223372036854775808"), + ("0", "0"), + ("9223372036854775807", "9223372036854775807"), + ] + )] + #[case::valid_strings_are_converted_to_python( + PythonType::StringLiteral, &[ + (r#""""#, ""), + (r#"" ~""#, " ~"), + (r#""\t\r\n\'\"\\""#, "\t\r\n'\"\\"), + ] + )] + #[case::valid_expressions_are_converted_to_python( + PythonType::Expression, &[ + ("os.environ[\"HOME\"]", "os.environ[\"HOME\"]"), + ] + )] + fn valid_values_are_converted_to_python( + #[case] python_type: PythonType, + #[case] values: &[(&str, &str)], + ) -> Result<(), FlaskAppConfigWriterError> { + for (expected, input) in values { + assert_eq!(*expected, python_type.convert_to_python(input)?); + } + + Ok(()) + } + + #[rstest] + #[case::invalid_identifiers_are_not_converted_to_python( + PythonType::Identifier, &[ + "", "0", "-", "\n", "_-", "_\n", + ] + )] + #[case::invalid_booleans_are_not_converted_to_python( + PythonType::BoolLiteral, &[ + "", "False", "True", "0", "1", + ] + )] + #[case::invalid_integers_are_not_converted_to_python( + PythonType::IntLiteral, &[ + "", "a", "0x10", "inf", + ] + )] + #[case::invalid_strings_are_not_converted_to_python( + PythonType::StringLiteral, &[ + "ä", "❤" + ] + )] + #[case::invalid_expressions_are_not_converted_to_python( + PythonType::Expression, &[ + "" + ] + )] + fn invalid_values_are_converted_to_python( + #[case] python_type: PythonType, + #[case] values: &[&str], + ) { + for input in values { + assert!(python_type.convert_to_python(input).is_err()); + } + } + + #[test] + fn valid_options_are_written_into_a_configuration() -> Result<(), FlaskAppConfigWriterError> { + #[allow(clippy::enum_variant_names)] + enum Options { + BoolOption, + IntOption, + StringOption, + ExpressionOption, + _UnusedOption, + } + + impl FromStr for Options { + type Err = &'static str; + + fn from_str(s: &str) -> Result { + match s { + "BOOL_OPTION" => Ok(Options::BoolOption), + "INT_OPTION" => Ok(Options::IntOption), + "STRING_OPTION" => Ok(Options::StringOption), + "EXPRESSION_OPTION" => Ok(Options::ExpressionOption), + _ => Err("unknown option"), + } + } + } + + impl FlaskAppConfigOptions for Options { + fn python_type(&self) -> PythonType { + match self { + Options::BoolOption => PythonType::BoolLiteral, + Options::IntOption => PythonType::IntLiteral, + Options::StringOption => PythonType::StringLiteral, + Options::ExpressionOption => PythonType::Expression, + Options::_UnusedOption => PythonType::Expression, + } + } + } + + let config: BTreeMap<_, _> = [ + ("BOOL_OPTION", "true"), + ("INT_OPTION", "0"), + ("STRING_OPTION", ""), + ("EXPRESSION_OPTION", "{ \"key\": \"value\" }"), + ("OVERRIDDEN_OPTION", "None"), + ] + .map(|(k, v)| (k.to_string(), v.to_string())) + .into(); + + let imports = ["import module", "from module import member"]; + + let mut config_file = Vec::new(); + write::(&mut config_file, config.iter(), &imports)?; + + assert_eq!( + r#"import module +from module import member + +BOOL_OPTION = True +EXPRESSION_OPTION = { "key": "value" } +INT_OPTION = 0 +OVERRIDDEN_OPTION = None +STRING_OPTION = "" +"#, + from_utf8(&config_file).unwrap() + ); + + Ok(()) + } +} diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index a1e780c5..eaf7aea1 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -1,6 +1,5 @@ use std::collections::BTreeMap; -use product_config::flask_app_config_writer::{FlaskAppConfigOptions, PythonType}; use serde::{Deserialize, Serialize}; use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::{ @@ -35,6 +34,7 @@ use stackable_operator::{ use strum::{Display, EnumIter, EnumString, IntoEnumIterator}; use crate::{ + config::writer::{FlaskAppConfigOptions, PythonType}, crd::{ databases::{ CeleryBrokerConnection, CeleryResultsBackendConnection, MetadataDatabaseConnection, diff --git a/rust/operator-binary/src/resources/configmap.rs b/rust/operator-binary/src/resources/configmap.rs index 5f3e4b20..bcd2e316 100644 --- a/rust/operator-binary/src/resources/configmap.rs +++ b/rust/operator-binary/src/resources/configmap.rs @@ -3,10 +3,7 @@ use std::{ io::Write, }; -use product_config::{ - flask_app_config_writer::{self}, - types::PropertyNameKind, -}; +use product_config::types::PropertyNameKind; use snafu::{ResultExt, Snafu}; use stackable_operator::{ builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder}, @@ -19,7 +16,12 @@ use stackable_operator::{ use crate::{ authorization::opa::{OPA_IMPORTS, SupersetOpaConfigResolved}, - config::{self, product_logging::extend_config_map_with_log_config, superset::PYTHON_IMPORTS}, + config::{ + self, + product_logging::extend_config_map_with_log_config, + superset::PYTHON_IMPORTS, + writer::{self, FlaskAppConfigWriterError}, + }, controller::SUPERSET_CONTROLLER_NAME, crd::{ SUPERSET_CONFIG_FILENAME, SupersetConfigOptions, @@ -51,7 +53,7 @@ pub enum Error { #[snafu(display("failed to build config file for {rolegroup}"))] BuildRoleGroupConfigFile { - source: flask_app_config_writer::FlaskAppConfigWriterError, + source: FlaskAppConfigWriterError, rolegroup: RoleGroupRef, }, @@ -115,7 +117,7 @@ pub fn build_rolegroup_config_map( } let temp_file_footer = config_properties.remove(CONFIG_OVERRIDE_FILE_FOOTER_KEY); - flask_app_config_writer::write::( + writer::write::( &mut config_file, config_properties.iter(), &imports, From 0e7700dffaf619ddcefd98f976029c770081fd70 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 5 Jun 2026 10:15:43 +0200 Subject: [PATCH 02/16] feat: remove product-config; assemble config/env in validate Replaces the product-config validation path: ValidatedRoleGroupConfig now carries the complete superset_config.py key/value map (operator recommended values + config-derived values + user configOverrides, in that precedence) and the merged env overrides, assembled in validate. The recommended values formerly injected from properties.yaml (ROW_LIMIT=50000, SUPERSET_WEBSERVER_TIMEOUT=300, node role only, incl. the Trino-query timeout rationale) and the MAPBOX secret env injection from Configuration::compute_env move into collect_role_group_config. configOverrides now use stackable_operator::v2::config_overrides::KeyValueConfigOverrides (matching the other operators); the v1 KeyValueOverridesProvider and Configuration impls are removed. The statefulset still reads SUPERSET_WEBSERVER_TIMEOUT from the final file map, preserving configOverrides-based override semantics. Drops the product-config crate dependency (transitive via stackable-operator remains). CRD gains `nullable: true` on configOverrides values. Rendered superset_config.py and env vars are unchanged (33 tests pass; byte parity to be confirmed via kuttl). Regenerated extra/crds.yaml and Cargo.nix. Co-Authored-By: Claude Opus 4.8 --- Cargo.lock | 1 - Cargo.nix | 4 - Cargo.toml | 1 - extra/crds.yaml | 6 + rust/operator-binary/Cargo.toml | 1 - rust/operator-binary/src/controller.rs | 13 +- .../src/controller/validate.rs | 213 ++++++++++++------ rust/operator-binary/src/crd/mod.rs | 84 +------ rust/operator-binary/src/main.rs | 8 +- .../src/resources/configmap.rs | 14 +- .../src/resources/deployment.rs | 31 +-- .../src/resources/statefulset.rs | 23 +- 12 files changed, 173 insertions(+), 226 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f7b42a48..0d6a2160 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3007,7 +3007,6 @@ dependencies = [ "fnv", "futures 0.3.32", "indoc", - "product-config", "rstest", "serde", "serde_json", diff --git a/Cargo.nix b/Cargo.nix index c1fdd941..cd6fdfc7 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -9998,10 +9998,6 @@ rec { name = "indoc"; packageId = "indoc"; } - { - name = "product-config"; - packageId = "product-config"; - } { name = "serde"; packageId = "serde"; diff --git a/Cargo.toml b/Cargo.toml index d1e01a2d..35091154 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,6 @@ edition = "2021" repository = "https://github.com/stackabletech/superset-operator" [workspace.dependencies] -product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" } stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.111.1", features = ["webhook"] } anyhow = "1.0" diff --git a/extra/crds.yaml b/extra/crds.yaml index 5add8d90..51d8f4a0 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -335,6 +335,7 @@ spec: properties: superset_config.py: additionalProperties: + nullable: true type: string description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. @@ -712,6 +713,7 @@ spec: properties: superset_config.py: additionalProperties: + nullable: true type: string description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. @@ -1470,6 +1472,7 @@ spec: properties: superset_config.py: additionalProperties: + nullable: true type: string description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. @@ -1847,6 +1850,7 @@ spec: properties: superset_config.py: additionalProperties: + nullable: true type: string description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. @@ -2213,6 +2217,7 @@ spec: properties: superset_config.py: additionalProperties: + nullable: true type: string description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. @@ -2590,6 +2595,7 @@ spec: properties: superset_config.py: additionalProperties: + nullable: true type: string description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. diff --git a/rust/operator-binary/Cargo.toml b/rust/operator-binary/Cargo.toml index bfd455e9..f0ee44a5 100644 --- a/rust/operator-binary/Cargo.toml +++ b/rust/operator-binary/Cargo.toml @@ -9,7 +9,6 @@ repository.workspace = true publish = false [dependencies] -product-config.workspace = true stackable-operator.workspace = true anyhow.workspace = true diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 0918caff..eb7e1fd3 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -4,7 +4,6 @@ pub mod validate; use std::sync::Arc; use const_format::concatcp; -use product_config::ProductConfigManager; use snafu::{ResultExt, Snafu}; use stackable_operator::{ cli::OperatorEnvironmentOptions, @@ -49,7 +48,6 @@ pub const CONTAINER_IMAGE_BASE_NAME: &str = "superset"; pub struct Ctx { pub client: stackable_operator::client::Client, - pub product_config: ProductConfigManager, pub operator_environment: OperatorEnvironmentOptions, } @@ -202,7 +200,6 @@ pub async fn reconcile_superset( superset, dereferenced, &ctx.operator_environment.image_repository, - &ctx.product_config, ) .context(ValidateSnafu)?; let resolved_product_image = &validated.image; @@ -253,14 +250,13 @@ pub async fn reconcile_superset( for (superset_role, rolegroup_configs) in validated.role_groups.iter() { for (rolegroup_name, validated_rolegroup) in rolegroup_configs.iter() { let rolegroup = superset.rolegroup_ref(superset_role, rolegroup_name); - let rolegroup_config = &validated_rolegroup.product_config_properties; let config = &validated_rolegroup.merged_config; let rg_configmap = build_rolegroup_config_map( superset, resolved_product_image, &rolegroup, - rolegroup_config, + &validated_rolegroup.config_file_properties, auth_config, superset_opa_config, &config.logging, @@ -303,7 +299,8 @@ pub async fn reconcile_superset( resolved_product_image, superset_role, &rolegroup, - rolegroup_config, + &validated_rolegroup.config_file_properties, + &validated_rolegroup.env_overrides, auth_config, &rbac_sa.name_any(), config, @@ -328,7 +325,7 @@ pub async fn reconcile_superset( resolved_product_image, superset_role, &rolegroup, - rolegroup_config, + &validated_rolegroup.env_overrides, &rbac_sa.name_any(), config, ) @@ -352,7 +349,7 @@ pub async fn reconcile_superset( resolved_product_image, superset_role, &rolegroup, - rolegroup_config, + &validated_rolegroup.env_overrides, &rbac_sa.name_any(), config, ) diff --git a/rust/operator-binary/src/controller/validate.rs b/rust/operator-binary/src/controller/validate.rs index 9beb9a82..3869ff63 100644 --- a/rust/operator-binary/src/controller/validate.rs +++ b/rust/operator-binary/src/controller/validate.rs @@ -3,19 +3,11 @@ //! Synchronously validates inputs that don't require a Kubernetes client. Produces //! [`ValidatedSupersetCluster`], consumed by the rest of `reconcile_superset`. -use std::{ - collections::{BTreeMap, HashMap}, - str::FromStr, -}; +use std::collections::{BTreeMap, HashMap}; -use product_config::{ProductConfigManager, types::PropertyNameKind}; use snafu::{ResultExt, Snafu}; use stackable_operator::{ commons::product_image_selection::{self, ResolvedProductImage}, - product_config_utils::{ - ValidatedRoleConfigByPropertyKind, transform_all_roles_to_config, - validate_all_roles_and_groups_config, - }, role_utils::GenericRoleConfig, }; use strum::IntoEnumIterator; @@ -25,7 +17,7 @@ use crate::{ built_info::PKG_VERSION, controller::{CONTAINER_IMAGE_BASE_NAME, dereference::DereferencedObjects}, crd::{ - SUPERSET_CONFIG_FILENAME, SupersetRole, + SupersetConfigOptions, SupersetRole, SupersetRoleType, authentication::SupersetClientAuthenticationDetailsResolved, v1alpha1::{SupersetCluster, SupersetConfig}, }, @@ -38,24 +30,8 @@ pub enum Error { source: product_image_selection::Error, }, - #[snafu(display("failed to generate product config"))] - GenerateProductConfig { - source: stackable_operator::product_config_utils::Error, - }, - - #[snafu(display("invalid product config"))] - InvalidProductConfig { - source: stackable_operator::product_config_utils::Error, - }, - #[snafu(display("failed to resolve and merge config for role and role group"))] FailedToResolveConfig { source: crate::crd::Error }, - - #[snafu(display("failed to parse Superset role [{role}]"))] - ParseRole { - source: strum::ParseError, - role: String, - }, } /// Per-role configuration extracted during validation. @@ -66,17 +42,25 @@ pub struct ValidatedRoleConfig { pub group_listener_name: Option, } -/// Per-rolegroup configuration: the merged CRD config plus the product-config properties. +/// Per-rolegroup configuration: the merged CRD config plus the assembled property maps. #[derive(Clone, Debug)] pub struct ValidatedRoleGroupConfig { pub merged_config: SupersetConfig, - pub product_config_properties: HashMap>, + // DESIGN DECISION: this is the COMPLETE superset_config.py key/value map (operator + // recommended values + config-derived values + user configOverrides), not just the + // user overrides. Superset differs from airflow/kafka here: the old product-config + // path injected role-scoped recommended values (ROW_LIMIT, SUPERSET_WEBSERVER_TIMEOUT + // from properties.yaml) and config-derived values (compute_files), and the + // statefulset reads SUPERSET_WEBSERVER_TIMEOUT back out of this map. Alternative: + // store only the user overrides and re-derive the rest at each consumer — rejected, + // it would duplicate the precedence logic and break the statefulset's read-back. + pub config_file_properties: BTreeMap, + pub env_overrides: BTreeMap, } -/// The validated cluster: proves that product-config validation and config merging -/// succeeded for every role and role group before any Kubernetes resources are created. -/// Carries the dereferenced external objects so downstream code has a single "ready to use" -/// view of the cluster. +/// The validated cluster: proves that config merging succeeded for every role and role group +/// before any Kubernetes resources are created. Carries the dereferenced external objects so +/// downstream code has a single "ready to use" view of the cluster. pub struct ValidatedSupersetCluster { pub image: ResolvedProductImage, pub role_groups: HashMap>, @@ -89,7 +73,6 @@ pub fn validate_cluster( superset: &SupersetCluster, dereferenced: DereferencedObjects, image_repository: &str, - product_config_manager: &ProductConfigManager, ) -> Result { let DereferencedObjects { authentication_config, @@ -102,71 +85,48 @@ pub fn validate_cluster( .resolve(CONTAINER_IMAGE_BASE_NAME, image_repository, PKG_VERSION) .context(ResolveProductImageSnafu)?; - let mut roles = HashMap::new(); - for role in SupersetRole::iter() { - if let Some(resolved_role) = superset.get_role(&role) { - roles.insert( - role.to_string(), - ( - vec![ - PropertyNameKind::Env, - PropertyNameKind::File(SUPERSET_CONFIG_FILENAME.into()), - ], - resolved_role.clone(), - ), - ); - } - } - - let role_config = transform_all_roles_to_config(superset, &roles); - let validated_role_config: ValidatedRoleConfigByPropertyKind = - validate_all_roles_and_groups_config( - &resolved_product_image.product_version, - &role_config.context(GenerateProductConfigSnafu)?, - product_config_manager, - false, - false, - ) - .context(InvalidProductConfigSnafu)?; - let mut role_groups = HashMap::new(); let mut role_configs = HashMap::new(); - for (role_name, rolegroup_configs) in validated_role_config.iter() { - let superset_role = SupersetRole::from_str(role_name).context(ParseRoleSnafu { - role: role_name.to_string(), - })?; + for role in SupersetRole::iter() { + let Some(resolved_role) = superset.get_role(&role) else { + continue; + }; role_configs.insert( - superset_role.clone(), + role.clone(), ValidatedRoleConfig { - pdb: superset.generic_role_config(&superset_role).map( + pdb: superset.generic_role_config(&role).map( |GenericRoleConfig { pod_disruption_budget, }| pod_disruption_budget, ), - listener_class: superset_role.listener_class_name(superset), - group_listener_name: superset.group_listener_name(&superset_role), + listener_class: role.listener_class_name(superset), + group_listener_name: superset.group_listener_name(&role), }, ); let mut group_configs = BTreeMap::new(); - for (rolegroup_name, rolegroup_config) in rolegroup_configs.iter() { - let rolegroup_ref = superset.rolegroup_ref(&superset_role, rolegroup_name); + for rolegroup_name in resolved_role.role_groups.keys() { + let rolegroup_ref = superset.rolegroup_ref(&role, rolegroup_name); let merged_config = superset - .merged_config(&superset_role, &rolegroup_ref) + .merged_config(&role, &rolegroup_ref) .context(FailedToResolveConfigSnafu)?; + let (config_file_properties, env_overrides) = + collect_role_group_config(superset, &role, resolved_role, rolegroup_name, &merged_config); + group_configs.insert( rolegroup_name.clone(), ValidatedRoleGroupConfig { merged_config, - product_config_properties: rolegroup_config.clone(), + config_file_properties, + env_overrides, }, ); } - role_groups.insert(superset_role, group_configs); + role_groups.insert(role, group_configs); } Ok(ValidatedSupersetCluster { @@ -177,3 +137,110 @@ pub fn validate_cluster( opa_config, }) } + +// DESIGN DECISION: the per-rolegroup file map and env map are assembled here, in +// validation, reproducing the old product-config precedence exactly: +// user configOverrides > config-derived values > operator recommended values. +// Alternative: a generic with_validated_config-style merge. The upstream +// stackable_operator::v2::role_utils::with_validated_config is published on the +// smooth-operator branch but not consumed by any operator yet; trino-operator uses +// its own vendored, deliberately simplified variant (framework::role_utils) because +// its JavaCommonConfig cannot implement Merge. Neither variant covers the +// recommended-value injection and the statefulset's file read-back that superset +// needs, so the merge is assembled explicitly here. +fn collect_role_group_config( + superset: &SupersetCluster, + role: &SupersetRole, + resolved_role: &SupersetRoleType, + rolegroup_name: &str, + merged_config: &SupersetConfig, +) -> (BTreeMap, BTreeMap) { + // --- config_file_properties (superset_config.py key/value map) --- + + let mut config_file_properties: BTreeMap = BTreeMap::new(); + + // Step 1: Operator recommended values — Node role only, matching the old + // properties.yaml role-scoping (worker/beat never received these). + if *role == SupersetRole::Node { + // Operator recommended values, formerly injected by product-config from + // deploy/config-spec/properties.yaml (role-scoped to the node role). + // ROW_LIMIT: row limit when requesting chart data. + // SUPERSET_WEBSERVER_TIMEOUT: the default timeout of Superset is 60s which is way + // too low when querying "big data" systems. Especially Trino queries often take + // longer. See https://superset.apache.org/docs/frequently-asked-questions#why-are-my-queries-timing-out + config_file_properties.insert( + SupersetConfigOptions::RowLimit.to_string(), + "50000".to_string(), + ); + config_file_properties.insert( + SupersetConfigOptions::SupersetWebserverTimeout.to_string(), + "300".to_string(), + ); + } + + // Step 2: Config-derived values (all roles) — mirror old compute_files logic. + // row_limit and webserver_timeout are Option<_> on the validated SupersetConfig; + // when set by the user they override the recommended values above. + if let Some(v) = merged_config.row_limit { + config_file_properties.insert(SupersetConfigOptions::RowLimit.to_string(), v.to_string()); + } + if let Some(v) = merged_config.webserver_timeout { + config_file_properties.insert( + SupersetConfigOptions::SupersetWebserverTimeout.to_string(), + v.to_string(), + ); + } + + // Step 3: User configOverrides — role level first, then rolegroup extends on top + // (rolegroup wins). None values in the v2 map are dropped (deletion semantics). + let role_overrides: BTreeMap> = resolved_role + .config + .config_overrides + .superset_config_py + .as_ref() + .map(|o| o.overrides.clone()) + .unwrap_or_default(); + let rg_overrides: BTreeMap> = resolved_role + .role_groups + .get(rolegroup_name) + .and_then(|rg| rg.config.config_overrides.superset_config_py.as_ref()) + .map(|o| o.overrides.clone()) + .unwrap_or_default(); + let mut merged_overrides = role_overrides; + merged_overrides.extend(rg_overrides); + config_file_properties.extend(merged_overrides.into_iter().filter_map(|(k, v)| v.map(|v| (k, v)))); + + // --- env_overrides --- + + // DESIGN DECISION: the MAPBOX secret property is injected first (moved here from + // crd Configuration::compute_env), then user envOverrides (role then rolegroup) + // extend on top so a user-set key wins — the same precedence product-config used. + // Alternative: inject after user overrides (operator wins) — rejected to preserve + // the previous precedence. + let mut env_overrides: BTreeMap = BTreeMap::new(); + + if let Some(mapbox_secret) = &superset.spec.cluster_config.mapbox_secret { + env_overrides.insert( + SupersetConfig::MAPBOX_SECRET_PROPERTY.to_string(), + mapbox_secret.clone(), + ); + } + + env_overrides.extend( + resolved_role + .config + .env_overrides + .iter() + .map(|(k, v)| (k.clone(), v.clone())), + ); + if let Some(rg) = resolved_role.role_groups.get(rolegroup_name) { + env_overrides.extend( + rg.config + .env_overrides + .iter() + .map(|(k, v)| (k.clone(), v.clone())), + ); + } + + (config_file_properties, env_overrides) +} diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index eaf7aea1..d4a0ec14 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -1,5 +1,3 @@ -use std::collections::BTreeMap; - use serde::{Deserialize, Serialize}; use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::{ @@ -18,12 +16,11 @@ use stackable_operator::{ fragment::{self, Fragment, ValidationError}, merge::Merge, }, - config_overrides::{KeyValueConfigOverrides, KeyValueOverridesProvider}, + v2::config_overrides::KeyValueConfigOverrides, deep_merger::ObjectOverrides, k8s_openapi::apimachinery::pkg::api::resource::Quantity, kube::{CustomResource, ResourceExt, runtime::reflector::ObjectRef}, memory::{BinaryMultiple, MemoryQuantity}, - product_config_utils::{self, Configuration}, product_logging::{self, spec::Logging}, role_utils::{GenericRoleConfig, Role, RoleGroupRef}, schemars::{self, JsonSchema}, @@ -192,6 +189,8 @@ pub mod versioned { #[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct SupersetConfigOverrides { + // Uses the v2 KeyValueConfigOverrides (Merge-capable, nullable values) to match + // trino/hdfs/airflow/kafka. Resolution happens in controller/validate.rs. #[serde( default, rename = "superset_config.py", @@ -372,18 +371,7 @@ impl Default for v1alpha1::SupersetRoleConfig { } } -impl KeyValueOverridesProvider for v1alpha1::SupersetConfigOverrides { - fn get_key_value_overrides(&self, file: &str) -> BTreeMap> { - match file { - SUPERSET_CONFIG_FILENAME => self - .superset_config_py - .as_ref() - .map(KeyValueConfigOverrides::as_product_config_overrides) - .unwrap_or_default(), - _ => BTreeMap::new(), - } - } -} +// KeyValueOverridesProvider impl removed — override resolution moved to controller/validate.rs::collect_role_group_config. #[derive( Clone, @@ -428,23 +416,6 @@ impl SupersetRole { } } -impl SupersetConfigOptions { - /// Mapping from `SupersetConfigOptions` to the values set in `SupersetConfigFragment`. - /// `None` is returned if either the according option is not set or is not exposed in the - /// `SupersetConfig`. - fn config_type_to_string( - &self, - superset_config: &v1alpha1::SupersetConfigFragment, - ) -> Option { - match self { - SupersetConfigOptions::RowLimit => superset_config.row_limit.map(|v| v.to_string()), - SupersetConfigOptions::SupersetWebserverTimeout => { - superset_config.webserver_timeout.map(|v| v.to_string()) - } - _ => None, - } - } -} impl FlaskAppConfigOptions for SupersetConfigOptions { fn python_type(&self) -> PythonType { @@ -556,51 +527,8 @@ impl v1alpha1::SupersetConfig { } } -impl Configuration for v1alpha1::SupersetConfigFragment { - type Configurable = v1alpha1::SupersetCluster; - - fn compute_env( - &self, - cluster: &Self::Configurable, - _role_name: &str, - ) -> Result>, product_config_utils::Error> { - let mut result = BTreeMap::new(); - if let Some(msec) = &cluster.spec.cluster_config.mapbox_secret { - result.insert( - v1alpha1::SupersetConfig::MAPBOX_SECRET_PROPERTY.to_string(), - Some(msec.clone()), - ); - } - Ok(result) - } - - fn compute_cli( - &self, - _cluster: &Self::Configurable, - _role_name: &str, - ) -> Result>, product_config_utils::Error> { - Ok(BTreeMap::new()) - } - - fn compute_files( - &self, - _cluster: &Self::Configurable, - _role_name: &str, - file: &str, - ) -> Result>, product_config_utils::Error> { - let mut result = BTreeMap::new(); - - if file == SUPERSET_CONFIG_FILENAME { - for option in SupersetConfigOptions::iter() { - if let Some(value) = option.config_type_to_string(self) { - result.insert(option.to_string(), Some(value)); - } - } - } - - Ok(result) - } -} +// Configuration::compute_env (mapbox secret injection) moved to controller/validate.rs::collect_role_group_config. +// Configuration::compute_files (row_limit / webserver_timeout derivation) moved to controller/validate.rs::collect_role_group_config. impl HasStatusCondition for v1alpha1::SupersetCluster { fn conditions(&self) -> Vec { diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index 6709b422..ea04f865 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -78,9 +78,9 @@ async fn main() -> anyhow::Result<()> { Command::Run(RunArguments { operator_environment, watch_namespace, - product_config, maintenance, common, + .. }) => { // NOTE (@NickLarsenNZ): Before stackable-telemetry was used: // - The console log level was set by `SUPERSET_OPERATOR_LOG`, and is now `CONSOLE_LOG` (when using Tracing::pre_configured). @@ -125,11 +125,6 @@ async fn main() -> anyhow::Result<()> { .run(sigterm_watcher.handle()) .map_err(|err| anyhow!(err).context("failed to run webhook server")); - let product_config = product_config.load(&[ - "deploy/config-spec/properties.yaml", - "/etc/stackable/superset-operator/config-spec/properties.yaml", - ])?; - let superset_event_recorder = Arc::new(Recorder::new( client.as_kube_client(), Reporter { @@ -188,7 +183,6 @@ async fn main() -> anyhow::Result<()> { Arc::new(controller::Ctx { client: client.clone(), operator_environment: operator_environment.clone(), - product_config, }), ) // We can let the reporting happen in the background diff --git a/rust/operator-binary/src/resources/configmap.rs b/rust/operator-binary/src/resources/configmap.rs index bcd2e316..e89ffe4b 100644 --- a/rust/operator-binary/src/resources/configmap.rs +++ b/rust/operator-binary/src/resources/configmap.rs @@ -1,9 +1,8 @@ use std::{ - collections::{BTreeMap, HashMap}, + collections::BTreeMap, io::Write, }; -use product_config::types::PropertyNameKind; use snafu::{ResultExt, Snafu}; use stackable_operator::{ builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder}, @@ -72,7 +71,7 @@ pub fn build_rolegroup_config_map( superset: &SupersetCluster, resolved_product_image: &ResolvedProductImage, rolegroup: &RoleGroupRef, - rolegroup_config: &HashMap>, + config_file_properties: &BTreeMap, authentication_config: &SupersetClientAuthenticationDetailsResolved, superset_opa_config: &Option, logging: &Logging, @@ -99,14 +98,7 @@ pub fn build_rolegroup_config_map( // The order here should be kept in order to preserve overrides. // No properties should be added after this extend. - config_properties.extend( - rolegroup_config - .get(&PropertyNameKind::File( - SUPERSET_CONFIG_FILENAME.to_string(), - )) - .cloned() - .unwrap_or_default(), - ); + config_properties.extend(config_file_properties.clone()); let mut config_file = Vec::new(); diff --git a/rust/operator-binary/src/resources/deployment.rs b/rust/operator-binary/src/resources/deployment.rs index 55fc209b..5dc1b9b1 100644 --- a/rust/operator-binary/src/resources/deployment.rs +++ b/rust/operator-binary/src/resources/deployment.rs @@ -1,7 +1,6 @@ -use std::collections::{BTreeMap, HashMap}; +use std::collections::BTreeMap; use indoc::formatdoc; -use product_config::types::PropertyNameKind; use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::{ builder::{ @@ -34,8 +33,8 @@ use crate::{ controller::SUPERSET_CONTROLLER_NAME, crd::{ APP_NAME, APP_PORT, METRICS_PORT, METRICS_PORT_NAME, PYTHONPATH, STACKABLE_CONFIG_DIR, - STACKABLE_LOG_CONFIG_DIR, STACKABLE_LOG_DIR, SUPERSET_CONFIG_FILENAME, - SupersetConfigOptions, SupersetRole, + STACKABLE_LOG_CONFIG_DIR, STACKABLE_LOG_DIR, + SupersetRole, v1alpha1::{Container, SupersetCluster, SupersetConfig}, }, operations::graceful_shutdown::add_graceful_shutdown_config, @@ -80,14 +79,6 @@ pub enum Error { source: stackable_operator::builder::meta::Error, }, - #[snafu(display( - "failed to get the {SUPERSET_CONFIG_FILENAME} file from node or product config" - ))] - MissingSupersetConfigInNodeConfig, - - #[snafu(display("failed to get {timeout} from {SUPERSET_CONFIG_FILENAME} file. It should be set in the product config or by user input", timeout = SupersetConfigOptions::SupersetWebserverTimeout))] - MissingWebServerTimeoutInSupersetConfig, - #[snafu(display("failed to configure logging"))] ConfigureLogging { source: product_logging::framework::LoggingError, @@ -112,7 +103,7 @@ pub fn build_worker_rolegroup_deployment( resolved_product_image: &ResolvedProductImage, superset_role: &SupersetRole, rolegroup_ref: &RoleGroupRef, - node_config: &HashMap>, + env_overrides: &BTreeMap, sa_name: &str, merged_config: &SupersetConfig, ) -> Result { @@ -173,11 +164,7 @@ pub fn build_worker_rolegroup_deployment( celery_broker_connection_details.add_to_container(&mut superset_cb); } - for (name, value) in node_config - .get(&PropertyNameKind::Env) - .cloned() - .unwrap_or_default() - { + for (name, value) in env_overrides.clone() { if name == SupersetConfig::MAPBOX_SECRET_PROPERTY { superset_cb.add_env_var_from_secret( "MAPBOX_API_KEY", @@ -373,7 +360,7 @@ pub fn build_beat_rolegroup_deployment( resolved_product_image: &ResolvedProductImage, superset_role: &SupersetRole, rolegroup_ref: &RoleGroupRef, - node_config: &HashMap>, + env_overrides: &BTreeMap, sa_name: &str, merged_config: &SupersetConfig, ) -> Result { @@ -434,11 +421,7 @@ pub fn build_beat_rolegroup_deployment( celery_broker_connection_details.add_to_container(&mut superset_cb); } - for (name, value) in node_config - .get(&PropertyNameKind::Env) - .cloned() - .unwrap_or_default() - { + for (name, value) in env_overrides.clone() { if name == SupersetConfig::MAPBOX_SECRET_PROPERTY { superset_cb.add_env_var_from_secret( "MAPBOX_API_KEY", diff --git a/rust/operator-binary/src/resources/statefulset.rs b/rust/operator-binary/src/resources/statefulset.rs index 751c5d87..6d061b43 100644 --- a/rust/operator-binary/src/resources/statefulset.rs +++ b/rust/operator-binary/src/resources/statefulset.rs @@ -1,7 +1,6 @@ -use std::collections::{BTreeMap, BTreeSet, HashMap}; +use std::collections::{BTreeMap, BTreeSet}; use indoc::formatdoc; -use product_config::types::PropertyNameKind; use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::{ builder::{ @@ -92,11 +91,6 @@ pub enum Error { source: stackable_operator::builder::meta::Error, }, - #[snafu(display( - "failed to get the {SUPERSET_CONFIG_FILENAME} file from node or product config" - ))] - MissingSupersetConfigInNodeConfig, - #[snafu(display("failed to get {timeout} from {SUPERSET_CONFIG_FILENAME} file. It should be set in the product config or by user input", timeout = SupersetConfigOptions::SupersetWebserverTimeout))] MissingWebServerTimeoutInSupersetConfig, @@ -140,7 +134,8 @@ pub fn build_server_rolegroup_statefulset( resolved_product_image: &ResolvedProductImage, superset_role: &SupersetRole, rolegroup_ref: &RoleGroupRef, - node_config: &HashMap>, + config_file_properties: &BTreeMap, + env_overrides: &BTreeMap, authentication_config: &SupersetClientAuthenticationDetailsResolved, sa_name: &str, merged_config: &SupersetConfig, @@ -212,11 +207,7 @@ pub fn build_server_rolegroup_statefulset( celery_broker_connection_details.add_to_container(&mut superset_cb); } - for (name, value) in node_config - .get(&PropertyNameKind::Env) - .cloned() - .unwrap_or_default() - { + for (name, value) in env_overrides.clone() { if name == SupersetConfig::MAPBOX_SECRET_PROPERTY { superset_cb.add_env_var_from_secret( "MAPBOX_API_KEY", @@ -237,11 +228,7 @@ pub fn build_server_rolegroup_statefulset( add_authentication_volumes_and_volume_mounts(authentication_config, &mut superset_cb, pb)?; - let webserver_timeout = node_config - .get(&PropertyNameKind::File( - SUPERSET_CONFIG_FILENAME.to_string(), - )) - .context(MissingSupersetConfigInNodeConfigSnafu)? + let webserver_timeout = config_file_properties .get(&SupersetConfigOptions::SupersetWebserverTimeout.to_string()) .context(MissingWebServerTimeoutInSupersetConfigSnafu)?; From b939cf7dcc9fe83be09adb777dc818613b1ffa74 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 5 Jun 2026 10:31:03 +0200 Subject: [PATCH 03/16] refactor: extract superset_config.py builder; move ConfigMap build into controller/build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extracts the superset_config.py rendering (TALISMAN default + Superset/OPA settings + per-rolegroup properties + FILE_HEADER/FILE_FOOTER + Flask writer + celery connection class) into config/superset_config::build(), and relocates the ConfigMap assembler to controller/build/config_map.rs — matching the config/ + controller/build/config_map.rs layout of airflow, hdfs, kafka and trino. The FILE_HEADER/FILE_FOOTER constants move into the builder, removing the last stackable_operator::product_config_utils import. No behaviour change (33 tests pass). Co-Authored-By: Claude Opus 4.8 --- rust/operator-binary/src/config/mod.rs | 1 + .../src/config/superset_config.rs | 96 ++++++++++ rust/operator-binary/src/controller.rs | 6 +- .../src/controller/build/config_map.rs | 105 +++++++++++ .../src/controller/build/mod.rs | 3 + .../src/resources/configmap.rs | 165 ------------------ rust/operator-binary/src/resources/mod.rs | 1 - 7 files changed, 208 insertions(+), 169 deletions(-) create mode 100644 rust/operator-binary/src/config/superset_config.rs create mode 100644 rust/operator-binary/src/controller/build/config_map.rs create mode 100644 rust/operator-binary/src/controller/build/mod.rs delete mode 100644 rust/operator-binary/src/resources/configmap.rs diff --git a/rust/operator-binary/src/config/mod.rs b/rust/operator-binary/src/config/mod.rs index e97ef1e4..f6d9944d 100644 --- a/rust/operator-binary/src/config/mod.rs +++ b/rust/operator-binary/src/config/mod.rs @@ -1,4 +1,5 @@ pub mod commands; pub mod product_logging; pub mod superset; +pub mod superset_config; pub mod writer; diff --git a/rust/operator-binary/src/config/superset_config.rs b/rust/operator-binary/src/config/superset_config.rs new file mode 100644 index 00000000..e2a54baf --- /dev/null +++ b/rust/operator-binary/src/config/superset_config.rs @@ -0,0 +1,96 @@ +//! Builds the `superset_config.py` configuration file from the resolved +//! authentication/OPA config plus the per-rolegroup config-file properties. + +use std::{collections::BTreeMap, io::Write}; + +use snafu::{ResultExt, Snafu}; + +use super::{ + superset::{self, PYTHON_IMPORTS, add_superset_config, append_celery_connection_config}, + writer, +}; +use crate::{ + authorization::opa::{OPA_IMPORTS, SupersetOpaConfigResolved}, + crd::{ + SupersetConfigOptions, authentication::SupersetClientAuthenticationDetailsResolved, + v1alpha1::SupersetCluster, + }, +}; + +/// Marks arbitrary Python code to prepend verbatim to the generated file. +const CONFIG_OVERRIDE_FILE_HEADER_KEY: &str = "FILE_HEADER"; +/// Marks arbitrary Python code to append verbatim to the generated file. +const CONFIG_OVERRIDE_FILE_FOOTER_KEY: &str = "FILE_FOOTER"; + +#[derive(Snafu, Debug)] +pub enum Error { + #[snafu(display("failed to add Superset config settings"))] + AddSupersetConfig { source: superset::Error }, + + #[snafu(display("failed to write the superset config file"))] + WriteConfigFile { + source: writer::FlaskAppConfigWriterError, + }, + + #[snafu(display("failed to write the header/footer to the superset config file"))] + WriteHeaderFooter { source: std::io::Error }, +} + +/// Renders the `superset_config.py` contents: operator defaults (derived from the +/// resolved authentication/OPA config) with the per-rolegroup config-file properties +/// applied last, wrapped by the optional `FILE_HEADER`/`FILE_FOOTER` Python blocks. +pub fn build( + superset: &SupersetCluster, + authentication_config: &SupersetClientAuthenticationDetailsResolved, + superset_opa_config: &Option, + config_file_properties: &BTreeMap, +) -> Result { + let mut config_properties = BTreeMap::new(); + let mut imports = PYTHON_IMPORTS.to_vec(); + // TODO: this is true per default for versions 3.0.0 and up. + // We deactivate it here to keep existing functionality. + // However this is a security issue and should be configured properly + // Issue: https://github.com/stackabletech/superset-operator/issues/416 + config_properties.insert("TALISMAN_ENABLED".to_string(), "False".to_string()); + + add_superset_config(&mut config_properties, superset, authentication_config) + .context(AddSupersetConfigSnafu)?; + + // Adding opa configuration properties to config_properties. + // This will be injected as key/value pair in superset_config.py + if let Some(opa_config) = superset_opa_config { + // If opa role mapping is configured, insert CustomOpaSecurityManager import + imports.extend(OPA_IMPORTS); + + config_properties.extend(opa_config.as_config()); + } + + // The order here should be kept in order to preserve overrides. + // No properties should be added after this extend. + config_properties.extend(config_file_properties.clone()); + + let mut config_file = Vec::new(); + + // By removing the keys from `config_properties`, we avoid pasting the Python code into a Python variable as well + // (which would be bad) + if let Some(header) = config_properties.remove(CONFIG_OVERRIDE_FILE_HEADER_KEY) { + writeln!(config_file, "{header}").context(WriteHeaderFooterSnafu)?; + } + let temp_file_footer = config_properties.remove(CONFIG_OVERRIDE_FILE_FOOTER_KEY); + + writer::write::( + &mut config_file, + config_properties.iter(), + &imports, + ) + .context(WriteConfigFileSnafu)?; + + // We have to add a python class (no key) and cannot use the superset::config machinery. + append_celery_connection_config(&mut config_file, superset); + + if let Some(footer) = temp_file_footer { + writeln!(config_file, "{footer}").context(WriteHeaderFooterSnafu)?; + } + + Ok(String::from_utf8(config_file).expect("the Flask config writer only emits valid UTF-8")) +} diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index eb7e1fd3..83fc87c5 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -1,4 +1,5 @@ //! Ensures that `Pod`s are configured and running for each [`SupersetCluster`] +pub(crate) mod build; pub mod dereference; pub mod validate; use std::sync::Arc; @@ -33,7 +34,6 @@ use crate::{ operations::pdb::add_pdbs, resources::{ build_recommended_labels, - configmap::build_rolegroup_config_map, deployment::{build_beat_rolegroup_deployment, build_worker_rolegroup_deployment}, listener::build_group_listener, service::{build_node_rolegroup_headless_service, build_node_rolegroup_metrics_service}, @@ -158,7 +158,7 @@ pub enum Error { #[snafu(display("failed to build configmap"))] BuildConfigMap { - source: crate::resources::configmap::Error, + source: crate::controller::build::config_map::Error, }, #[snafu(display("failed to create SECRET_KEY secret"))] @@ -252,7 +252,7 @@ pub async fn reconcile_superset( let rolegroup = superset.rolegroup_ref(superset_role, rolegroup_name); let config = &validated_rolegroup.merged_config; - let rg_configmap = build_rolegroup_config_map( + let rg_configmap = build::config_map::build_rolegroup_config_map( superset, resolved_product_image, &rolegroup, diff --git a/rust/operator-binary/src/controller/build/config_map.rs b/rust/operator-binary/src/controller/build/config_map.rs new file mode 100644 index 00000000..2ff50834 --- /dev/null +++ b/rust/operator-binary/src/controller/build/config_map.rs @@ -0,0 +1,105 @@ +use std::collections::BTreeMap; + +use snafu::{ResultExt, Snafu}; +use stackable_operator::{ + builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder}, + commons::product_image_selection::ResolvedProductImage, + k8s_openapi::api::core::v1::ConfigMap, + product_logging::spec::Logging, + role_utils::RoleGroupRef, +}; + +use crate::{ + authorization::opa::SupersetOpaConfigResolved, + config::{product_logging::extend_config_map_with_log_config, superset_config}, + controller::SUPERSET_CONTROLLER_NAME, + crd::{ + SUPERSET_CONFIG_FILENAME, authentication::SupersetClientAuthenticationDetailsResolved, + v1alpha1::{Container, SupersetCluster}, + }, + resources::build_recommended_labels, +}; + +#[derive(Snafu, Debug)] +pub enum Error { + #[snafu(display("object is missing metadata to build owner reference"))] + ObjectMissingMetadataForOwnerRef { + source: stackable_operator::builder::meta::Error, + }, + + #[snafu(display("failed to build superset_config.py for {rolegroup}"))] + BuildSupersetConfig { + source: superset_config::Error, + rolegroup: RoleGroupRef, + }, + + #[snafu(display("failed to build Metadata"))] + BuildMetadata { + source: stackable_operator::builder::meta::Error, + }, + + #[snafu(display("failed to build ConfigMap for {rolegroup}"))] + BuildRoleGroupConfig { + source: stackable_operator::builder::configmap::Error, + rolegroup: RoleGroupRef, + }, +} + +type Result = std::result::Result; + +/// The rolegroup [`ConfigMap`] configures the rolegroup based on the configuration given by the administrator +#[allow(clippy::too_many_arguments)] +pub fn build_rolegroup_config_map( + superset: &SupersetCluster, + resolved_product_image: &ResolvedProductImage, + rolegroup: &RoleGroupRef, + config_file_properties: &BTreeMap, + authentication_config: &SupersetClientAuthenticationDetailsResolved, + superset_opa_config: &Option, + logging: &Logging, +) -> Result { + let config_file = superset_config::build( + superset, + authentication_config, + superset_opa_config, + config_file_properties, + ) + .with_context(|_| BuildSupersetConfigSnafu { + rolegroup: rolegroup.clone(), + })?; + + let mut cm_builder = ConfigMapBuilder::new(); + + cm_builder + .metadata( + ObjectMetaBuilder::new() + .name_and_namespace(superset) + .name(rolegroup.object_name()) + .ownerreference_from_resource(superset, None, Some(true)) + .context(ObjectMissingMetadataForOwnerRefSnafu)? + .with_recommended_labels(&build_recommended_labels( + superset, + SUPERSET_CONTROLLER_NAME, + &resolved_product_image.app_version_label_value, + &rolegroup.role, + &rolegroup.role_group, + )) + .context(BuildMetadataSnafu)? + .build(), + ) + .add_data(SUPERSET_CONFIG_FILENAME, config_file); + + extend_config_map_with_log_config( + rolegroup, + logging, + &Container::Superset, + &Container::Vector, + &mut cm_builder, + ); + + cm_builder + .build() + .with_context(|_| BuildRoleGroupConfigSnafu { + rolegroup: rolegroup.clone(), + }) +} diff --git a/rust/operator-binary/src/controller/build/mod.rs b/rust/operator-binary/src/controller/build/mod.rs new file mode 100644 index 00000000..7cebb446 --- /dev/null +++ b/rust/operator-binary/src/controller/build/mod.rs @@ -0,0 +1,3 @@ +//! Builders that assemble Kubernetes resources for superset rolegroups. + +pub mod config_map; diff --git a/rust/operator-binary/src/resources/configmap.rs b/rust/operator-binary/src/resources/configmap.rs deleted file mode 100644 index e89ffe4b..00000000 --- a/rust/operator-binary/src/resources/configmap.rs +++ /dev/null @@ -1,165 +0,0 @@ -use std::{ - collections::BTreeMap, - io::Write, -}; - -use snafu::{ResultExt, Snafu}; -use stackable_operator::{ - builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder}, - commons::product_image_selection::ResolvedProductImage, - k8s_openapi::api::core::v1::ConfigMap, - product_config_utils::{CONFIG_OVERRIDE_FILE_FOOTER_KEY, CONFIG_OVERRIDE_FILE_HEADER_KEY}, - product_logging::spec::Logging, - role_utils::RoleGroupRef, -}; - -use crate::{ - authorization::opa::{OPA_IMPORTS, SupersetOpaConfigResolved}, - config::{ - self, - product_logging::extend_config_map_with_log_config, - superset::PYTHON_IMPORTS, - writer::{self, FlaskAppConfigWriterError}, - }, - controller::SUPERSET_CONTROLLER_NAME, - crd::{ - SUPERSET_CONFIG_FILENAME, SupersetConfigOptions, - authentication::SupersetClientAuthenticationDetailsResolved, - v1alpha1::{Container, SupersetCluster}, - }, - resources::build_recommended_labels, -}; - -#[derive(Snafu, Debug)] -pub enum Error { - #[snafu(display("object is missing metadata to build owner reference"))] - ObjectMissingMetadataForOwnerRef { - source: stackable_operator::builder::meta::Error, - }, - - #[snafu(display("failed to add Superset config settings"))] - AddSupersetConfig { source: config::superset::Error }, - - #[snafu(display( - "failed to write to String (Vec to be precise) containing superset config" - ))] - WriteToConfigFileString { source: std::io::Error }, - - #[snafu(display("failed to build Metadata"))] - BuildMetadata { - source: stackable_operator::builder::meta::Error, - }, - - #[snafu(display("failed to build config file for {rolegroup}"))] - BuildRoleGroupConfigFile { - source: FlaskAppConfigWriterError, - rolegroup: RoleGroupRef, - }, - - #[snafu(display("failed to build ConfigMap for {rolegroup}"))] - BuildRoleGroupConfig { - source: stackable_operator::builder::configmap::Error, - rolegroup: RoleGroupRef, - }, -} - -type Result = std::result::Result; - -/// The rolegroup [`ConfigMap`] configures the rolegroup based on the configuration given by the administrator -#[allow(clippy::too_many_arguments)] -pub fn build_rolegroup_config_map( - superset: &SupersetCluster, - resolved_product_image: &ResolvedProductImage, - rolegroup: &RoleGroupRef, - config_file_properties: &BTreeMap, - authentication_config: &SupersetClientAuthenticationDetailsResolved, - superset_opa_config: &Option, - logging: &Logging, -) -> Result { - let mut config_properties = BTreeMap::new(); - let mut imports = PYTHON_IMPORTS.to_vec(); - // TODO: this is true per default for versions 3.0.0 and up. - // We deactivate it here to keep existing functionality. - // However this is a security issue and should be configured properly - // Issue: https://github.com/stackabletech/superset-operator/issues/416 - config_properties.insert("TALISMAN_ENABLED".to_string(), "False".to_string()); - - config::superset::add_superset_config(&mut config_properties, superset, authentication_config) - .context(AddSupersetConfigSnafu)?; - - // Adding opa configuration properties to config_properties. - // This will be injected as key/value pair in superset_config.py - if let Some(opa_config) = superset_opa_config { - // If opa role mapping is configured, insert CustomOpaSecurityManager import - imports.extend(OPA_IMPORTS); - - config_properties.extend(opa_config.as_config()); - } - - // The order here should be kept in order to preserve overrides. - // No properties should be added after this extend. - config_properties.extend(config_file_properties.clone()); - - let mut config_file = Vec::new(); - - // By removing the keys from `config_properties`, we avoid pasting the Python code into a Python variable as well - // (which would be bad) - if let Some(header) = config_properties.remove(CONFIG_OVERRIDE_FILE_HEADER_KEY) { - writeln!(config_file, "{header}").context(WriteToConfigFileStringSnafu)?; - } - let temp_file_footer = config_properties.remove(CONFIG_OVERRIDE_FILE_FOOTER_KEY); - - writer::write::( - &mut config_file, - config_properties.iter(), - &imports, - ) - .with_context(|_| BuildRoleGroupConfigFileSnafu { - rolegroup: rolegroup.clone(), - })?; - - // We have to add a python class (no key) and cannot use the superset::config machinery. - config::superset::append_celery_connection_config(&mut config_file, superset); - - if let Some(footer) = temp_file_footer { - writeln!(config_file, "{footer}").context(WriteToConfigFileStringSnafu)?; - } - - let mut cm_builder = ConfigMapBuilder::new(); - - cm_builder - .metadata( - ObjectMetaBuilder::new() - .name_and_namespace(superset) - .name(rolegroup.object_name()) - .ownerreference_from_resource(superset, None, Some(true)) - .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(&build_recommended_labels( - superset, - SUPERSET_CONTROLLER_NAME, - &resolved_product_image.app_version_label_value, - &rolegroup.role, - &rolegroup.role_group, - )) - .context(BuildMetadataSnafu)? - .build(), - ) - .add_data( - SUPERSET_CONFIG_FILENAME, - String::from_utf8(config_file).unwrap(), - ); - - extend_config_map_with_log_config( - rolegroup, - logging, - &Container::Superset, - &Container::Vector, - &mut cm_builder, - ); - - cm_builder - .build() - .with_context(|_| BuildRoleGroupConfigSnafu { - rolegroup: rolegroup.clone(), - }) -} diff --git a/rust/operator-binary/src/resources/mod.rs b/rust/operator-binary/src/resources/mod.rs index 3e94d08e..72719347 100644 --- a/rust/operator-binary/src/resources/mod.rs +++ b/rust/operator-binary/src/resources/mod.rs @@ -24,7 +24,6 @@ use crate::{ v1alpha1::SupersetCluster, }; -pub mod configmap; pub mod deployment; pub mod listener; pub mod rbac; From 3128880d1d8b8b280de7bf91ae7f321f03b3482e Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 5 Jun 2026 10:38:43 +0200 Subject: [PATCH 04/16] docs: remove product-config CLI param + env var; gut config-spec; changelog Removes the --product-config section from the commandline reference and the PRODUCT_CONFIG section from the environment-variables reference (both are now no-ops via the shared RunArguments), reduces the product-config properties.yaml files to an empty shell (their ROW_LIMIT / SUPERSET_WEBSERVER_TIMEOUT recommended values now live in controller/validate.rs; files retained pending a later Helm config refactor), and notes the product-config removal in the changelog. Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 6 +++ deploy/config-spec/properties.yaml | 43 +------------------ .../superset-operator/configs/properties.yaml | 43 +------------------ .../reference/commandline-parameters.adoc | 13 ------ .../reference/environment-variables.adoc | 26 ----------- 5 files changed, 8 insertions(+), 123 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e88aef0..f668d7fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,12 @@ This struct is consistent between different CRDs, so that you can easily copy/paste it between stacklets. More information can be found in the [Superset database documentation](https://docs.stackable.tech/home/nightly/superset/usage-guide/database-connections) for details ([#722]). - Internal operator refactoring: introduce dereference() and validate() steps in the reconciler ([#731]). +- Removed the product-config based configuration validation. Config and environment overrides are + now merged directly from the CRD into the validated cluster (including the formerly + properties.yaml-provided `ROW_LIMIT` and `SUPERSET_WEBSERVER_TIMEOUT` recommended values), the + Flask config writer is vendored locally (identical to airflow-operator's, a shared-crate + candidate), and the `product-config` crate dependency is dropped. The `--product-config` CLI + flag and `PRODUCT_CONFIG` env var are now no-ops ([#XXX]). - test: Bump vector-aggregator to 0.55.0, replace /graphql call with gRPC call ([#735]). [#717]: https://github.com/stackabletech/superset-operator/pull/717 diff --git a/deploy/config-spec/properties.yaml b/deploy/config-spec/properties.yaml index e063e334..9bd8c3b2 100644 --- a/deploy/config-spec/properties.yaml +++ b/deploy/config-spec/properties.yaml @@ -2,45 +2,4 @@ version: 0.1.0 spec: units: [] -properties: - - property: &rowLimit - propertyNames: - - name: "ROW_LIMIT" - kind: - type: "file" - file: "superset_config.py" - datatype: - type: "integer" - defaultValues: - - fromVersion: "0.0.0" - value: "50000" - recommendedValues: - - fromVersion: "0.0.0" - value: "50000" - roles: - - name: "node" - required: false - asOfVersion: "0.0.0" - description: "Row limit when requesting chart data. Corresponds to ROW_LIMIT" - - property: &webserverTimeout - propertyNames: - - name: "SUPERSET_WEBSERVER_TIMEOUT" - kind: - type: "file" - file: "superset_config.py" - datatype: - type: "integer" - defaultValues: - - fromVersion: "0.0.0" - value: "60" # 1 min - recommendedValues: - # The default timeout of Superset is 60s which is way to low when querying "big data" systems. - # Especially Trino queries often take longer. - # see [the Superset docs](https://superset.apache.org/docs/frequently-asked-questions#why-are-my-queries-timing-out). - - fromVersion: "0.0.0" - value: "300" # 5 min - roles: - - name: "node" - required: true - asOfVersion: "0.0.0" - description: "Maximum number of seconds a Superset request can take before timing out. This settings effect the maximum duration a query to an underlying datasource can take. If you get timeout errors before your query returns the result you can need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT" +properties: [] diff --git a/deploy/helm/superset-operator/configs/properties.yaml b/deploy/helm/superset-operator/configs/properties.yaml index e063e334..9bd8c3b2 100644 --- a/deploy/helm/superset-operator/configs/properties.yaml +++ b/deploy/helm/superset-operator/configs/properties.yaml @@ -2,45 +2,4 @@ version: 0.1.0 spec: units: [] -properties: - - property: &rowLimit - propertyNames: - - name: "ROW_LIMIT" - kind: - type: "file" - file: "superset_config.py" - datatype: - type: "integer" - defaultValues: - - fromVersion: "0.0.0" - value: "50000" - recommendedValues: - - fromVersion: "0.0.0" - value: "50000" - roles: - - name: "node" - required: false - asOfVersion: "0.0.0" - description: "Row limit when requesting chart data. Corresponds to ROW_LIMIT" - - property: &webserverTimeout - propertyNames: - - name: "SUPERSET_WEBSERVER_TIMEOUT" - kind: - type: "file" - file: "superset_config.py" - datatype: - type: "integer" - defaultValues: - - fromVersion: "0.0.0" - value: "60" # 1 min - recommendedValues: - # The default timeout of Superset is 60s which is way to low when querying "big data" systems. - # Especially Trino queries often take longer. - # see [the Superset docs](https://superset.apache.org/docs/frequently-asked-questions#why-are-my-queries-timing-out). - - fromVersion: "0.0.0" - value: "300" # 5 min - roles: - - name: "node" - required: true - asOfVersion: "0.0.0" - description: "Maximum number of seconds a Superset request can take before timing out. This settings effect the maximum duration a query to an underlying datasource can take. If you get timeout errors before your query returns the result you can need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT" +properties: [] diff --git a/docs/modules/superset/pages/reference/commandline-parameters.adoc b/docs/modules/superset/pages/reference/commandline-parameters.adoc index 964229aa..6402afcd 100644 --- a/docs/modules/superset/pages/reference/commandline-parameters.adoc +++ b/docs/modules/superset/pages/reference/commandline-parameters.adoc @@ -2,19 +2,6 @@ This operator accepts the following command line parameters: -== product-config - -*Default value*: `/etc/stackable/superset-operator/config-spec/properties.yaml` - -*Required*: false - -*Multiple values:* false - -[source] ----- -stackable-superset-operator run --product-config /foo/bar/properties.yaml ----- - == watch-namespace *Default value*: All namespaces diff --git a/docs/modules/superset/pages/reference/environment-variables.adoc b/docs/modules/superset/pages/reference/environment-variables.adoc index 7f46bf8f..d07fcd84 100644 --- a/docs/modules/superset/pages/reference/environment-variables.adoc +++ b/docs/modules/superset/pages/reference/environment-variables.adoc @@ -33,32 +33,6 @@ docker run \ oci.stackable.tech/sdp/superset-operator:0.0.0-dev ---- -== PRODUCT_CONFIG - -*Default value*: `/etc/stackable/superset-operator/config-spec/properties.yaml` - -*Required*: false - -*Multiple values*: false - -[source] ----- -export PRODUCT_CONFIG=/foo/bar/properties.yaml -stackable-superset-operator run ----- - -or via docker: - ----- -docker run \ - --name superset-operator \ - --network host \ - --env KUBECONFIG=/home/stackable/.kube/config \ - --env PRODUCT_CONFIG=/my/product/config.yaml \ - --mount type=bind,source="$HOME/.kube/config",target="/home/stackable/.kube/config" \ - oci.stackable.tech/sdp/superset-operator:0.0.0-dev ----- - == WATCH_NAMESPACE *Default value*: All namespaces From 9fdea0da46bef1a7a0ae975d7f1f7777106c2e41 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 5 Jun 2026 10:43:35 +0200 Subject: [PATCH 05/16] update changelog --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f668d7fd..d7668530 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,13 +23,13 @@ This struct is consistent between different CRDs, so that you can easily copy/paste it between stacklets. More information can be found in the [Superset database documentation](https://docs.stackable.tech/home/nightly/superset/usage-guide/database-connections) for details ([#722]). - Internal operator refactoring: introduce dereference() and validate() steps in the reconciler ([#731]). +- test: Bump vector-aggregator to 0.55.0, replace /graphql call with gRPC call ([#735]). - Removed the product-config based configuration validation. Config and environment overrides are now merged directly from the CRD into the validated cluster (including the formerly properties.yaml-provided `ROW_LIMIT` and `SUPERSET_WEBSERVER_TIMEOUT` recommended values), the Flask config writer is vendored locally (identical to airflow-operator's, a shared-crate candidate), and the `product-config` crate dependency is dropped. The `--product-config` CLI - flag and `PRODUCT_CONFIG` env var are now no-ops ([#XXX]). -- test: Bump vector-aggregator to 0.55.0, replace /graphql call with gRPC call ([#735]). + flag and `PRODUCT_CONFIG` env var are now no-ops ([#738]). [#717]: https://github.com/stackabletech/superset-operator/pull/717 [#719]: https://github.com/stackabletech/superset-operator/pull/719 @@ -39,6 +39,7 @@ [#726]: https://github.com/stackabletech/superset-operator/pull/726 [#731]: https://github.com/stackabletech/superset-operator/pull/731 [#735]: https://github.com/stackabletech/superset-operator/pull/735 +[#738]: https://github.com/stackabletech/superset-operator/pull/738 ## [26.3.0] - 2026-03-16 From c077bae42c0eb6f99b85cd88b608f4de87124f66 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 5 Jun 2026 11:04:11 +0200 Subject: [PATCH 06/16] formatting --- .../src/controller/build/config_map.rs | 3 ++- rust/operator-binary/src/controller/validate.rs | 15 ++++++++++++--- rust/operator-binary/src/crd/mod.rs | 3 +-- rust/operator-binary/src/resources/deployment.rs | 3 +-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/rust/operator-binary/src/controller/build/config_map.rs b/rust/operator-binary/src/controller/build/config_map.rs index 2ff50834..895c044f 100644 --- a/rust/operator-binary/src/controller/build/config_map.rs +++ b/rust/operator-binary/src/controller/build/config_map.rs @@ -14,7 +14,8 @@ use crate::{ config::{product_logging::extend_config_map_with_log_config, superset_config}, controller::SUPERSET_CONTROLLER_NAME, crd::{ - SUPERSET_CONFIG_FILENAME, authentication::SupersetClientAuthenticationDetailsResolved, + SUPERSET_CONFIG_FILENAME, + authentication::SupersetClientAuthenticationDetailsResolved, v1alpha1::{Container, SupersetCluster}, }, resources::build_recommended_labels, diff --git a/rust/operator-binary/src/controller/validate.rs b/rust/operator-binary/src/controller/validate.rs index 3869ff63..e5768ec0 100644 --- a/rust/operator-binary/src/controller/validate.rs +++ b/rust/operator-binary/src/controller/validate.rs @@ -113,8 +113,13 @@ pub fn validate_cluster( .merged_config(&role, &rolegroup_ref) .context(FailedToResolveConfigSnafu)?; - let (config_file_properties, env_overrides) = - collect_role_group_config(superset, &role, resolved_role, rolegroup_name, &merged_config); + let (config_file_properties, env_overrides) = collect_role_group_config( + superset, + &role, + resolved_role, + rolegroup_name, + &merged_config, + ); group_configs.insert( rolegroup_name.clone(), @@ -208,7 +213,11 @@ fn collect_role_group_config( .unwrap_or_default(); let mut merged_overrides = role_overrides; merged_overrides.extend(rg_overrides); - config_file_properties.extend(merged_overrides.into_iter().filter_map(|(k, v)| v.map(|v| (k, v)))); + config_file_properties.extend( + merged_overrides + .into_iter() + .filter_map(|(k, v)| v.map(|v| (k, v))), + ); // --- env_overrides --- diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index d4a0ec14..c9d74745 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -16,7 +16,6 @@ use stackable_operator::{ fragment::{self, Fragment, ValidationError}, merge::Merge, }, - v2::config_overrides::KeyValueConfigOverrides, deep_merger::ObjectOverrides, k8s_openapi::apimachinery::pkg::api::resource::Quantity, kube::{CustomResource, ResourceExt, runtime::reflector::ObjectRef}, @@ -26,6 +25,7 @@ use stackable_operator::{ schemars::{self, JsonSchema}, shared::time::Duration, status::condition::{ClusterCondition, HasStatusCondition}, + v2::config_overrides::KeyValueConfigOverrides, versioned::versioned, }; use strum::{Display, EnumIter, EnumString, IntoEnumIterator}; @@ -416,7 +416,6 @@ impl SupersetRole { } } - impl FlaskAppConfigOptions for SupersetConfigOptions { fn python_type(&self) -> PythonType { match self { diff --git a/rust/operator-binary/src/resources/deployment.rs b/rust/operator-binary/src/resources/deployment.rs index 5dc1b9b1..210a1de7 100644 --- a/rust/operator-binary/src/resources/deployment.rs +++ b/rust/operator-binary/src/resources/deployment.rs @@ -33,8 +33,7 @@ use crate::{ controller::SUPERSET_CONTROLLER_NAME, crd::{ APP_NAME, APP_PORT, METRICS_PORT, METRICS_PORT_NAME, PYTHONPATH, STACKABLE_CONFIG_DIR, - STACKABLE_LOG_CONFIG_DIR, STACKABLE_LOG_DIR, - SupersetRole, + STACKABLE_LOG_CONFIG_DIR, STACKABLE_LOG_DIR, SupersetRole, v1alpha1::{Container, SupersetCluster, SupersetConfig}, }, operations::graceful_shutdown::add_graceful_shutdown_config, From 518f6013afd5b27d360d5ba7b1f10f8bcc73dacf Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 5 Jun 2026 13:36:09 +0200 Subject: [PATCH 07/16] refactor: consume the Flask config writer from stackable-operator Replace the vendored flask writer (rust/operator-binary/src/config/writer.rs) with stackable_operator::v2::flask_config_writer, which now hosts the same code (moved there via operator-rs #1217, merged into the smooth-operator branch; the vendored copy was kept byte-identical to airflow-operator's precisely to enable this move). No behaviour change; rendered superset_config.py output is byte-identical by construction (same code, new home). Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 6 +- Cargo.lock | 24 +- Cargo.nix | 30 +- rust/operator-binary/src/config/mod.rs | 1 - .../src/config/superset_config.rs | 10 +- rust/operator-binary/src/config/writer.rs | 331 ------------------ rust/operator-binary/src/crd/mod.rs | 6 +- 7 files changed, 43 insertions(+), 365 deletions(-) delete mode 100644 rust/operator-binary/src/config/writer.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index d7668530..14036ca2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,9 +27,9 @@ - Removed the product-config based configuration validation. Config and environment overrides are now merged directly from the CRD into the validated cluster (including the formerly properties.yaml-provided `ROW_LIMIT` and `SUPERSET_WEBSERVER_TIMEOUT` recommended values), the - Flask config writer is vendored locally (identical to airflow-operator's, a shared-crate - candidate), and the `product-config` crate dependency is dropped. The `--product-config` CLI - flag and `PRODUCT_CONFIG` env var are now no-ops ([#738]). + Flask config writer is consumed from `stackable-operator` (`v2::flask_config_writer`), and the + `product-config` crate dependency is dropped. The `--product-config` CLI flag and + `PRODUCT_CONFIG` env var are now no-ops ([#738]). [#717]: https://github.com/stackabletech/superset-operator/pull/717 [#719]: https://github.com/stackabletech/superset-operator/pull/719 diff --git a/Cargo.lock b/Cargo.lock index 0d6a2160..7a936d4f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" dependencies = [ "darling", "regex", @@ -2905,7 +2905,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" dependencies = [ "const-oid", "ecdsa", @@ -2929,7 +2929,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.111.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" dependencies = [ "base64", "clap", @@ -2941,6 +2941,7 @@ dependencies = [ "futures 0.3.32", "http", "indexmap", + "java-properties", "jiff", "json-patch", "k8s-openapi", @@ -2966,12 +2967,13 @@ dependencies = [ "tracing-subscriber", "url", "uuid", + "xml", ] [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" dependencies = [ "darling", "proc-macro2", @@ -2982,7 +2984,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" dependencies = [ "jiff", "k8s-openapi", @@ -3021,7 +3023,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.4" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" dependencies = [ "axum", "clap", @@ -3045,7 +3047,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.10.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" dependencies = [ "kube", "schemars", @@ -3059,7 +3061,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.10.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" dependencies = [ "convert_case", "convert_case_extras", @@ -3077,7 +3079,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#128e1afca7761d07058624091217b6d695fa790c" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" dependencies = [ "arc-swap", "async-trait", @@ -3974,9 +3976,9 @@ dependencies = [ [[package]] name = "xml" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8aa498d22c9bbaf482329839bc5620c46be275a19a812e9a22a2b07529a642a" +checksum = "636f85e5ca6488e96401b61eb7de54f4e44755c988af0f52cf90230c312a1a89" [[package]] name = "yoke" diff --git a/Cargo.nix b/Cargo.nix index cd6fdfc7..421ad43c 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4876,7 +4876,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "128e1afca7761d07058624091217b6d695fa790c"; + rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "k8s_version"; @@ -9559,7 +9559,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "128e1afca7761d07058624091217b6d695fa790c"; + rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_certs"; @@ -9662,7 +9662,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "128e1afca7761d07058624091217b6d695fa790c"; + rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_operator"; @@ -9713,6 +9713,10 @@ rec { name = "indexmap"; packageId = "indexmap"; } + { + name = "java-properties"; + packageId = "java-properties"; + } { name = "jiff"; packageId = "jiff"; @@ -9828,6 +9832,10 @@ rec { name = "uuid"; packageId = "uuid"; } + { + name = "xml"; + packageId = "xml"; + } ]; features = { "certs" = [ "dep:stackable-certs" ]; @@ -9848,7 +9856,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "128e1afca7761d07058624091217b6d695fa790c"; + rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; procMacro = true; @@ -9883,7 +9891,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "128e1afca7761d07058624091217b6d695fa790c"; + rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_shared"; @@ -10066,7 +10074,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "128e1afca7761d07058624091217b6d695fa790c"; + rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_telemetry"; @@ -10176,7 +10184,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "128e1afca7761d07058624091217b6d695fa790c"; + rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_versioned"; @@ -10226,7 +10234,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "128e1afca7761d07058624091217b6d695fa790c"; + rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; procMacro = true; @@ -10294,7 +10302,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "128e1afca7761d07058624091217b6d695fa790c"; + rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; }; libName = "stackable_webhook"; @@ -14063,9 +14071,9 @@ rec { }; "xml" = rec { crateName = "xml"; - version = "1.2.1"; + version = "1.3.0"; edition = "2021"; - sha256 = "0ak4k990faralbli5a0rb8kvwihccb2rp0r94d4azfy94a6lkamq"; + sha256 = "128s58qhq8whrx90zbw8r5algr7lakgbf7mn05jfk234rbjqavv3"; authors = [ "Vladimir Matveev " "Kornel (https://github.com/kornelski)" diff --git a/rust/operator-binary/src/config/mod.rs b/rust/operator-binary/src/config/mod.rs index f6d9944d..667a0c22 100644 --- a/rust/operator-binary/src/config/mod.rs +++ b/rust/operator-binary/src/config/mod.rs @@ -2,4 +2,3 @@ pub mod commands; pub mod product_logging; pub mod superset; pub mod superset_config; -pub mod writer; diff --git a/rust/operator-binary/src/config/superset_config.rs b/rust/operator-binary/src/config/superset_config.rs index e2a54baf..8404d748 100644 --- a/rust/operator-binary/src/config/superset_config.rs +++ b/rust/operator-binary/src/config/superset_config.rs @@ -4,11 +4,9 @@ use std::{collections::BTreeMap, io::Write}; use snafu::{ResultExt, Snafu}; +use stackable_operator::v2::flask_config_writer; -use super::{ - superset::{self, PYTHON_IMPORTS, add_superset_config, append_celery_connection_config}, - writer, -}; +use super::superset::{self, PYTHON_IMPORTS, add_superset_config, append_celery_connection_config}; use crate::{ authorization::opa::{OPA_IMPORTS, SupersetOpaConfigResolved}, crd::{ @@ -29,7 +27,7 @@ pub enum Error { #[snafu(display("failed to write the superset config file"))] WriteConfigFile { - source: writer::FlaskAppConfigWriterError, + source: flask_config_writer::FlaskAppConfigWriterError, }, #[snafu(display("failed to write the header/footer to the superset config file"))] @@ -78,7 +76,7 @@ pub fn build( } let temp_file_footer = config_properties.remove(CONFIG_OVERRIDE_FILE_FOOTER_KEY); - writer::write::( + flask_config_writer::write::( &mut config_file, config_properties.iter(), &imports, diff --git a/rust/operator-binary/src/config/writer.rs b/rust/operator-binary/src/config/writer.rs deleted file mode 100644 index 7c34dec7..00000000 --- a/rust/operator-binary/src/config/writer.rs +++ /dev/null @@ -1,331 +0,0 @@ -//! Writer for Flask App configurations (Python config files). -//! -//! Vendored verbatim from `product_config::flask_app_config_writer` so the -//! operator does not depend on the `product-config` crate. Applications based -//! on the Flask App Builder (e.g. Apache Airflow, Apache Superset) use -//! configuration files written in Python. This writer only covers top-level -//! assignments of a few primitive types and expressions — it is not a general -//! Python code generator. -//! -//! Primitive types are escaped accordingly. Python expressions are written as-is; -//! invalid expressions produce invalid configuration files. Config overrides that do -//! not map to a known option are treated as plain expressions. -//! -// TODO: This file is vendored identically in airflow-operator and superset-operator; -// it is a candidate for a shared crate (e.g. operator-rs) so the duplication can be -// removed. Until such a home exists it is kept identical in both operators and to the -// upstream source. - -use std::{ - io::{self, Write}, - num::ParseIntError, - str::{FromStr, ParseBoolError}, -}; - -use snafu::{ResultExt, Snafu}; - -/// Errors which can occur when using this module -// Variant names share the `Error` suffix; kept as-is from the vendored -// `product_config::flask_app_config_writer` source. -#[allow(clippy::enum_variant_names)] -#[derive(Debug, Snafu)] -pub enum FlaskAppConfigWriterError { - #[snafu(display("failed to convert '{value}' into a identifier"))] - ConvertIdentifierError { value: String }, - - #[snafu(display("failed to convert '{value}' into a boolean literal"))] - ConvertBoolLiteralError { - value: String, - source: ParseBoolError, - }, - - #[snafu(display("failed to convert '{value}' into an integer literal"))] - ConvertIntLiteralError { - value: String, - source: ParseIntError, - }, - - #[snafu(display("failed to convert '{value}' into an ASCII string literal"))] - ConvertStringLiteralError { value: String }, - - #[snafu(display("failed to convert '{value}' into a Python expression"))] - ConvertExpressionError { value: String }, - - #[snafu(display("Configuration cannot be written."))] - WriteConfigError { source: io::Error }, -} - -/// Mapping from configuration options to Python types. -pub trait FlaskAppConfigOptions { - fn python_type(&self) -> PythonType; -} - -/// All supported Python types -pub enum PythonType { - /// Python identifier - Identifier, - /// Boolean literal - BoolLiteral, - /// Integer literal - IntLiteral, - /// ASCII string literal - StringLiteral, - /// Python expression - Expression, -} - -impl PythonType { - /// Converts the given string to Python. - fn convert_to_python(&self, value: &str) -> Result { - let convert = match self { - PythonType::Identifier => PythonType::convert_to_python_identifier, - PythonType::BoolLiteral => PythonType::convert_to_python_bool_literal, - PythonType::IntLiteral => PythonType::convert_to_python_int_literal, - PythonType::StringLiteral => PythonType::convert_to_python_string_literal, - PythonType::Expression => PythonType::convert_to_python_expression, - }; - - convert(value) - } - - fn convert_to_python_identifier(value: &str) -> Result { - if value.chars().all(|c| c.is_ascii_alphanumeric() || c == '_') - && value - .chars() - .next() - .filter(|c| !c.is_ascii_digit()) - .is_some() - { - Ok(value.to_string()) - } else { - ConvertIdentifierSnafu { value }.fail() - } - } - - fn convert_to_python_bool_literal(value: &str) -> Result { - value - .parse::() - .map(|b| if b { "True".into() } else { "False".into() }) - .context(ConvertBoolLiteralSnafu { value }) - } - - fn convert_to_python_int_literal(value: &str) -> Result { - value - .parse::() - .map(|i| i.to_string()) - .context(ConvertIntLiteralSnafu { value }) - } - - fn convert_to_python_string_literal(value: &str) -> Result { - if value.is_ascii() { - Ok(format!("\"{}\"", value.escape_default())) - } else { - ConvertStringLiteralSnafu { value }.fail() - } - } - - fn convert_to_python_expression(value: &str) -> Result { - if !value.trim().is_empty() { - Ok(value.to_string()) - } else { - ConvertExpressionSnafu { value }.fail() - } - } -} - -/// Writes a configuration file according to the given `FlaskAppConfigOptions` type. -pub fn write<'a, O, P, W>( - writer: &mut W, - properties: P, - imports: &[&str], -) -> Result<(), FlaskAppConfigWriterError> -where - O: FlaskAppConfigOptions + FromStr, - P: Iterator, - W: Write, -{ - for import in imports { - writeln!(writer, "{import}").context(WriteConfigSnafu)?; - } - - writeln!(writer).context(WriteConfigSnafu)?; - - for (name, value) in properties { - let variable = PythonType::Identifier.convert_to_python(name)?; - - // If an option cannot be mapped to a Python type then it is a config override and treated - // as Python expression. - let content = O::from_str(name) - .map(|option| option.python_type()) - .unwrap_or(PythonType::Expression) - .convert_to_python(value)?; - - writeln!(writer, "{variable} = {content}").context(WriteConfigSnafu)?; - } - - Ok(()) -} - -#[cfg(test)] -mod tests { - use std::{ - collections::BTreeMap, - str::{FromStr, from_utf8}, - }; - - use rstest::*; - - use super::{FlaskAppConfigOptions, FlaskAppConfigWriterError, PythonType, write}; - - #[rstest] - #[case::valid_identifiers_are_converted_to_python( - PythonType::Identifier, &[ - ("_", "_"), - ("a", "a"), - ("A", "A"), - ("__", "__"), - ("_a", "_a"), - ("_A", "_A"), - ("_0", "_0"), - ("SECRET_KEY", "SECRET_KEY"), - ] - )] - #[case::valid_booleans_are_converted_to_python( - PythonType::BoolLiteral, &[ - ("False", "false"), - ("True", "true"), - ] - )] - #[case::valid_integers_are_converted_to_python( - PythonType::IntLiteral, &[ - ("-9223372036854775808", "-9223372036854775808"), - ("0", "0"), - ("9223372036854775807", "9223372036854775807"), - ] - )] - #[case::valid_strings_are_converted_to_python( - PythonType::StringLiteral, &[ - (r#""""#, ""), - (r#"" ~""#, " ~"), - (r#""\t\r\n\'\"\\""#, "\t\r\n'\"\\"), - ] - )] - #[case::valid_expressions_are_converted_to_python( - PythonType::Expression, &[ - ("os.environ[\"HOME\"]", "os.environ[\"HOME\"]"), - ] - )] - fn valid_values_are_converted_to_python( - #[case] python_type: PythonType, - #[case] values: &[(&str, &str)], - ) -> Result<(), FlaskAppConfigWriterError> { - for (expected, input) in values { - assert_eq!(*expected, python_type.convert_to_python(input)?); - } - - Ok(()) - } - - #[rstest] - #[case::invalid_identifiers_are_not_converted_to_python( - PythonType::Identifier, &[ - "", "0", "-", "\n", "_-", "_\n", - ] - )] - #[case::invalid_booleans_are_not_converted_to_python( - PythonType::BoolLiteral, &[ - "", "False", "True", "0", "1", - ] - )] - #[case::invalid_integers_are_not_converted_to_python( - PythonType::IntLiteral, &[ - "", "a", "0x10", "inf", - ] - )] - #[case::invalid_strings_are_not_converted_to_python( - PythonType::StringLiteral, &[ - "ä", "❤" - ] - )] - #[case::invalid_expressions_are_not_converted_to_python( - PythonType::Expression, &[ - "" - ] - )] - fn invalid_values_are_converted_to_python( - #[case] python_type: PythonType, - #[case] values: &[&str], - ) { - for input in values { - assert!(python_type.convert_to_python(input).is_err()); - } - } - - #[test] - fn valid_options_are_written_into_a_configuration() -> Result<(), FlaskAppConfigWriterError> { - #[allow(clippy::enum_variant_names)] - enum Options { - BoolOption, - IntOption, - StringOption, - ExpressionOption, - _UnusedOption, - } - - impl FromStr for Options { - type Err = &'static str; - - fn from_str(s: &str) -> Result { - match s { - "BOOL_OPTION" => Ok(Options::BoolOption), - "INT_OPTION" => Ok(Options::IntOption), - "STRING_OPTION" => Ok(Options::StringOption), - "EXPRESSION_OPTION" => Ok(Options::ExpressionOption), - _ => Err("unknown option"), - } - } - } - - impl FlaskAppConfigOptions for Options { - fn python_type(&self) -> PythonType { - match self { - Options::BoolOption => PythonType::BoolLiteral, - Options::IntOption => PythonType::IntLiteral, - Options::StringOption => PythonType::StringLiteral, - Options::ExpressionOption => PythonType::Expression, - Options::_UnusedOption => PythonType::Expression, - } - } - } - - let config: BTreeMap<_, _> = [ - ("BOOL_OPTION", "true"), - ("INT_OPTION", "0"), - ("STRING_OPTION", ""), - ("EXPRESSION_OPTION", "{ \"key\": \"value\" }"), - ("OVERRIDDEN_OPTION", "None"), - ] - .map(|(k, v)| (k.to_string(), v.to_string())) - .into(); - - let imports = ["import module", "from module import member"]; - - let mut config_file = Vec::new(); - write::(&mut config_file, config.iter(), &imports)?; - - assert_eq!( - r#"import module -from module import member - -BOOL_OPTION = True -EXPRESSION_OPTION = { "key": "value" } -INT_OPTION = 0 -OVERRIDDEN_OPTION = None -STRING_OPTION = "" -"#, - from_utf8(&config_file).unwrap() - ); - - Ok(()) - } -} diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index c9d74745..b6944e6d 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -25,13 +25,15 @@ use stackable_operator::{ schemars::{self, JsonSchema}, shared::time::Duration, status::condition::{ClusterCondition, HasStatusCondition}, - v2::config_overrides::KeyValueConfigOverrides, + v2::{ + config_overrides::KeyValueConfigOverrides, + flask_config_writer::{FlaskAppConfigOptions, PythonType}, + }, versioned::versioned, }; use strum::{Display, EnumIter, EnumString, IntoEnumIterator}; use crate::{ - config::writer::{FlaskAppConfigOptions, PythonType}, crd::{ databases::{ CeleryBrokerConnection, CeleryResultsBackendConnection, MetadataDatabaseConnection, From 9543a88aff670cc9cc53cc260a79639af24312a3 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 10 Jun 2026 12:53:07 +0200 Subject: [PATCH 08/16] move structs to controller, add Merge to SupersetConfigOverrides --- rust/operator-binary/src/controller.rs | 41 +++++- .../src/controller/validate.rs | 128 +++++++++++------- rust/operator-binary/src/crd/mod.rs | 24 ++-- 3 files changed, 133 insertions(+), 60 deletions(-) diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 83fc87c5..e2865c4c 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -2,14 +2,20 @@ pub(crate) mod build; pub mod dereference; pub mod validate; -use std::sync::Arc; +use std::{ + collections::{BTreeMap, HashMap}, + sync::Arc, +}; use const_format::concatcp; use snafu::{ResultExt, Snafu}; use stackable_operator::{ cli::OperatorEnvironmentOptions, cluster_resources::{ClusterResourceApplyStrategy, ClusterResources}, - commons::{random_secret_creation, rbac::build_rbac_resources}, + commons::{ + product_image_selection::ResolvedProductImage, random_secret_creation, + rbac::build_rbac_resources, + }, kube::{ Resource, ResourceExt, core::{DeserializeGuard, error_boundary}, @@ -27,9 +33,11 @@ use strum::{EnumDiscriminants, IntoStaticStr}; use crate::{ OPERATOR_NAME, + authorization::opa::SupersetOpaConfigResolved, crd::{ APP_NAME, INTERNAL_SECRET_SECRET_KEY, SupersetRole, - v1alpha1::{SupersetCluster, SupersetClusterStatus}, + authentication::SupersetClientAuthenticationDetailsResolved, + v1alpha1::{SupersetCluster, SupersetClusterStatus, SupersetConfig}, }, operations::pdb::add_pdbs, resources::{ @@ -51,6 +59,33 @@ pub struct Ctx { pub operator_environment: OperatorEnvironmentOptions, } +/// Per-role configuration extracted during validation. +#[derive(Clone, Debug)] +pub struct ValidatedRoleConfig { + pub pdb: Option, + pub listener_class: Option, + pub group_listener_name: Option, +} + +/// Per-rolegroup configuration: the merged CRD config plus the assembled property maps. +#[derive(Clone, Debug)] +pub struct ValidatedRoleGroupConfig { + pub merged_config: SupersetConfig, + pub config_file_properties: BTreeMap, + pub env_overrides: BTreeMap, +} + +/// The validated cluster: proves that config merging succeeded for every role and role group +/// before any Kubernetes resources are created. Carries the dereferenced external objects so +/// downstream code has a single "ready to use" view of the cluster. +pub struct ValidatedSupersetCluster { + pub image: ResolvedProductImage, + pub role_groups: HashMap>, + pub role_configs: HashMap, + pub authentication_config: SupersetClientAuthenticationDetailsResolved, + pub opa_config: Option, +} + #[derive(Snafu, Debug, EnumDiscriminants)] #[strum_discriminants(derive(IntoStaticStr))] #[allow(clippy::enum_variant_names)] diff --git a/rust/operator-binary/src/controller/validate.rs b/rust/operator-binary/src/controller/validate.rs index e5768ec0..5a67b187 100644 --- a/rust/operator-binary/src/controller/validate.rs +++ b/rust/operator-binary/src/controller/validate.rs @@ -6,19 +6,17 @@ use std::collections::{BTreeMap, HashMap}; use snafu::{ResultExt, Snafu}; -use stackable_operator::{ - commons::product_image_selection::{self, ResolvedProductImage}, - role_utils::GenericRoleConfig, -}; +use stackable_operator::{commons::product_image_selection, role_utils::GenericRoleConfig}; use strum::IntoEnumIterator; use crate::{ - authorization::opa::SupersetOpaConfigResolved, built_info::PKG_VERSION, - controller::{CONTAINER_IMAGE_BASE_NAME, dereference::DereferencedObjects}, + controller::{ + CONTAINER_IMAGE_BASE_NAME, ValidatedRoleConfig, ValidatedRoleGroupConfig, + ValidatedSupersetCluster, dereference::DereferencedObjects, + }, crd::{ SupersetConfigOptions, SupersetRole, SupersetRoleType, - authentication::SupersetClientAuthenticationDetailsResolved, v1alpha1::{SupersetCluster, SupersetConfig}, }, }; @@ -34,41 +32,6 @@ pub enum Error { FailedToResolveConfig { source: crate::crd::Error }, } -/// Per-role configuration extracted during validation. -#[derive(Clone, Debug)] -pub struct ValidatedRoleConfig { - pub pdb: Option, - pub listener_class: Option, - pub group_listener_name: Option, -} - -/// Per-rolegroup configuration: the merged CRD config plus the assembled property maps. -#[derive(Clone, Debug)] -pub struct ValidatedRoleGroupConfig { - pub merged_config: SupersetConfig, - // DESIGN DECISION: this is the COMPLETE superset_config.py key/value map (operator - // recommended values + config-derived values + user configOverrides), not just the - // user overrides. Superset differs from airflow/kafka here: the old product-config - // path injected role-scoped recommended values (ROW_LIMIT, SUPERSET_WEBSERVER_TIMEOUT - // from properties.yaml) and config-derived values (compute_files), and the - // statefulset reads SUPERSET_WEBSERVER_TIMEOUT back out of this map. Alternative: - // store only the user overrides and re-derive the rest at each consumer — rejected, - // it would duplicate the precedence logic and break the statefulset's read-back. - pub config_file_properties: BTreeMap, - pub env_overrides: BTreeMap, -} - -/// The validated cluster: proves that config merging succeeded for every role and role group -/// before any Kubernetes resources are created. Carries the dereferenced external objects so -/// downstream code has a single "ready to use" view of the cluster. -pub struct ValidatedSupersetCluster { - pub image: ResolvedProductImage, - pub role_groups: HashMap>, - pub role_configs: HashMap, - pub authentication_config: SupersetClientAuthenticationDetailsResolved, - pub opa_config: Option, -} - pub fn validate_cluster( superset: &SupersetCluster, dereferenced: DereferencedObjects, @@ -202,14 +165,18 @@ fn collect_role_group_config( .config .config_overrides .superset_config_py - .as_ref() - .map(|o| o.overrides.clone()) - .unwrap_or_default(); + .overrides + .clone(); let rg_overrides: BTreeMap> = resolved_role .role_groups .get(rolegroup_name) - .and_then(|rg| rg.config.config_overrides.superset_config_py.as_ref()) - .map(|o| o.overrides.clone()) + .map(|rg| { + rg.config + .config_overrides + .superset_config_py + .overrides + .clone() + }) .unwrap_or_default(); let mut merged_overrides = role_overrides; merged_overrides.extend(rg_overrides); @@ -253,3 +220,70 @@ fn collect_role_group_config( (config_file_properties, env_overrides) } + +#[cfg(test)] +mod tests { + use stackable_operator::utils::yaml_from_str_singleton_map; + + use super::collect_role_group_config; + use crate::crd::{SupersetRole, v1alpha1}; + + /// Characterises the `superset_config.py` override resolution: role-level overrides are merged + /// with role-group overrides, the role group winning on shared keys, and unique keys from both + /// levels surviving. + #[test] + fn config_overrides_merge_role_group_over_role() { + let input = r#" + apiVersion: superset.stackable.tech/v1alpha1 + kind: SupersetCluster + metadata: + name: simple-superset + spec: + image: + productVersion: 4.1.4 + clusterConfig: + credentialsSecretName: superset-admin-credentials + metadataDatabase: + postgresql: + host: superset-postgresql + database: superset + credentialsSecretName: superset-postgresql-credentials + nodes: + configOverrides: + superset_config.py: + ROLE_ONLY: role + SHARED: role + roleGroups: + default: + replicas: 1 + configOverrides: + superset_config.py: + GROUP_ONLY: group + SHARED: group + "#; + let superset: v1alpha1::SupersetCluster = + yaml_from_str_singleton_map(input).expect("illegal test input"); + let role = SupersetRole::Node; + let resolved_role = superset.get_role(&role).expect("node role"); + let merged_config = superset + .merged_config(&role, &superset.rolegroup_ref(&role, "default")) + .expect("merged config"); + + let (config_file_properties, _env_overrides) = + collect_role_group_config(&superset, &role, resolved_role, "default", &merged_config); + + assert_eq!( + config_file_properties.get("ROLE_ONLY"), + Some(&"role".to_string()) + ); + assert_eq!( + config_file_properties.get("GROUP_ONLY"), + Some(&"group".to_string()) + ); + assert_eq!( + config_file_properties.get("SHARED"), + Some(&"group".to_string()), + "role-group override should win over the role-level value" + ); + } +} diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index b6944e6d..5278e6d4 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -28,6 +28,7 @@ use stackable_operator::{ v2::{ config_overrides::KeyValueConfigOverrides, flask_config_writer::{FlaskAppConfigOptions, PythonType}, + role_utils::GenericCommonConfig, }, versioned::versioned, }; @@ -69,8 +70,12 @@ pub const METRICS_PORT: u16 = 9102; const DEFAULT_NODE_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(2); -pub type SupersetRoleType = - Role; +pub type SupersetRoleType = Role< + v1alpha1::SupersetConfigFragment, + v1alpha1::SupersetConfigOverrides, + SupersetRoleConfig, + GenericCommonConfig, +>; #[derive(Debug, Snafu)] pub enum Error { @@ -188,17 +193,13 @@ pub mod versioned { pub listener_class: String, } - #[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, Merge, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct SupersetConfigOverrides { // Uses the v2 KeyValueConfigOverrides (Merge-capable, nullable values) to match // trino/hdfs/airflow/kafka. Resolution happens in controller/validate.rs. - #[serde( - default, - rename = "superset_config.py", - skip_serializing_if = "Option::is_none" - )] - pub superset_config_py: Option, + #[serde(default, rename = "superset_config.py")] + pub superset_config_py: KeyValueConfigOverrides, } #[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] @@ -468,7 +469,10 @@ impl FlaskAppConfigOptions for SupersetConfigOptions { impl v1alpha1::SupersetConfig { pub const MAPBOX_SECRET_PROPERTY: &'static str = "mapboxSecret"; - fn default_config(cluster_name: &str, role: &SupersetRole) -> v1alpha1::SupersetConfigFragment { + pub(crate) fn default_config( + cluster_name: &str, + role: &SupersetRole, + ) -> v1alpha1::SupersetConfigFragment { match role { SupersetRole::Node => v1alpha1::SupersetConfigFragment { resources: ResourcesFragment { From 34606b8d8ca9829704e5fb40178065c4010fc600 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 10 Jun 2026 14:00:18 +0200 Subject: [PATCH 09/16] use v2::role_utils::with_validated_config --- .../src/controller/validate.rs | 240 +++++++++++------- 1 file changed, 143 insertions(+), 97 deletions(-) diff --git a/rust/operator-binary/src/controller/validate.rs b/rust/operator-binary/src/controller/validate.rs index 5a67b187..9c15207d 100644 --- a/rust/operator-binary/src/controller/validate.rs +++ b/rust/operator-binary/src/controller/validate.rs @@ -6,7 +6,13 @@ use std::collections::{BTreeMap, HashMap}; use snafu::{ResultExt, Snafu}; -use stackable_operator::{commons::product_image_selection, role_utils::GenericRoleConfig}; +use stackable_operator::{ + commons::product_image_selection, + config::fragment, + kube::ResourceExt, + role_utils::{GenericRoleConfig, RoleGroup}, + v2::role_utils::{GenericCommonConfig, with_validated_config}, +}; use strum::IntoEnumIterator; use crate::{ @@ -16,8 +22,8 @@ use crate::{ ValidatedSupersetCluster, dereference::DereferencedObjects, }, crd::{ - SupersetConfigOptions, SupersetRole, SupersetRoleType, - v1alpha1::{SupersetCluster, SupersetConfig}, + SupersetConfigOptions, SupersetRole, + v1alpha1::{SupersetCluster, SupersetConfig, SupersetConfigFragment, SupersetRoleConfig}, }, }; @@ -28,8 +34,11 @@ pub enum Error { source: product_image_selection::Error, }, - #[snafu(display("failed to resolve and merge config for role and role group"))] - FailedToResolveConfig { source: crate::crd::Error }, + #[snafu(display("failed to resolve and merge config for role group {role_group}"))] + FailedToResolveConfig { + source: fragment::ValidationError, + role_group: String, + }, } pub fn validate_cluster( @@ -69,25 +78,28 @@ pub fn validate_cluster( }, ); + let default_config = SupersetConfig::default_config(&superset.name_any(), &role); + let mut group_configs = BTreeMap::new(); - for rolegroup_name in resolved_role.role_groups.keys() { - let rolegroup_ref = superset.rolegroup_ref(&role, rolegroup_name); - let merged_config = superset - .merged_config(&role, &rolegroup_ref) - .context(FailedToResolveConfigSnafu)?; - - let (config_file_properties, env_overrides) = collect_role_group_config( - superset, - &role, - resolved_role, - rolegroup_name, - &merged_config, - ); + for (rolegroup_name, rolegroup) in &resolved_role.role_groups { + let validated_rg = with_validated_config::< + SupersetConfig, + GenericCommonConfig, + SupersetConfigFragment, + SupersetRoleConfig, + crate::crd::v1alpha1::SupersetConfigOverrides, + >(rolegroup, resolved_role, &default_config) + .with_context(|_| FailedToResolveConfigSnafu { + role_group: rolegroup_name.clone(), + })?; + + let (config_file_properties, env_overrides) = + collect_role_group_config(superset, &role, &validated_rg); group_configs.insert( rolegroup_name.clone(), ValidatedRoleGroupConfig { - merged_config, + merged_config: validated_rg.config.config, config_file_properties, env_overrides, }, @@ -106,36 +118,29 @@ pub fn validate_cluster( }) } -// DESIGN DECISION: the per-rolegroup file map and env map are assembled here, in -// validation, reproducing the old product-config precedence exactly: -// user configOverrides > config-derived values > operator recommended values. -// Alternative: a generic with_validated_config-style merge. The upstream -// stackable_operator::v2::role_utils::with_validated_config is published on the -// smooth-operator branch but not consumed by any operator yet; trino-operator uses -// its own vendored, deliberately simplified variant (framework::role_utils) because -// its JavaCommonConfig cannot implement Merge. Neither variant covers the -// recommended-value injection and the statefulset's file read-back that superset -// needs, so the merge is assembled explicitly here. +// DESIGN DECISION: `with_validated_config` (operator-rs) performs the config-fragment +// merge+validate and the role<-role-group `Merge` of config/env overrides (a role-group +// `null` inherits the role-level value). This function layers superset's product-specific +// values on top to produce the COMPLETE superset_config.py map (operator recommended values +// + config-derived values + the merged user overrides), which the statefulset reads back. fn collect_role_group_config( superset: &SupersetCluster, role: &SupersetRole, - resolved_role: &SupersetRoleType, - rolegroup_name: &str, - merged_config: &SupersetConfig, + validated_rg: &RoleGroup< + SupersetConfig, + GenericCommonConfig, + crate::crd::v1alpha1::SupersetConfigOverrides, + >, ) -> (BTreeMap, BTreeMap) { - // --- config_file_properties (superset_config.py key/value map) --- + let merged_config = &validated_rg.config.config; + // --- config_file_properties --- let mut config_file_properties: BTreeMap = BTreeMap::new(); - // Step 1: Operator recommended values — Node role only, matching the old - // properties.yaml role-scoping (worker/beat never received these). + // Step 1: Operator recommended values — Node role only (matches the old properties.yaml + // role-scoping). ROW_LIMIT and SUPERSET_WEBSERVER_TIMEOUT; the latter because Superset's + // 60s default is too low for "big data" queries. if *role == SupersetRole::Node { - // Operator recommended values, formerly injected by product-config from - // deploy/config-spec/properties.yaml (role-scoped to the node role). - // ROW_LIMIT: row limit when requesting chart data. - // SUPERSET_WEBSERVER_TIMEOUT: the default timeout of Superset is 60s which is way - // too low when querying "big data" systems. Especially Trino queries often take - // longer. See https://superset.apache.org/docs/frequently-asked-questions#why-are-my-queries-timing-out config_file_properties.insert( SupersetConfigOptions::RowLimit.to_string(), "50000".to_string(), @@ -146,9 +151,8 @@ fn collect_role_group_config( ); } - // Step 2: Config-derived values (all roles) — mirror old compute_files logic. - // row_limit and webserver_timeout are Option<_> on the validated SupersetConfig; - // when set by the user they override the recommended values above. + // Step 2: Config-derived values (all roles) — user-set typed CRD fields override the + // recommended values above. if let Some(v) = merged_config.row_limit { config_file_properties.insert(SupersetConfigOptions::RowLimit.to_string(), v.to_string()); } @@ -159,64 +163,37 @@ fn collect_role_group_config( ); } - // Step 3: User configOverrides — role level first, then rolegroup extends on top - // (rolegroup wins). None values in the v2 map are dropped (deletion semantics). - let role_overrides: BTreeMap> = resolved_role - .config - .config_overrides - .superset_config_py - .overrides - .clone(); - let rg_overrides: BTreeMap> = resolved_role - .role_groups - .get(rolegroup_name) - .map(|rg| { - rg.config - .config_overrides - .superset_config_py - .overrides - .clone() - }) - .unwrap_or_default(); - let mut merged_overrides = role_overrides; - merged_overrides.extend(rg_overrides); + // Step 3: User configOverrides — already merged role<-role-group with `Merge` semantics by + // `with_validated_config`. `None` values are dropped on render (a key that is `null` at all + // levels is omitted; a role-group `null` over a role value inherits the role value). config_file_properties.extend( - merged_overrides - .into_iter() - .filter_map(|(k, v)| v.map(|v| (k, v))), + validated_rg + .config + .config_overrides + .superset_config_py + .overrides + .iter() + .filter_map(|(k, v)| v.clone().map(|v| (k.clone(), v))), ); // --- env_overrides --- - - // DESIGN DECISION: the MAPBOX secret property is injected first (moved here from - // crd Configuration::compute_env), then user envOverrides (role then rolegroup) - // extend on top so a user-set key wins — the same precedence product-config used. - // Alternative: inject after user overrides (operator wins) — rejected to preserve - // the previous precedence. + // The MAPBOX secret is injected first, then the merged user envOverrides extend on top so a + // user-set key wins — the same precedence as before. Collected into a BTreeMap for a + // deterministic order. let mut env_overrides: BTreeMap = BTreeMap::new(); - if let Some(mapbox_secret) = &superset.spec.cluster_config.mapbox_secret { env_overrides.insert( SupersetConfig::MAPBOX_SECRET_PROPERTY.to_string(), mapbox_secret.clone(), ); } - env_overrides.extend( - resolved_role + validated_rg .config .env_overrides .iter() .map(|(k, v)| (k.clone(), v.clone())), ); - if let Some(rg) = resolved_role.role_groups.get(rolegroup_name) { - env_overrides.extend( - rg.config - .env_overrides - .iter() - .map(|(k, v)| (k.clone(), v.clone())), - ); - } (config_file_properties, env_overrides) } @@ -225,8 +202,29 @@ fn collect_role_group_config( mod tests { use stackable_operator::utils::yaml_from_str_singleton_map; - use super::collect_role_group_config; - use crate::crd::{SupersetRole, v1alpha1}; + use super::validate_cluster; + use crate::{ + controller::dereference::DereferencedObjects, + crd::{ + SupersetRole, + authentication::{ + SupersetClientAuthenticationDetailsResolved, v1alpha1::FlaskRolesSyncMoment, + }, + v1alpha1, + }, + }; + + fn default_dereferenced() -> DereferencedObjects { + DereferencedObjects { + authentication_config: SupersetClientAuthenticationDetailsResolved { + authentication_classes_resolved: vec![], + user_registration: true, + user_registration_role: "Public".to_string(), + sync_roles_at: FlaskRolesSyncMoment::default(), + }, + opa_config: None, + } + } /// Characterises the `superset_config.py` override resolution: role-level overrides are merged /// with role-group overrides, the role group winning on shared keys, and unique keys from both @@ -263,27 +261,75 @@ mod tests { "#; let superset: v1alpha1::SupersetCluster = yaml_from_str_singleton_map(input).expect("illegal test input"); - let role = SupersetRole::Node; - let resolved_role = superset.get_role(&role).expect("node role"); - let merged_config = superset - .merged_config(&role, &superset.rolegroup_ref(&role, "default")) - .expect("merged config"); - let (config_file_properties, _env_overrides) = - collect_role_group_config(&superset, &role, resolved_role, "default", &merged_config); + let dereferenced = default_dereferenced(); + + let validated = validate_cluster(&superset, dereferenced, "test-repo").expect("validated"); + let node = validated + .role_groups + .get(&SupersetRole::Node) + .and_then(|groups| groups.get("default")) + .expect("node default rolegroup"); assert_eq!( - config_file_properties.get("ROLE_ONLY"), + node.config_file_properties.get("ROLE_ONLY"), Some(&"role".to_string()) ); assert_eq!( - config_file_properties.get("GROUP_ONLY"), + node.config_file_properties.get("GROUP_ONLY"), Some(&"group".to_string()) ); assert_eq!( - config_file_properties.get("SHARED"), + node.config_file_properties.get("SHARED"), Some(&"group".to_string()), "role-group override should win over the role-level value" ); } + + #[test] + fn config_overrides_null_inherits_role_value() { + let input = r#" + apiVersion: superset.stackable.tech/v1alpha1 + kind: SupersetCluster + metadata: + name: simple-superset + spec: + image: + productVersion: 4.1.4 + clusterConfig: + credentialsSecretName: superset-admin-credentials + metadataDatabase: + postgresql: + host: superset-postgresql + database: superset + credentialsSecretName: superset-postgresql-credentials + nodes: + configOverrides: + superset_config.py: + KEY: role + roleGroups: + default: + replicas: 1 + configOverrides: + superset_config.py: + KEY: null + "#; + let superset: v1alpha1::SupersetCluster = + yaml_from_str_singleton_map(input).expect("illegal test input"); + + let dereferenced = default_dereferenced(); + + let validated = validate_cluster(&superset, dereferenced, "test-repo").expect("validated"); + let node = validated + .role_groups + .get(&SupersetRole::Node) + .and_then(|groups| groups.get("default")) + .expect("node default rolegroup"); + + // Merge semantics: a role-group `null` inherits the role-level value (not delete). + assert_eq!( + node.config_file_properties.get("KEY"), + Some(&"role".to_string()) + ); + } } From f48b37b7a6ef3db0b14571868180d23cdb0f5ca1 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 10 Jun 2026 14:30:17 +0200 Subject: [PATCH 10/16] refine parameter pass-through --- rust/operator-binary/src/controller.rs | 20 +++++--------- .../src/controller/build/config_map.rs | 16 ++++-------- .../src/resources/statefulset.rs | 26 ++++++++++--------- 3 files changed, 26 insertions(+), 36 deletions(-) diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index e2865c4c..27b79d31 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -237,9 +237,6 @@ pub async fn reconcile_superset( &ctx.operator_environment.image_repository, ) .context(ValidateSnafu)?; - let resolved_product_image = &validated.image; - let auth_config = &validated.authentication_config; - let superset_opa_config = &validated.opa_config; let mut cluster_resources = ClusterResources::new( APP_NAME, @@ -289,21 +286,19 @@ pub async fn reconcile_superset( let rg_configmap = build::config_map::build_rolegroup_config_map( superset, - resolved_product_image, + &validated, &rolegroup, &validated_rolegroup.config_file_properties, - auth_config, - superset_opa_config, &config.logging, ) .context(BuildConfigMapSnafu)?; let rg_metrics_service = - build_node_rolegroup_metrics_service(superset, resolved_product_image, &rolegroup) + build_node_rolegroup_metrics_service(superset, &validated.image, &rolegroup) .context(BuildServiceSnafu)?; let rg_headless_service = - build_node_rolegroup_headless_service(superset, resolved_product_image, &rolegroup) + build_node_rolegroup_headless_service(superset, &validated.image, &rolegroup) .context(BuildServiceSnafu)?; cluster_resources @@ -331,12 +326,11 @@ pub async fn reconcile_superset( SupersetRole::Node => { let rg_statefulset = build_server_rolegroup_statefulset( superset, - resolved_product_image, + &validated, superset_role, &rolegroup, &validated_rolegroup.config_file_properties, &validated_rolegroup.env_overrides, - auth_config, &rbac_sa.name_any(), config, ) @@ -357,7 +351,7 @@ pub async fn reconcile_superset( SupersetRole::Worker => { let rg_worker_deployment = build_worker_rolegroup_deployment( superset, - resolved_product_image, + &validated.image, superset_role, &rolegroup, &validated_rolegroup.env_overrides, @@ -381,7 +375,7 @@ pub async fn reconcile_superset( SupersetRole::Beat => { let rg_beat_deployment = build_beat_rolegroup_deployment( superset, - resolved_product_image, + &validated.image, superset_role, &rolegroup, &validated_rolegroup.env_overrides, @@ -414,7 +408,7 @@ pub async fn reconcile_superset( build_recommended_labels( superset, SUPERSET_CONTROLLER_NAME, - &resolved_product_image.product_version, + &validated.image.product_version, &superset_role.to_string(), "none", ), diff --git a/rust/operator-binary/src/controller/build/config_map.rs b/rust/operator-binary/src/controller/build/config_map.rs index 895c044f..a2c8c05b 100644 --- a/rust/operator-binary/src/controller/build/config_map.rs +++ b/rust/operator-binary/src/controller/build/config_map.rs @@ -3,19 +3,16 @@ use std::collections::BTreeMap; use snafu::{ResultExt, Snafu}; use stackable_operator::{ builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder}, - commons::product_image_selection::ResolvedProductImage, k8s_openapi::api::core::v1::ConfigMap, product_logging::spec::Logging, role_utils::RoleGroupRef, }; use crate::{ - authorization::opa::SupersetOpaConfigResolved, config::{product_logging::extend_config_map_with_log_config, superset_config}, - controller::SUPERSET_CONTROLLER_NAME, + controller::{SUPERSET_CONTROLLER_NAME, ValidatedSupersetCluster}, crd::{ SUPERSET_CONFIG_FILENAME, - authentication::SupersetClientAuthenticationDetailsResolved, v1alpha1::{Container, SupersetCluster}, }, resources::build_recommended_labels, @@ -49,20 +46,17 @@ pub enum Error { type Result = std::result::Result; /// The rolegroup [`ConfigMap`] configures the rolegroup based on the configuration given by the administrator -#[allow(clippy::too_many_arguments)] pub fn build_rolegroup_config_map( superset: &SupersetCluster, - resolved_product_image: &ResolvedProductImage, + validated: &ValidatedSupersetCluster, rolegroup: &RoleGroupRef, config_file_properties: &BTreeMap, - authentication_config: &SupersetClientAuthenticationDetailsResolved, - superset_opa_config: &Option, logging: &Logging, ) -> Result { let config_file = superset_config::build( superset, - authentication_config, - superset_opa_config, + &validated.authentication_config, + &validated.opa_config, config_file_properties, ) .with_context(|_| BuildSupersetConfigSnafu { @@ -81,7 +75,7 @@ pub fn build_rolegroup_config_map( .with_recommended_labels(&build_recommended_labels( superset, SUPERSET_CONTROLLER_NAME, - &resolved_product_image.app_version_label_value, + &validated.image.app_version_label_value, &rolegroup.role, &rolegroup.role_group, )) diff --git a/rust/operator-binary/src/resources/statefulset.rs b/rust/operator-binary/src/resources/statefulset.rs index 6d061b43..2606fbcb 100644 --- a/rust/operator-binary/src/resources/statefulset.rs +++ b/rust/operator-binary/src/resources/statefulset.rs @@ -17,7 +17,6 @@ use stackable_operator::{ }, }, }, - commons::product_image_selection::ResolvedProductImage, k8s_openapi::{ DeepMerge, api::{ @@ -38,7 +37,7 @@ use stackable_operator::{ use crate::{ config::{commands::add_cert_to_python_certifi_command, product_logging::LOG_CONFIG_FILE}, - controller::SUPERSET_CONTROLLER_NAME, + controller::{SUPERSET_CONTROLLER_NAME, ValidatedSupersetCluster}, crd::{ APP_NAME, APP_PORT, METRICS_PORT, METRICS_PORT_NAME, PYTHONPATH, STACKABLE_CONFIG_DIR, STACKABLE_LOG_CONFIG_DIR, STACKABLE_LOG_DIR, SUPERSET_CONFIG_FILENAME, @@ -131,12 +130,11 @@ type Result = std::result::Result; #[allow(clippy::too_many_arguments)] pub fn build_server_rolegroup_statefulset( superset: &SupersetCluster, - resolved_product_image: &ResolvedProductImage, + validated: &ValidatedSupersetCluster, superset_role: &SupersetRole, rolegroup_ref: &RoleGroupRef, config_file_properties: &BTreeMap, env_overrides: &BTreeMap, - authentication_config: &SupersetClientAuthenticationDetailsResolved, sa_name: &str, merged_config: &SupersetConfig, ) -> Result { @@ -155,7 +153,7 @@ pub fn build_server_rolegroup_statefulset( let recommended_object_labels = build_recommended_labels( superset, SUPERSET_CONTROLLER_NAME, - &resolved_product_image.app_version_label_value, + &validated.image.app_version_label_value, &rolegroup_ref.role, &rolegroup_ref.role_group, ); @@ -179,7 +177,7 @@ pub fn build_server_rolegroup_statefulset( pb = pb .metadata(metadata) - .image_pull_secrets_from_product_image(resolved_product_image) + .image_pull_secrets_from_product_image(&validated.image) .security_context( PodSecurityContextBuilder::new() .fs_group(1000) // Needed for secret-operator @@ -226,7 +224,11 @@ pub fn build_server_rolegroup_statefulset( crate::crd::INTERNAL_SECRET_SECRET_KEY, ); - add_authentication_volumes_and_volume_mounts(authentication_config, &mut superset_cb, pb)?; + add_authentication_volumes_and_volume_mounts( + &validated.authentication_config, + &mut superset_cb, + pb, + )?; let webserver_timeout = config_file_properties .get(&SupersetConfigOptions::SupersetWebserverTimeout.to_string()) @@ -235,7 +237,7 @@ pub fn build_server_rolegroup_statefulset( let secret = &superset.spec.cluster_config.credentials_secret_name; superset_cb - .image_from_product_image(resolved_product_image) + .image_from_product_image(&validated.image) .add_container_port("http", APP_PORT.into()) .add_volume_mount(CONFIG_VOLUME_NAME, STACKABLE_CONFIG_DIR).context(AddVolumeMountSnafu)? .add_volume_mount(LOG_CONFIG_VOLUME_NAME, STACKABLE_LOG_CONFIG_DIR).context(AddVolumeMountSnafu)? @@ -248,7 +250,7 @@ pub fn build_server_rolegroup_statefulset( // Needed by the `containerdebug` process to log it's tracing information to. .add_env_var("CONTAINERDEBUG_LOG_DIRECTORY", format!("{STACKABLE_LOG_DIR}/containerdebug")) .add_env_var("SSL_CERT_DIR", "/stackable/certs/") - .add_env_vars(authentication_env_vars(authentication_config)) + .add_env_vars(authentication_env_vars(&validated.authentication_config)) .command(vec![ "/bin/bash".to_string(), "-x".to_string(), @@ -280,7 +282,7 @@ pub fn build_server_rolegroup_statefulset( {create_vector_shutdown_file_command} ", - auth_commands = authentication_start_commands(authentication_config), + auth_commands = authentication_start_commands(&validated.authentication_config), remove_vector_shutdown_file_command = remove_vector_shutdown_file_command(STACKABLE_LOG_DIR), create_vector_shutdown_file_command = @@ -313,7 +315,7 @@ pub fn build_server_rolegroup_statefulset( let metrics_container = ContainerBuilder::new("metrics") .context(InvalidContainerNameSnafu)? - .image_from_product_image(resolved_product_image) + .image_from_product_image(&validated.image) .command(vec![ "/bin/bash".to_string(), "-x".to_string(), @@ -355,7 +357,7 @@ pub fn build_server_rolegroup_statefulset( Some(vector_aggregator_config_map_name) => { pb.add_container( product_logging::framework::vector_container( - resolved_product_image, + &validated.image, CONFIG_VOLUME_NAME, LOG_VOLUME_NAME, merged_config.logging.containers.get(&Container::Vector), From 2614ae3318277d009d6db908efc3761b2fbb8458 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 10 Jun 2026 14:31:01 +0200 Subject: [PATCH 11/16] regenerate charts --- extra/crds.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extra/crds.yaml b/extra/crds.yaml index 51d8f4a0..68af85a8 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -337,12 +337,12 @@ spec: additionalProperties: nullable: true type: string + default: {} description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. This is backwards-compatible with the existing flat key-value YAML format used by `HashMap`. - nullable: true type: object type: object envOverrides: @@ -715,12 +715,12 @@ spec: additionalProperties: nullable: true type: string + default: {} description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. This is backwards-compatible with the existing flat key-value YAML format used by `HashMap`. - nullable: true type: object type: object envOverrides: @@ -1474,12 +1474,12 @@ spec: additionalProperties: nullable: true type: string + default: {} description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. This is backwards-compatible with the existing flat key-value YAML format used by `HashMap`. - nullable: true type: object type: object envOverrides: @@ -1852,12 +1852,12 @@ spec: additionalProperties: nullable: true type: string + default: {} description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. This is backwards-compatible with the existing flat key-value YAML format used by `HashMap`. - nullable: true type: object type: object envOverrides: @@ -2219,12 +2219,12 @@ spec: additionalProperties: nullable: true type: string + default: {} description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. This is backwards-compatible with the existing flat key-value YAML format used by `HashMap`. - nullable: true type: object type: object envOverrides: @@ -2597,12 +2597,12 @@ spec: additionalProperties: nullable: true type: string + default: {} description: |- Flat key-value overrides for `*.properties`, Hadoop XML, etc. This is backwards-compatible with the existing flat key-value YAML format used by `HashMap`. - nullable: true type: object type: object envOverrides: From 4468ddb0be4977071bc13ed148af1f16a543cf5c Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 10 Jun 2026 14:33:40 +0200 Subject: [PATCH 12/16] consistent use of app_version_label_value --- rust/operator-binary/src/controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 27b79d31..1a9f4ad9 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -408,7 +408,7 @@ pub async fn reconcile_superset( build_recommended_labels( superset, SUPERSET_CONTROLLER_NAME, - &validated.image.product_version, + &validated.image.app_version_label_value, &superset_role.to_string(), "none", ), From 9951c2b1f4461fe13208ab529e0da53e3667ef79 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 10 Jun 2026 14:35:15 +0200 Subject: [PATCH 13/16] updated changelog --- CHANGELOG.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14036ca2..ff8cf415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,12 +24,9 @@ More information can be found in the [Superset database documentation](https://docs.stackable.tech/home/nightly/superset/usage-guide/database-connections) for details ([#722]). - Internal operator refactoring: introduce dereference() and validate() steps in the reconciler ([#731]). - test: Bump vector-aggregator to 0.55.0, replace /graphql call with gRPC call ([#735]). -- Removed the product-config based configuration validation. Config and environment overrides are - now merged directly from the CRD into the validated cluster (including the formerly - properties.yaml-provided `ROW_LIMIT` and `SUPERSET_WEBSERVER_TIMEOUT` recommended values), the - Flask config writer is consumed from `stackable-operator` (`v2::flask_config_writer`), and the - `product-config` crate dependency is dropped. The `--product-config` CLI flag and - `PRODUCT_CONFIG` env var are now no-ops ([#738]). +- BREAKING: Removed product-config machinery. This is a breaking change in terms of configuration. + Users relying on the product-config `properties.yaml` file have to set these properties via the CRD. + The `--product-config` CLI flag and `PRODUCT_CONFIG` env var are now no-ops ([#738]). [#717]: https://github.com/stackabletech/superset-operator/pull/717 [#719]: https://github.com/stackabletech/superset-operator/pull/719 From 5d1a9cd809f9c5ba2ef0fa3fb5bbbc9ae1b9a32a Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 10 Jun 2026 15:02:14 +0200 Subject: [PATCH 14/16] bump operator-rs to use updated KeyValueConfigOverrides --- Cargo.lock | 274 ++++++------ Cargo.nix | 416 ++++++++---------- crate-hashes.json | 18 +- .../src/controller/validate.rs | 47 +- rust/operator-binary/src/crd/mod.rs | 2 +- 5 files changed, 338 insertions(+), 419 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a936d4f..5c8f14ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -163,9 +163,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "axum" @@ -265,9 +265,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" -version = "2.11.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" [[package]] name = "block-buffer" @@ -280,9 +280,9 @@ dependencies = [ [[package]] name = "built" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64" +checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9" dependencies = [ "chrono", "git2", @@ -290,9 +290,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.2" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "bytes" @@ -302,9 +302,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" -version = "1.2.60" +version = "1.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" +checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f" dependencies = [ "find-msvc-tools", "jobserver", @@ -320,9 +320,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chrono" -version = "0.4.44" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ "iana-time-zone", "num-traits", @@ -613,9 +613,9 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", @@ -676,9 +676,9 @@ dependencies = [ [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "elliptic-curve" @@ -924,9 +924,9 @@ checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-timer" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" [[package]] name = "futures-util" @@ -983,15 +983,14 @@ dependencies = [ [[package]] name = "git2" -version = "0.20.4" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b" +checksum = "ddddbf932745a6be37109b6112d3ee09696106f848449069d3a57bba937ab82e" dependencies = [ "bitflags", "libc", "libgit2-sys", "log", - "url", ] [[package]] @@ -1025,9 +1024,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" dependencies = [ "atomic-waker", "bytes", @@ -1055,9 +1054,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "heck" @@ -1087,9 +1086,9 @@ dependencies = [ [[package]] name = "http" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" dependencies = [ "bytes", "itoa", @@ -1138,9 +1137,9 @@ checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" [[package]] name = "hyper" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" dependencies = [ "atomic-waker", "bytes", @@ -1336,9 +1335,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -1351,7 +1350,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.17.0", + "hashbrown 0.17.1", ] [[package]] @@ -1369,16 +1368,6 @@ version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" -[[package]] -name = "iri-string" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "is_terminal_polyfill" version = "1.70.2" @@ -1413,9 +1402,9 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.23" +version = "0.2.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" +checksum = "4603d3033e49e2b0e31229fcab20a5d40089c607d975cd9c80551dc69eed9102" dependencies = [ "jiff-static", "jiff-tzdb-platform", @@ -1423,14 +1412,14 @@ dependencies = [ "portable-atomic", "portable-atomic-util", "serde_core", - "windows-sys 0.61.2", + "windows-link", ] [[package]] name = "jiff-static" -version = "0.2.23" +version = "0.2.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" +checksum = "782d32378dddf207193ac91cefb848ad41abb58195c95168e1291227a0832b47" dependencies = [ "proc-macro2", "quote", @@ -1464,27 +1453,26 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.95" +version = "0.3.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +checksum = "f2025f20d7a4fa7785846e7b63d10a76d3f1cee98ee5cb79ea59703f95e42162" dependencies = [ "cfg-if", "futures-util", - "once_cell", "wasm-bindgen", ] [[package]] name = "json-patch" -version = "4.1.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f300e415e2134745ef75f04562dd0145405c2f7fd92065db029ac4b16b57fe90" +checksum = "7421438de105a0827e44fadd05377727847d717c80ce29a229f85fd04c427b72" dependencies = [ "jsonptr", "schemars", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] @@ -1526,7 +1514,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#451088f77acee6c3d296754698260256c250ecb2" dependencies = [ "darling", "regex", @@ -1667,15 +1655,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.185" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libgit2-sys" -version = "0.18.3+1.9.2" +version = "0.18.5+1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" +checksum = "005d6ae6eac1912906073e069f7db60b1fa98e052a68227824afe3e3a1c59ca2" dependencies = [ "cc", "libc", @@ -1691,9 +1679,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libz-sys" -version = "1.1.28" +version = "1.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc3a226e576f50782b3305c5ccf458698f92798987f551c6a02efe8276721e22" +checksum = "85bc9657773828b90eeb625adff10eeac83cc21bbfd8e23a03eaa8a33c9e28d9" dependencies = [ "cc", "libc", @@ -1718,9 +1706,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" [[package]] name = "matchers" @@ -1739,9 +1727,9 @@ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "memchr" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" [[package]] name = "mime" @@ -1761,9 +1749,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" dependencies = [ "libc", "wasi", @@ -1797,9 +1785,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-integer" @@ -2064,18 +2052,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.11" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.11" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", @@ -2199,9 +2187,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" +checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1" dependencies = [ "bytes", "prost-derive", @@ -2209,9 +2197,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" +checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf" dependencies = [ "anyhow", "itertools", @@ -2222,9 +2210,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" +checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a" dependencies = [ "prost", ] @@ -2333,9 +2321,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.3" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" dependencies = [ "aho-corasick", "memchr", @@ -2356,9 +2344,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "relative-path" @@ -2482,9 +2470,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.38" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "log", "once_cell", @@ -2497,9 +2485,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" dependencies = [ "openssl-probe", "rustls-pki-types", @@ -2509,9 +2497,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ "zeroize", ] @@ -2685,9 +2673,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "itoa", "memchr", @@ -2765,9 +2753,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "signal-hook-registry" @@ -2872,9 +2860,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", "windows-sys 0.61.2", @@ -2905,7 +2893,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#451088f77acee6c3d296754698260256c250ecb2" dependencies = [ "const-oid", "ecdsa", @@ -2929,7 +2917,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.111.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#451088f77acee6c3d296754698260256c250ecb2" dependencies = [ "base64", "clap", @@ -2973,7 +2961,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#451088f77acee6c3d296754698260256c250ecb2" dependencies = [ "darling", "proc-macro2", @@ -2984,7 +2972,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#451088f77acee6c3d296754698260256c250ecb2" dependencies = [ "jiff", "k8s-openapi", @@ -3023,7 +3011,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.4" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#451088f77acee6c3d296754698260256c250ecb2" dependencies = [ "axum", "clap", @@ -3047,7 +3035,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.10.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#451088f77acee6c3d296754698260256c250ecb2" dependencies = [ "kube", "schemars", @@ -3061,7 +3049,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.10.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#451088f77acee6c3d296754698260256c250ecb2" dependencies = [ "convert_case", "convert_case_extras", @@ -3079,7 +3067,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#46cd3f93a788d44d177a8794fde91fbefa3156d7" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#451088f77acee6c3d296754698260256c250ecb2" dependencies = [ "arc-swap", "async-trait", @@ -3302,9 +3290,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.52.1" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "bytes", "libc", @@ -3374,9 +3362,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.11+spec-1.1.0" +version = "0.25.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" dependencies = [ "indexmap", "toml_datetime", @@ -3395,9 +3383,9 @@ dependencies = [ [[package]] name = "tonic" -version = "0.14.5" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec7c61a0695dc1887c1b53952990f3ad2e3a31453e1f49f10e75424943a93ec" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ "async-trait", "base64", @@ -3422,9 +3410,9 @@ dependencies = [ [[package]] name = "tonic-prost" -version = "0.14.5" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55376a0bbaa4975a3f10d009ad763d8f4108f067c7c2e74f3001fb49778d309" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" dependencies = [ "bytes", "prost", @@ -3433,9 +3421,9 @@ dependencies = [ [[package]] name = "tonic-types" -version = "0.14.5" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a875a902255423d34c1f20838ab374126db8eb41625b7947a1d54113b0b7399" +checksum = "73ab1b02061f83d519bba3caa167f88f261ef05720ab8ebc954ade70de3348e8" dependencies = [ "prost", "prost-types", @@ -3463,9 +3451,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ "base64", "bitflags", @@ -3473,13 +3461,13 @@ dependencies = [ "futures-util", "http", "http-body", - "iri-string", "mime", "pin-project-lite", "tower", "tower-layer", "tower-service", "tracing", + "url", ] [[package]] @@ -3606,9 +3594,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.20.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "ucd-trie" @@ -3624,9 +3612,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.13.2" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] name = "unicode-xid" @@ -3673,9 +3661,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.23.2" +version = "1.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d258b83ceec21034727ecee8c382cfa6c3e133699b0742c64571814fb420c9f7" +checksum = "144d6b123cef80b301b8f72a9e2ca4370ddec21950d0a103dd22c437006d2db7" dependencies = [ "js-sys", "wasm-bindgen", @@ -3725,9 +3713,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.118" +version = "0.2.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +checksum = "a254a4b10c19a76f09a27640e7ffbf9bc30bf67e16a3bf28aaefa4920fe81563" dependencies = [ "cfg-if", "once_cell", @@ -3738,9 +3726,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.68" +version = "0.4.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" +checksum = "54568702fabf5d4849ce2b90fadfa64168a097eaf4b351ce9df8b687a0086aaf" dependencies = [ "js-sys", "wasm-bindgen", @@ -3748,9 +3736,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.118" +version = "0.2.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +checksum = "24a40fc75b0ec6f3746ceb10d36f53a93dcd68a93b11b6445983945d79eba0dc" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3758,9 +3746,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.118" +version = "0.2.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +checksum = "908f34bd9b9ce3d4caf07b72dfab63d61504d156856c6bd3cd87fa350cf3985b" dependencies = [ "bumpalo", "proc-macro2", @@ -3771,18 +3759,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.118" +version = "0.2.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +checksum = "7acbf7616c27b194bbb550bf77ed0c2c3e5b7fd1260a93082b95fb7f47959b92" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.95" +version = "0.3.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" +checksum = "6e0871acf327f283dc6da28a1696cdc64fb355ba9f935d052021fa77f35cce69" dependencies = [ "js-sys", "wasm-bindgen", @@ -3941,9 +3929,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" dependencies = [ "memchr", ] @@ -3982,9 +3970,9 @@ checksum = "636f85e5ca6488e96401b61eb7de54f4e44755c988af0f52cf90230c312a1a89" [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -4005,18 +3993,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" dependencies = [ "proc-macro2", "quote", @@ -4025,9 +4013,9 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] diff --git a/Cargo.nix b/Cargo.nix index 421ad43c..73731c78 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -489,9 +489,9 @@ rec { }; "autocfg" = rec { crateName = "autocfg"; - version = "1.5.0"; + version = "1.5.1"; edition = "2015"; - sha256 = "1s77f98id9l4af4alklmzq46f21c980v13z2r1pcxx6bqgw0d1n0"; + sha256 = "0lqasy5i30flcgih1b50kvsk6z32g09r1q4ql7q81pj6228jy0zj"; authors = [ "Josh Stone " ]; @@ -866,9 +866,9 @@ rec { }; "bitflags" = rec { crateName = "bitflags"; - version = "2.11.1"; + version = "2.13.0"; edition = "2021"; - sha256 = "1cvqijg3rvwgis20a66vfdxannjsxfy5fgjqkaq3l13gyfcj4lf4"; + sha256 = "1y239gpvl061rfvav7jds8mjs42kmwi39is7yx5d1qw3hvp8nf5l"; authors = [ "The Rust Project Developers" ]; @@ -898,9 +898,9 @@ rec { }; "built" = rec { crateName = "built"; - version = "0.8.0"; - edition = "2021"; - sha256 = "0r5f08lpjsr6j5ajkbmd0ymfmajpq8ddbfvi8ji8rx48y88qzbgl"; + version = "0.8.1"; + edition = "2024"; + sha256 = "1saq332pd6g3svvc9ah8myjpfvgqlzl2ksb1ypp3976kjcfm63jw"; authors = [ "Lukas Lueg " ]; @@ -924,15 +924,16 @@ rec { "chrono" = [ "dep:chrono" ]; "dependency-tree" = [ "cargo-lock/dependency-tree" ]; "git2" = [ "dep:git2" ]; + "gix" = [ "dep:gix" ]; "semver" = [ "dep:semver" ]; }; resolvedDefaultFeatures = [ "chrono" "git2" ]; }; "bumpalo" = rec { crateName = "bumpalo"; - version = "3.20.2"; + version = "3.20.3"; edition = "2021"; - sha256 = "1jrgxlff76k9glam0akhwpil2fr1w32gbjdf5hpipc7ld2c7h82x"; + sha256 = "0jc6va3nwcqikm7chnpdv1s87my3gs2j7g1sc7g3k91brg3arxbj"; authors = [ "Nick Fitzgerald " ]; @@ -961,9 +962,9 @@ rec { }; "cc" = rec { crateName = "cc"; - version = "1.2.60"; + version = "1.2.63"; edition = "2018"; - sha256 = "084a8ziprdlyrj865f3303qr0b7aaggilkl18slncss6m4yp1ia3"; + sha256 = "0zy2bqc4nvj6bv2cipx4h4bn65wf1zqf1fw1hsh64mmvg1hh2vjm"; authors = [ "Alex Crichton " ]; @@ -1011,9 +1012,9 @@ rec { }; "chrono" = rec { crateName = "chrono"; - version = "0.4.44"; + version = "0.4.45"; edition = "2021"; - sha256 = "1c64mk9a235271j5g3v4zrzqqmd43vp9vki7vqfllpqf5rd0fwy6"; + sha256 = "09rkcgk6is2sdhqs9142zv8xqnj8ryx8m9hknllqwyv9wxi9x9qs"; dependencies = [ { name = "iana-time-zone"; @@ -1906,9 +1907,9 @@ rec { }; "displaydoc" = rec { crateName = "displaydoc"; - version = "0.2.5"; + version = "0.2.6"; edition = "2021"; - sha256 = "1q0alair462j21iiqwrr21iabkfnb13d6x5w95lkdg21q2xrqdlp"; + sha256 = "0kyxwfbdmagd8afzb2pzja7wj8dhah7smxdsgw00iq8pa2jhmiqs"; procMacro = true; authors = [ "Jane Lusby " @@ -2108,12 +2109,9 @@ rec { }; "either" = rec { crateName = "either"; - version = "1.15.0"; + version = "1.16.0"; edition = "2021"; - sha256 = "069p1fknsmzn9llaizh77kip0pqmcwpdsykv2x30xpjyija5gis8"; - authors = [ - "bluss" - ]; + sha256 = "17k7jfbdz7k440h6lws9baz8p9zlxgb41sig3w81h80nwzsjyqli"; features = { "default" = [ "std" ]; "serde" = [ "dep:serde" ]; @@ -2830,9 +2828,9 @@ rec { }; "futures-timer" = rec { crateName = "futures-timer"; - version = "3.0.3"; + version = "3.0.4"; edition = "2018"; - sha256 = "094vw8k37djpbwv74bwf2qb7n6v6ghif4myss6smd6hgyajb127j"; + sha256 = "0s39in8ivw7g4d37pf31q02y44zd1hpfkd1pgra2slcqibdzlhxg"; libName = "futures_timer"; authors = [ "Alex Crichton " @@ -3090,9 +3088,9 @@ rec { }; "git2" = rec { crateName = "git2"; - version = "0.20.4"; - edition = "2018"; - sha256 = "0azykjpk3j6s354z23jkyq3r3pbmlw9ha1zsxkw5cnnpi1h2b23v"; + version = "0.21.0"; + edition = "2021"; + sha256 = "0bmqga9vlyx5sdlr0i28z0362s89xv9i4qcv20vvx9j54y9vzpfx"; authors = [ "Josh Triplett " "Alex Crichton " @@ -3114,17 +3112,14 @@ rec { name = "log"; packageId = "log"; } - { - name = "url"; - packageId = "url"; - } ]; features = { - "default" = [ "ssh" "https" ]; - "https" = [ "libgit2-sys/https" "openssl-sys" "openssl-probe" ]; + "cred" = [ "dep:url" ]; + "https" = [ "libgit2-sys/https" "openssl-sys" "openssl-probe" "cred" ]; "openssl-probe" = [ "dep:openssl-probe" ]; "openssl-sys" = [ "dep:openssl-sys" ]; - "ssh" = [ "libgit2-sys/ssh" ]; + "ssh" = [ "libgit2-sys/ssh" "cred" ]; + "unstable-sha256" = [ "libgit2-sys/unstable-sha256" ]; "vendored-libgit2" = [ "libgit2-sys/vendored" ]; "vendored-openssl" = [ "openssl-sys/vendored" "libgit2-sys/vendored-openssl" ]; "zlib-ng-compat" = [ "libgit2-sys/zlib-ng-compat" ]; @@ -3214,9 +3209,9 @@ rec { }; "h2" = rec { crateName = "h2"; - version = "0.4.13"; + version = "0.4.14"; edition = "2021"; - sha256 = "0m6w5gg0n0m1m5915bxrv8n4rlazhx5icknkslz719jhh4xdli1g"; + sha256 = "0cw7jk7kn2vn6f8w8ssh6gis1mljnfjxd606gvi4sjpyjayfy7qp"; authors = [ "Carl Lerche " "Sean McArthur " @@ -3327,14 +3322,11 @@ rec { }; resolvedDefaultFeatures = [ "allocator-api2" "default" "default-hasher" "equivalent" "inline-more" "raw-entry" ]; }; - "hashbrown 0.17.0" = rec { + "hashbrown 0.17.1" = rec { crateName = "hashbrown"; - version = "0.17.0"; + version = "0.17.1"; edition = "2024"; - sha256 = "0l8gvcz80lvinb7x22h53cqbi2y1fm603y2jhhh9qwygvkb7sijg"; - authors = [ - "Amanieu d'Antras " - ]; + sha256 = "0jmqz7i4yl6cm7rbn0i2ffkfrmwi6xkmzkaldr2v8bcsx2v0jngd"; features = { "alloc" = [ "dep:alloc" ]; "allocator-api2" = [ "dep:allocator-api2" ]; @@ -3409,9 +3401,9 @@ rec { }; "http" = rec { crateName = "http"; - version = "1.4.0"; + version = "1.4.2"; edition = "2021"; - sha256 = "06iind4cwsj1d6q8c2xgq8i2wka4ps74kmws24gsi1bzdlw2mfp3"; + sha256 = "09b4p8fiivkg7wm0b59fyrn1jkm7px298ci7zb9igz6n647gaw39"; authors = [ "Alex Crichton " "Carl Lerche " @@ -3528,9 +3520,9 @@ rec { }; "hyper" = rec { crateName = "hyper"; - version = "1.9.0"; + version = "1.10.1"; edition = "2021"; - sha256 = "1jmwbwqcaficskg76kq402gbymbnh2z4v99xwq3l5aa6n8bg16b2"; + sha256 = "1624nwrh1ci34psqcl3q8q266kha8kd6fmqjj14qck49l59iqa2m"; authors = [ "Sean McArthur " ]; @@ -4301,9 +4293,9 @@ rec { }; "idna_adapter" = rec { crateName = "idna_adapter"; - version = "1.2.1"; - edition = "2021"; - sha256 = "0i0339pxig6mv786nkqcxnwqa87v4m94b2653f6k3aj0jmhfkjis"; + version = "1.2.2"; + edition = "2024"; + sha256 = "0557p76l8hj35r9zn1yv7c6x1c0qbrsffmg80n0yy8361ly3fs6b"; authors = [ "The rust-url developers" ]; @@ -4337,7 +4329,7 @@ rec { } { name = "hashbrown"; - packageId = "hashbrown 0.17.0"; + packageId = "hashbrown 0.17.1"; usesDefaultFeatures = false; } ]; @@ -4395,39 +4387,6 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; - "iri-string" = rec { - crateName = "iri-string"; - version = "0.7.12"; - edition = "2021"; - sha256 = "082fpx6c5ghvmqpwxaf2b268m47z2ic3prajqbmi1s1qpfj5kri5"; - libName = "iri_string"; - authors = [ - "YOSHIOKA Takuma " - ]; - dependencies = [ - { - name = "memchr"; - packageId = "memchr"; - optional = true; - usesDefaultFeatures = false; - } - { - name = "serde"; - packageId = "serde"; - optional = true; - usesDefaultFeatures = false; - features = [ "derive" ]; - } - ]; - features = { - "alloc" = [ "serde?/alloc" ]; - "default" = [ "std" ]; - "memchr" = [ "dep:memchr" ]; - "serde" = [ "dep:serde" ]; - "std" = [ "alloc" "memchr?/std" "serde?/std" ]; - }; - resolvedDefaultFeatures = [ "alloc" "default" "std" ]; - }; "is_terminal_polyfill" = rec { crateName = "is_terminal_polyfill"; version = "1.70.2"; @@ -4497,9 +4456,9 @@ rec { }; "jiff" = rec { crateName = "jiff"; - version = "0.2.23"; + version = "0.2.28"; edition = "2021"; - sha256 = "0nc37n7jvgrzxdkcgc2hsfdf70lfagigjalh4igjrm5njvf4cd8s"; + sha256 = "00lixngcc7amh2fcsxfr0z38j06lllhapz192biv1qj97q1x60s6"; authors = [ "Andrew Gallant " ]; @@ -4545,12 +4504,10 @@ rec { usesDefaultFeatures = false; } { - name = "windows-sys"; - packageId = "windows-sys 0.61.2"; + name = "windows-link"; + packageId = "windows-link"; optional = true; - usesDefaultFeatures = false; target = { target, features }: (target."windows" or false); - features = [ "Win32_Foundation" "Win32_System_Time" ]; } ]; devDependencies = [ @@ -4569,7 +4526,7 @@ rec { "static-tz" = [ "dep:jiff-static" ]; "std" = [ "alloc" "log?/std" "serde_core?/std" ]; "tz-fat" = [ "jiff-static?/tz-fat" ]; - "tz-system" = [ "std" "dep:windows-sys" ]; + "tz-system" = [ "std" "dep:windows-link" ]; "tzdb-bundle-always" = [ "dep:jiff-tzdb" "alloc" ]; "tzdb-bundle-platform" = [ "dep:jiff-tzdb-platform" "alloc" ]; "tzdb-concatenated" = [ "std" ]; @@ -4579,9 +4536,9 @@ rec { }; "jiff-static" = rec { crateName = "jiff-static"; - version = "0.2.23"; + version = "0.2.28"; edition = "2021"; - sha256 = "192ss3cnixvg79cpa76clwkhn4mmz10vnwsbf7yjw8i484s8p31a"; + sha256 = "0irbhfh2f4i9w5l53jcmh6ssnhdd92wfy76978chgwnxilvk4bbq"; procMacro = true; libName = "jiff_static"; authors = [ @@ -4661,9 +4618,9 @@ rec { }; "js-sys" = rec { crateName = "js-sys"; - version = "0.3.95"; + version = "0.3.100"; edition = "2021"; - sha256 = "1jhj3kgxxgwm0cpdjiz7i2qapqr7ya9qswadmr63dhwx3lnyjr19"; + sha256 = "0qi1wjakyw2rx9wwprcfx77g3lvn1b8n6yvfhj2pgym4swh5y0pj"; libName = "js_sys"; authors = [ "The wasm-bindgen Developers" @@ -4672,7 +4629,6 @@ rec { { name = "cfg-if"; packageId = "cfg-if"; - optional = true; } { name = "futures-util"; @@ -4681,11 +4637,6 @@ rec { usesDefaultFeatures = false; features = [ "std" ]; } - { - name = "once_cell"; - packageId = "once_cell"; - usesDefaultFeatures = false; - } { name = "wasm-bindgen"; packageId = "wasm-bindgen"; @@ -4694,17 +4645,16 @@ rec { ]; features = { "default" = [ "std" "unsafe-eval" ]; - "futures" = [ "dep:cfg-if" "dep:futures-util" ]; - "futures-core-03-stream" = [ "futures" "dep:futures-core" ]; - "std" = [ "wasm-bindgen/std" ]; + "futures-core-03-stream" = [ "dep:futures-util" "dep:futures-core" ]; + "std" = [ "wasm-bindgen/std" "dep:futures-util" ]; }; - resolvedDefaultFeatures = [ "default" "futures" "std" "unsafe-eval" ]; + resolvedDefaultFeatures = [ "default" "std" "unsafe-eval" ]; }; "json-patch" = rec { crateName = "json-patch"; - version = "4.1.0"; + version = "4.2.0"; edition = "2021"; - sha256 = "147yaxmv3i4s0bdna86rgwpmqh2507fn4ighfpplaiqkw8ay807k"; + sha256 = "0wkv896d0pzq56i2kkl0giqpv117fwvhbpgs8iz85805w66l68bl"; libName = "json_patch"; authors = [ "Ivan Dubrov " @@ -4730,7 +4680,7 @@ rec { } { name = "thiserror"; - packageId = "thiserror 1.0.69"; + packageId = "thiserror 2.0.18"; } ]; devDependencies = [ @@ -4876,8 +4826,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; - sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; + rev = "451088f77acee6c3d296754698260256c250ecb2"; + sha256 = "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b"; }; libName = "k8s_version"; authors = [ @@ -5527,9 +5477,9 @@ rec { }; "libc" = rec { crateName = "libc"; - version = "0.2.185"; + version = "0.2.186"; edition = "2021"; - sha256 = "13rbdaa59l3w92q7kfcxx8zbikm99zzw54h59aqvcv5wx47jrzsj"; + sha256 = "0rnyhzjyqq9x56skkllbjzzzwym3r61lq3l4hqj64v71gw0r3av8"; authors = [ "The Rust Project Developers" ]; @@ -5543,10 +5493,10 @@ rec { }; "libgit2-sys" = rec { crateName = "libgit2-sys"; - version = "0.18.3+1.9.2"; + version = "0.18.5+1.9.4"; edition = "2021"; links = "git2"; - sha256 = "11rlbyihj3k35mnkxxz4yvsnlx33a4r9srl66c5vp08pp72arcy9"; + sha256 = "18lwqnhy7qxg4iw24s1a0n7aj7qbnryry1iy0w32k4f1xbk6lp80"; libName = "libgit2_sys"; libPath = "lib.rs"; authors = [ @@ -5604,10 +5554,10 @@ rec { }; "libz-sys" = rec { crateName = "libz-sys"; - version = "1.1.28"; + version = "1.1.29"; edition = "2018"; links = "z"; - sha256 = "08hyf9v85zifl3353xc7i5wr53v9b3scri856cmphl3gaxp24fpw"; + sha256 = "1n98kqya7a7a0cxf5n5z3g13rj7a1vqxynk2xc7bja1qfxbrdg45"; libName = "libz_sys"; authors = [ "Alex Crichton " @@ -5684,9 +5634,9 @@ rec { }; "log" = rec { crateName = "log"; - version = "0.4.29"; + version = "0.4.32"; edition = "2021"; - sha256 = "15q8j9c8g5zpkcw0hnd6cf2z7fxqnvsjh3rw5mv5q10r83i34l2y"; + sha256 = "0fmdg0cxig7i4fwf1sw7fmg4d1gdbfzniawcfpwydy1q7320fgwm"; authors = [ "The Rust Project Developers" ]; @@ -5740,9 +5690,9 @@ rec { }; "memchr" = rec { crateName = "memchr"; - version = "2.8.0"; + version = "2.8.1"; edition = "2021"; - sha256 = "0y9zzxcqxvdqg6wyag7vc3h0blhdn7hkq164bxyx2vph8zs5ijpq"; + sha256 = "1n448jx01h5z2xknj6x2dhxgr8s8fb717cf6vfqj5lmhkpj7m53b"; authors = [ "Andrew Gallant " "bluss" @@ -5803,9 +5753,9 @@ rec { }; "mio" = rec { crateName = "mio"; - version = "1.2.0"; + version = "1.2.1"; edition = "2021"; - sha256 = "1hanrh4fwsfkdqdaqfidz48zz1wdix23zwn3r2x78am0garfbdsh"; + sha256 = "1nkggmrlnjs93w8rja4lvjj4aml1xqahgimv1h0p7d373kvhmg82"; authors = [ "Carl Lerche " "Thomas de Zeeuw " @@ -5941,9 +5891,9 @@ rec { }; "num-conv" = rec { crateName = "num-conv"; - version = "0.2.1"; + version = "0.2.2"; edition = "2021"; - sha256 = "0rqrr29brafaa2za352pbmhkk556n7f8z9rrkgmjp1idvdl3fry6"; + sha256 = "0hg4f9bwmy7cwpxdkm165dmkfc8jhkkayci234jsmi5ssb33j5sj"; libName = "num_conv"; authors = [ "Jacob Pratt " @@ -6903,9 +6853,9 @@ rec { }; "pin-project" = rec { crateName = "pin-project"; - version = "1.1.11"; + version = "1.1.13"; edition = "2021"; - sha256 = "05zm3y3bl83ypsr6favxvny2kys4i19jiz1y18ylrbxwsiz9qx7i"; + sha256 = "09091qp946lpmjz4yp0xil1r5v4hgc91fi19dg5csayhdqrv4ri4"; libName = "pin_project"; dependencies = [ { @@ -6917,9 +6867,9 @@ rec { }; "pin-project-internal" = rec { crateName = "pin-project-internal"; - version = "1.1.11"; + version = "1.1.13"; edition = "2021"; - sha256 = "1ik4mpb92da75inmjvxf2qm61vrnwml3x24wddvrjlqh1z9hxcnr"; + sha256 = "12rzlh07i1sdgrvzj6wgkka5bjqyvbfsl8knq6qi7g16m7q9aqy9"; procMacro = true; libName = "pin_project_internal"; dependencies = [ @@ -7241,9 +7191,9 @@ rec { }; "prost" = rec { crateName = "prost"; - version = "0.14.3"; + version = "0.14.4"; edition = "2021"; - sha256 = "0s057z9nzggzy7x4bbsiar852hg7zb81f4z4phcdb0ig99971snj"; + sha256 = "1qas5v5rap45f43v3ja0jngxrrafrkcwl0iw5a3ld1pz2rscd2jj"; authors = [ "Dan Burkert " "Lucio Franco " @@ -7270,9 +7220,9 @@ rec { }; "prost-derive" = rec { crateName = "prost-derive"; - version = "0.14.3"; + version = "0.14.4"; edition = "2021"; - sha256 = "02zvva6kb0pfvlyc4nac6gd37ncjrs8jq5scxcq4nbqkc8wh5ii7"; + sha256 = "1pqa77d7da5pf6ba3kjj7510m5cynz6902ax01ckvr0pfrgv4w5m"; procMacro = true; libName = "prost_derive"; authors = [ @@ -7308,9 +7258,9 @@ rec { }; "prost-types" = rec { crateName = "prost-types"; - version = "0.14.3"; + version = "0.14.4"; edition = "2021"; - sha256 = "1mrxrciryfgi6a0vmrgyj3g27r9hdhlgwkq71cgv3icbvg5w94c9"; + sha256 = "02ivjvc4cwl5bfgjs3l00hwlrk74z8zlg1xcgx60bww8fvf6fjgr"; libName = "prost_types"; authors = [ "Dan Burkert " @@ -7613,9 +7563,9 @@ rec { }; "regex" = rec { crateName = "regex"; - version = "1.12.3"; + version = "1.12.4"; edition = "2021"; - sha256 = "0xp2q0x7ybmpa5zlgaz00p8zswcirj9h8nry3rxxsdwi9fhm81z1"; + sha256 = "1fm6si2xpmhwqflabdqsakc0qkq718wx2ljl37nbj75fb5vjnagi"; authors = [ "The Rust Project Developers" "Andrew Gallant " @@ -7732,9 +7682,9 @@ rec { }; "regex-syntax" = rec { crateName = "regex-syntax"; - version = "0.8.10"; + version = "0.8.11"; edition = "2021"; - sha256 = "02jx311ka0daxxc7v45ikzhcl3iydjbbb0mdrpc1xgg8v7c7v2fw"; + sha256 = "1m25h5q2wp976fb9gc3dsc9l99svcvd5cri8lncb51c46ydgzxnn"; libName = "regex_syntax"; authors = [ "The Rust Project Developers" @@ -8272,9 +8222,9 @@ rec { }; "rustls" = rec { crateName = "rustls"; - version = "0.23.38"; + version = "0.23.40"; edition = "2021"; - sha256 = "089ssmhd79f0kd22brh6lkaadql2p3pi6579ax1s0kn1n9pldyb9"; + sha256 = "12qnv3ag4wrw7aj8jng74kgrilpjm2b1rfcjaac8h691frccv1pg"; dependencies = [ { name = "log"; @@ -8341,9 +8291,9 @@ rec { }; "rustls-native-certs" = rec { crateName = "rustls-native-certs"; - version = "0.8.3"; + version = "0.8.4"; edition = "2021"; - sha256 = "0qrajg2n90bcr3bcq6j95gjm7a9lirfkkdmjj32419dyyzan0931"; + sha256 = "0kgazl8zc1sv63qg179bz96ilzh56lzfa5k92ji7d265f4kibdfs"; libName = "rustls_native_certs"; dependencies = [ { @@ -8372,9 +8322,9 @@ rec { }; "rustls-pki-types" = rec { crateName = "rustls-pki-types"; - version = "1.14.0"; + version = "1.14.1"; edition = "2021"; - sha256 = "1p9zsgslvwzzkzhm6bqicffqndr4jpx67992b0vl0pi21a5hy15y"; + sha256 = "1a9pr54y0f3qr97bxpd3ahjldq0gqdld0h799xbnwdzbwxx1k9rh"; libName = "rustls_pki_types"; dependencies = [ { @@ -8910,9 +8860,9 @@ rec { }; "serde_json" = rec { crateName = "serde_json"; - version = "1.0.149"; + version = "1.0.150"; edition = "2021"; - sha256 = "11jdx4vilzrjjd1dpgy67x5lgzr0laplz30dhv75lnf5ffa07z43"; + sha256 = "1ffgfhy9kndjnrz8lmy95pr758p2zk8dxv6yi99x0vkkni24w0g8"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -9153,9 +9103,9 @@ rec { }; "shlex" = rec { crateName = "shlex"; - version = "1.3.0"; - edition = "2015"; - sha256 = "0r1y6bv26c1scpxvhg2cabimrmwgbp4p3wy6syj9n0c4s3q2znhg"; + version = "2.0.1"; + edition = "2018"; + sha256 = "1fjsll1cd7d2bcpdij9kd6w62rpbc7qqzvydvs021vsmr1cxvypq"; authors = [ "comex " "Fenhl " @@ -9458,9 +9408,9 @@ rec { }; "socket2" = rec { crateName = "socket2"; - version = "0.6.3"; + version = "0.6.4"; edition = "2021"; - sha256 = "0gkjjcyn69hqhhlh5kl8byk5m0d7hyrp2aqwzbs3d33q208nwxis"; + sha256 = "0ldyp5rhba15spwxj1n94xh7sjks1398c3vwpwkxkd1087nwzlaj"; authors = [ "Alex Crichton " "Thomas de Zeeuw " @@ -9559,8 +9509,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; - sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; + rev = "451088f77acee6c3d296754698260256c250ecb2"; + sha256 = "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b"; }; libName = "stackable_certs"; authors = [ @@ -9662,8 +9612,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; - sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; + rev = "451088f77acee6c3d296754698260256c250ecb2"; + sha256 = "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b"; }; libName = "stackable_operator"; authors = [ @@ -9856,8 +9806,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; - sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; + rev = "451088f77acee6c3d296754698260256c250ecb2"; + sha256 = "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -9891,8 +9841,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; - sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; + rev = "451088f77acee6c3d296754698260256c250ecb2"; + sha256 = "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b"; }; libName = "stackable_shared"; authors = [ @@ -10074,8 +10024,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; - sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; + rev = "451088f77acee6c3d296754698260256c250ecb2"; + sha256 = "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b"; }; libName = "stackable_telemetry"; authors = [ @@ -10184,8 +10134,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; - sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; + rev = "451088f77acee6c3d296754698260256c250ecb2"; + sha256 = "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b"; }; libName = "stackable_versioned"; authors = [ @@ -10234,8 +10184,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; - sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; + rev = "451088f77acee6c3d296754698260256c250ecb2"; + sha256 = "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -10302,8 +10252,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "46cd3f93a788d44d177a8794fde91fbefa3156d7"; - sha256 = "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk"; + rev = "451088f77acee6c3d296754698260256c250ecb2"; + sha256 = "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b"; }; libName = "stackable_webhook"; authors = [ @@ -10947,9 +10897,9 @@ rec { }; "tokio" = rec { crateName = "tokio"; - version = "1.52.1"; + version = "1.52.3"; edition = "2021"; - sha256 = "1imw1dkkv38p66i33m5hsyk3d6prsbyrayjvqhndjvz89ybywzdn"; + sha256 = "1zpzazypkg61sw91na1m85x5s4rsjym335fwwhwm1hcs70dz1iwg"; authors = [ "Tokio Contributors " ]; @@ -11259,9 +11209,9 @@ rec { }; "toml_edit" = rec { crateName = "toml_edit"; - version = "0.25.11+spec-1.1.0"; + version = "0.25.12+spec-1.1.0"; edition = "2024"; - sha256 = "0awzffbkx33v9x4h19b5mfrwp3sn4ifr16y58sbk6j6l5v9c8n8b"; + sha256 = "1mx5paq837rjw7w51zprrjynk1vaig9yzxfqz9ac79jmd7f3w5fj"; dependencies = [ { name = "indexmap"; @@ -11314,9 +11264,9 @@ rec { }; "tonic" = rec { crateName = "tonic"; - version = "0.14.5"; - edition = "2021"; - sha256 = "1v4k7aa28m7722gz9qak2jiy7lis1ycm4fdmq63iip4m0qdcdizy"; + version = "0.14.6"; + edition = "2024"; + sha256 = "1vs5ci6z6b9xhfsnx4s8qx6bqi1zzcrxncjp71147a0gqwc5aamc"; authors = [ "Lucio Franco " ]; @@ -11443,9 +11393,9 @@ rec { }; "tonic-prost" = rec { crateName = "tonic-prost"; - version = "0.14.5"; - edition = "2021"; - sha256 = "02fkg2bv87q0yds2wz3w0s7i1x6qcgbrl00dy6ipajdapfh7clx5"; + version = "0.14.6"; + edition = "2024"; + sha256 = "184y40nf0iyzc5rg32ivgd88snv68sqy1kchynn55r1vhml9z12h"; libName = "tonic_prost"; authors = [ "Lucio Franco " @@ -11469,9 +11419,9 @@ rec { }; "tonic-types" = rec { crateName = "tonic-types"; - version = "0.14.5"; - edition = "2021"; - sha256 = "16bk1cxi2m0xgaabf98nnj7dn9j16ymkh27jq4s3shjm4a85m1ra"; + version = "0.14.6"; + edition = "2024"; + sha256 = "1s286gg71pjajny8xar0azq1w9lgz1ks3jm3pccxb0qz0q11pavk"; libName = "tonic_types"; authors = [ "Lucio Franco " @@ -11614,9 +11564,9 @@ rec { }; "tower-http" = rec { crateName = "tower-http"; - version = "0.6.8"; + version = "0.6.11"; edition = "2018"; - sha256 = "1y514jwzbyrmrkbaajpwmss4rg0mak82k16d6588w9ncaffmbrnl"; + sha256 = "0h08wjgs3hwnq11iwwzlmnabn1h4cl0fzd48svaccvqffkiggz2c"; libName = "tower_http"; authors = [ "Tower Maintainers " @@ -11650,11 +11600,6 @@ rec { packageId = "http-body"; optional = true; } - { - name = "iri-string"; - packageId = "iri-string"; - optional = true; - } { name = "mime"; packageId = "mime"; @@ -11684,6 +11629,11 @@ rec { optional = true; usesDefaultFeatures = false; } + { + name = "url"; + packageId = "url"; + optional = true; + } ]; devDependencies = [ { @@ -11705,35 +11655,33 @@ rec { } ]; features = { - "async-compression" = [ "dep:async-compression" ]; "auth" = [ "base64" "validate-request" ]; "base64" = [ "dep:base64" ]; "catch-panic" = [ "tracing" "futures-util/std" "dep:http-body" "dep:http-body-util" ]; - "compression-br" = [ "async-compression/brotli" "futures-core" "dep:http-body" "tokio-util" "tokio" ]; - "compression-deflate" = [ "async-compression/zlib" "futures-core" "dep:http-body" "tokio-util" "tokio" ]; + "compression-br" = [ "dep:async-compression" "async-compression?/brotli" "futures-core" "dep:http-body" "tokio-util" "dep:tokio" ]; + "compression-deflate" = [ "dep:async-compression" "async-compression?/zlib" "futures-core" "dep:http-body" "tokio-util" "dep:tokio" ]; "compression-full" = [ "compression-br" "compression-deflate" "compression-gzip" "compression-zstd" ]; - "compression-gzip" = [ "async-compression/gzip" "futures-core" "dep:http-body" "tokio-util" "tokio" ]; - "compression-zstd" = [ "async-compression/zstd" "futures-core" "dep:http-body" "tokio-util" "tokio" ]; - "decompression-br" = [ "async-compression/brotli" "futures-core" "dep:http-body" "dep:http-body-util" "tokio-util" "tokio" ]; - "decompression-deflate" = [ "async-compression/zlib" "futures-core" "dep:http-body" "dep:http-body-util" "tokio-util" "tokio" ]; + "compression-gzip" = [ "dep:async-compression" "async-compression?/gzip" "futures-core" "dep:http-body" "tokio-util" "dep:tokio" ]; + "compression-zstd" = [ "dep:async-compression" "async-compression?/zstd" "futures-core" "dep:http-body" "tokio-util" "dep:tokio" ]; + "decompression-br" = [ "dep:async-compression" "async-compression?/brotli" "futures-core" "dep:http-body" "dep:http-body-util" "tokio-util" "dep:tokio" ]; + "decompression-deflate" = [ "dep:async-compression" "async-compression?/zlib" "futures-core" "dep:http-body" "dep:http-body-util" "tokio-util" "dep:tokio" ]; "decompression-full" = [ "decompression-br" "decompression-deflate" "decompression-gzip" "decompression-zstd" ]; - "decompression-gzip" = [ "async-compression/gzip" "futures-core" "dep:http-body" "dep:http-body-util" "tokio-util" "tokio" ]; - "decompression-zstd" = [ "async-compression/zstd" "futures-core" "dep:http-body" "dep:http-body-util" "tokio-util" "tokio" ]; - "follow-redirect" = [ "futures-util" "dep:http-body" "iri-string" "tower/util" ]; - "fs" = [ "futures-core" "futures-util" "dep:http-body" "dep:http-body-util" "tokio/fs" "tokio-util/io" "tokio/io-util" "dep:http-range-header" "mime_guess" "mime" "percent-encoding" "httpdate" "set-status" "futures-util/alloc" "tracing" ]; - "full" = [ "add-extension" "auth" "catch-panic" "compression-full" "cors" "decompression-full" "follow-redirect" "fs" "limit" "map-request-body" "map-response-body" "metrics" "normalize-path" "propagate-header" "redirect" "request-id" "sensitive-headers" "set-header" "set-status" "timeout" "trace" "util" "validate-request" ]; + "decompression-gzip" = [ "dep:async-compression" "async-compression?/gzip" "futures-core" "dep:http-body" "dep:http-body-util" "tokio-util" "dep:tokio" ]; + "decompression-zstd" = [ "dep:async-compression" "async-compression?/zstd" "futures-core" "dep:http-body" "dep:http-body-util" "tokio-util" "dep:tokio" ]; + "follow-redirect" = [ "futures-util" "dep:http-body" "dep:url" "tower/util" ]; + "fs" = [ "dep:tokio" "tokio?/fs" "tokio?/io-util" "futures-core" "futures-util" "dep:http-body" "dep:http-body-util" "tokio-util/io" "dep:http-range-header" "mime_guess" "mime" "percent-encoding" "httpdate" "set-status" "futures-util/alloc" ]; + "full" = [ "add-extension" "auth" "catch-panic" "compression-full" "cors" "decompression-full" "follow-redirect" "fs" "limit" "map-request-body" "map-response-body" "metrics" "normalize-path" "on-early-drop" "propagate-header" "redirect" "request-id" "sensitive-headers" "set-header" "set-status" "timeout" "trace" "util" "validate-request" ]; "futures-core" = [ "dep:futures-core" ]; "futures-util" = [ "dep:futures-util" ]; "httpdate" = [ "dep:httpdate" ]; - "iri-string" = [ "dep:iri-string" ]; "limit" = [ "dep:http-body" "dep:http-body-util" ]; - "metrics" = [ "dep:http-body" "tokio/time" ]; + "metrics" = [ "dep:http-body" "dep:tokio" "tokio?/time" ]; "mime" = [ "dep:mime" ]; "mime_guess" = [ "dep:mime_guess" ]; + "on-early-drop" = [ "dep:http-body" ]; "percent-encoding" = [ "dep:percent-encoding" ]; "request-id" = [ "uuid" ]; - "timeout" = [ "dep:http-body" "tokio/time" ]; - "tokio" = [ "dep:tokio" ]; + "timeout" = [ "dep:http-body" "dep:tokio" "tokio?/time" ]; "tokio-util" = [ "dep:tokio-util" ]; "tower" = [ "dep:tower" ]; "trace" = [ "dep:http-body" "tracing" ]; @@ -11742,7 +11690,7 @@ rec { "uuid" = [ "dep:uuid" ]; "validate-request" = [ "mime" ]; }; - resolvedDefaultFeatures = [ "auth" "base64" "default" "follow-redirect" "futures-util" "iri-string" "map-response-body" "mime" "tower" "trace" "tracing" "util" "validate-request" ]; + resolvedDefaultFeatures = [ "auth" "base64" "default" "follow-redirect" "futures-util" "map-response-body" "mime" "tower" "trace" "tracing" "util" "validate-request" ]; }; "tower-layer" = rec { crateName = "tower-layer"; @@ -12186,13 +12134,9 @@ rec { }; "typenum" = rec { crateName = "typenum"; - version = "1.20.0"; + version = "1.20.1"; edition = "2018"; - sha256 = "1pj35y6q11d3y55gdl6g1h2dfhmybjming0jdi9bh0bpnqm11kj0"; - authors = [ - "Paho Lurie-Gregg " - "Andre Bogus " - ]; + sha256 = "086s9ly0906kw5yw41249fba97w5zfxf03pyfwdkffvcprqfixdn"; features = { "scale-info" = [ "dep:scale-info" ]; "scale_info" = [ "scale-info/derive" ]; @@ -12225,9 +12169,9 @@ rec { }; "unicode-segmentation" = rec { crateName = "unicode-segmentation"; - version = "1.13.2"; + version = "1.13.3"; edition = "2018"; - sha256 = "135a26m4a0wj319gcw28j6a5aqvz00jmgwgmcs6szgxjf942facn"; + sha256 = "1a47zaq83p386r3baq4m018xd5q4q0grdg56i1x042dzn71x7xf6"; libName = "unicode_segmentation"; authors = [ "kwantam " @@ -12355,9 +12299,9 @@ rec { }; "uuid" = rec { crateName = "uuid"; - version = "1.23.2"; + version = "1.23.3"; edition = "2021"; - sha256 = "1xy942s4z0bi8p3441wvd4ry3hx6ry1c7s6fgrr38462xqybhn6j"; + sha256 = "1drddl03gi12vl1s3l2h371dw39plhn9wappp00v707g7h96nk8l"; authors = [ "Ashley Mannix" "Dylan DPC" @@ -12500,9 +12444,9 @@ rec { }; "wasm-bindgen" = rec { crateName = "wasm-bindgen"; - version = "0.2.118"; + version = "0.2.123"; edition = "2021"; - sha256 = "129s5r14fx4v4xrzpx2c6l860nkxpl48j50y7kl6j16bpah3iy8b"; + sha256 = "0qqmx07r597gm8lbz8qngvv0phwvpzzyfh3nl84nz9qr1jqs8m52"; libName = "wasm_bindgen"; authors = [ "The wasm-bindgen Developers" @@ -12551,9 +12495,9 @@ rec { }; "wasm-bindgen-futures" = rec { crateName = "wasm-bindgen-futures"; - version = "0.4.68"; + version = "0.4.73"; edition = "2021"; - sha256 = "1y7bq5d9fk7s9xaayx38bgs9ns35na0kpb5zw19944zvya1x6wgk"; + sha256 = "1bva12h8gdpqkp753czlxabs0s21lvgzm41brr4lhpdzz818fmjl"; libName = "wasm_bindgen_futures"; authors = [ "The wasm-bindgen Developers" @@ -12563,7 +12507,6 @@ rec { name = "js-sys"; packageId = "js-sys"; usesDefaultFeatures = false; - features = [ "futures" ]; } { name = "wasm-bindgen"; @@ -12580,9 +12523,9 @@ rec { }; "wasm-bindgen-macro" = rec { crateName = "wasm-bindgen-macro"; - version = "0.2.118"; + version = "0.2.123"; edition = "2021"; - sha256 = "1v98r8vs17cj8918qsg0xx4nlg4nxk1g0jd4nwnyrh1687w29zzf"; + sha256 = "1p50xdwmv543b52bc49vm5lcsgd9adpx647bdisg7ihfbg3hz914"; procMacro = true; libName = "wasm_bindgen_macro"; authors = [ @@ -12604,9 +12547,9 @@ rec { }; "wasm-bindgen-macro-support" = rec { crateName = "wasm-bindgen-macro-support"; - version = "0.2.118"; + version = "0.2.123"; edition = "2021"; - sha256 = "0169jr0q469hfx5zqxfyywf2h2f4aj17vn4zly02nfwqmxghc24x"; + sha256 = "0nwqyc63byl7rp9nnv45av8h85fncfmxywkvy35d9qwwkfyk93wh"; libName = "wasm_bindgen_macro_support"; authors = [ "The wasm-bindgen Developers" @@ -12640,10 +12583,10 @@ rec { }; "wasm-bindgen-shared" = rec { crateName = "wasm-bindgen-shared"; - version = "0.2.118"; + version = "0.2.123"; edition = "2021"; links = "wasm_bindgen"; - sha256 = "0ag1vvdzi4334jlzilsy14y3nyzwddf1ndn62fyhf6bg62g4vl2z"; + sha256 = "14lvjm3pzywm5c4962i6s5zmngic1knpggshnnxr9c97dihzgjvs"; libName = "wasm_bindgen_shared"; authors = [ "The wasm-bindgen Developers" @@ -12658,9 +12601,9 @@ rec { }; "web-sys" = rec { crateName = "web-sys"; - version = "0.3.95"; + version = "0.3.100"; edition = "2021"; - sha256 = "0zfr2jy5bpkkggl88i43yy37p538hg20i56kwn421yj9g6qznbag"; + sha256 = "0sffbkrpgyi1402mv4wzp9av6ky6rnb1d2m2dpf87wi7yfn7223f"; libName = "web_sys"; authors = [ "The wasm-bindgen Developers" @@ -12744,6 +12687,7 @@ rec { "CssStyleSheet" = [ "StyleSheet" ]; "CssSupportsRule" = [ "CssConditionRule" "CssGroupingRule" "CssRule" ]; "CssTransition" = [ "Animation" "EventTarget" ]; + "CssViewTransitionRule" = [ "CssRule" ]; "CustomEvent" = [ "Event" ]; "DedicatedWorkerGlobalScope" = [ "EventTarget" "WorkerGlobalScope" ]; "DelayNode" = [ "AudioNode" "EventTarget" ]; @@ -13820,7 +13764,7 @@ rec { "Win32_Web" = [ "Win32" ]; "Win32_Web_InternetExplorer" = [ "Win32_Web" ]; }; - resolvedDefaultFeatures = [ "Wdk" "Wdk_Foundation" "Wdk_Storage" "Wdk_Storage_FileSystem" "Wdk_System" "Wdk_System_IO" "Win32" "Win32_Foundation" "Win32_Networking" "Win32_Networking_WinSock" "Win32_Security" "Win32_Security_Authentication" "Win32_Security_Authentication_Identity" "Win32_Security_Credentials" "Win32_Security_Cryptography" "Win32_Storage" "Win32_Storage_FileSystem" "Win32_System" "Win32_System_Console" "Win32_System_Diagnostics" "Win32_System_Diagnostics_Debug" "Win32_System_IO" "Win32_System_LibraryLoader" "Win32_System_Memory" "Win32_System_Pipes" "Win32_System_SystemInformation" "Win32_System_SystemServices" "Win32_System_Threading" "Win32_System_Time" "Win32_System_WindowsProgramming" "default" ]; + resolvedDefaultFeatures = [ "Wdk" "Wdk_Foundation" "Wdk_Storage" "Wdk_Storage_FileSystem" "Wdk_System" "Wdk_System_IO" "Win32" "Win32_Foundation" "Win32_Networking" "Win32_Networking_WinSock" "Win32_Security" "Win32_Security_Authentication" "Win32_Security_Authentication_Identity" "Win32_Security_Credentials" "Win32_Security_Cryptography" "Win32_Storage" "Win32_Storage_FileSystem" "Win32_System" "Win32_System_Console" "Win32_System_Diagnostics" "Win32_System_Diagnostics_Debug" "Win32_System_IO" "Win32_System_LibraryLoader" "Win32_System_Memory" "Win32_System_Pipes" "Win32_System_SystemInformation" "Win32_System_SystemServices" "Win32_System_Threading" "Win32_System_WindowsProgramming" "default" ]; }; "windows-targets" = rec { crateName = "windows-targets"; @@ -13957,9 +13901,9 @@ rec { }; "winnow" = rec { crateName = "winnow"; - version = "1.0.2"; + version = "1.0.3"; edition = "2021"; - sha256 = "1l7xnfvlgy4da6gq5ip2bgcm8i9d0rwzaxg1p88nlw8lxy5p1q9f"; + sha256 = "1wajycd3krn6h699vydjv7hm0ll5l31p899qzpk59y2is74y34h5"; dependencies = [ { name = "memchr"; @@ -14082,9 +14026,9 @@ rec { }; "yoke" = rec { crateName = "yoke"; - version = "0.8.2"; + version = "0.8.3"; edition = "2021"; - sha256 = "1jprcs7a98a5whvfs6r3jvfh1nnfp6zyijl7y4ywmn88lzywbs5b"; + sha256 = "1xgyj6c2lxj2bp891ynmhws87c6z7yyv2li1v0ss9di40hxf57vh"; authors = [ "Manish Goregaokar " ]; @@ -14148,9 +14092,9 @@ rec { }; "zerocopy" = rec { crateName = "zerocopy"; - version = "0.8.48"; + version = "0.8.52"; edition = "2021"; - sha256 = "1sb8plax8jbrsng1jdval7bdhk7hhrx40dz3hwh074k6knzkgm7f"; + sha256 = "0gv563swc1yn3k8w3wjj07a8q293rkx99nfp3a25vzzmbycj446f"; authors = [ "Joshua Liebow-Feeser " "Jack Wrenn " @@ -14184,9 +14128,9 @@ rec { }; "zerocopy-derive" = rec { crateName = "zerocopy-derive"; - version = "0.8.48"; + version = "0.8.52"; edition = "2021"; - sha256 = "1m5s0g92cxggqc74j83k1priz24k3z93sj5gadppd20p9c4cvqvh"; + sha256 = "0c3rhsh4sd9kdym4z55zprybjkydy9y2gvw75d72aapcfa5z7rqs"; procMacro = true; libName = "zerocopy_derive"; authors = [ @@ -14219,11 +14163,11 @@ rec { }; "zerofrom" = rec { crateName = "zerofrom"; - version = "0.1.7"; + version = "0.1.8"; edition = "2021"; - sha256 = "1py40in4rirc9q8w36q67pld0zk8ssg024xhh0cncxgal7ra3yk9"; + sha256 = "0wjjdj7gdmd0iq91gzkxl7dlv0nhkk80l4bmdpzh3a1yh48mmh0f"; authors = [ - "Manish Goregaokar " + "The ICU4X Project Developers" ]; dependencies = [ { diff --git a/crate-hashes.json b/crate-hashes.json index 5b0037c5..c9a6e6a9 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,12 +1,12 @@ { - "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#k8s-version@0.1.3": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-certs@0.4.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-operator-derive@0.3.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-operator@0.111.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-shared@0.1.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-telemetry@0.6.4": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-versioned-macros@0.10.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-versioned@0.10.0": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", - "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-webhook@0.9.1": "0lj969rjbxairjglrnaq0xhabvdrq5nd6wl1i0y9pr50nhh7zvgk", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#k8s-version@0.1.3": "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-certs@0.4.0": "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-operator-derive@0.3.1": "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-operator@0.111.1": "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-shared@0.1.1": "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-telemetry@0.6.4": "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-versioned-macros@0.10.0": "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-versioned@0.10.0": "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b", + "git+https://github.com/stackabletech//operator-rs.git?branch=smooth-operator#stackable-webhook@0.9.1": "1ifdpn0jvrf3xbgqldqxrq9ig1dc34d4fip7qxn38526k8004p4b", "git+https://github.com/stackabletech/product-config.git?tag=0.8.0#product-config@0.8.0": "1dz70kapm2wdqcr7ndyjji0lhsl98bsq95gnb2lw487wf6yr7987" } \ No newline at end of file diff --git a/rust/operator-binary/src/controller/validate.rs b/rust/operator-binary/src/controller/validate.rs index 9c15207d..9462b0c7 100644 --- a/rust/operator-binary/src/controller/validate.rs +++ b/rust/operator-binary/src/controller/validate.rs @@ -119,10 +119,10 @@ pub fn validate_cluster( } // DESIGN DECISION: `with_validated_config` (operator-rs) performs the config-fragment -// merge+validate and the role<-role-group `Merge` of config/env overrides (a role-group -// `null` inherits the role-level value). This function layers superset's product-specific -// values on top to produce the COMPLETE superset_config.py map (operator recommended values -// + config-derived values + the merged user overrides), which the statefulset reads back. +// merge+validate and the role<-role-group `Merge` of config/env overrides (role-group wins +// on conflicting keys). This function layers superset's product-specific values on top to +// produce the COMPLETE superset_config.py map (operator recommended values + config-derived +// values + the merged user overrides), which the statefulset reads back. fn collect_role_group_config( superset: &SupersetCluster, role: &SupersetRole, @@ -163,17 +163,16 @@ fn collect_role_group_config( ); } - // Step 3: User configOverrides — already merged role<-role-group with `Merge` semantics by - // `with_validated_config`. `None` values are dropped on render (a key that is `null` at all - // levels is omitted; a role-group `null` over a role value inherits the role value). + // Step 3: User configOverrides — plain string key/values, already merged role<-role-group + // (role-group wins) by `with_validated_config`. operator-rs #1219 removed the nullable + // `Option` values, so there is no `null`/unset concept anymore. config_file_properties.extend( validated_rg .config .config_overrides .superset_config_py .overrides - .iter() - .filter_map(|(k, v)| v.clone().map(|v| (k.clone(), v))), + .clone(), ); // --- env_overrides --- @@ -286,8 +285,11 @@ mod tests { ); } + /// A `null` configOverrides value is rejected by the CRD. Values are typed as `String` + /// (operator-rs `KeyValueConfigOverrides`; the `Option` was removed in op-rs #1219), + /// so `null` can no longer express "unset"/"inherit". #[test] - fn config_overrides_null_inherits_role_value() { + fn config_overrides_null_value_is_rejected() { let input = r#" apiVersion: superset.stackable.tech/v1alpha1 kind: SupersetCluster @@ -306,30 +308,15 @@ mod tests { nodes: configOverrides: superset_config.py: - KEY: role + KEY: null roleGroups: default: replicas: 1 - configOverrides: - superset_config.py: - KEY: null "#; - let superset: v1alpha1::SupersetCluster = - yaml_from_str_singleton_map(input).expect("illegal test input"); - - let dereferenced = default_dereferenced(); - - let validated = validate_cluster(&superset, dereferenced, "test-repo").expect("validated"); - let node = validated - .role_groups - .get(&SupersetRole::Node) - .and_then(|groups| groups.get("default")) - .expect("node default rolegroup"); - - // Merge semantics: a role-group `null` inherits the role-level value (not delete). - assert_eq!( - node.config_file_properties.get("KEY"), - Some(&"role".to_string()) + let result: Result = yaml_from_str_singleton_map(input); + assert!( + result.is_err(), + "a `null` configOverrides value must be rejected: values are typed as String" ); } } diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 5278e6d4..72d94f22 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -196,7 +196,7 @@ pub mod versioned { #[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, Merge, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct SupersetConfigOverrides { - // Uses the v2 KeyValueConfigOverrides (Merge-capable, nullable values) to match + // Uses the v2 KeyValueConfigOverrides (Merge-capable, plain string values) to match // trino/hdfs/airflow/kafka. Resolution happens in controller/validate.rs. #[serde(default, rename = "superset_config.py")] pub superset_config_py: KeyValueConfigOverrides, From 53f735f858a77c2d392634777ebfabaaff7b298f Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 10 Jun 2026 15:03:48 +0200 Subject: [PATCH 15/16] regenerate charts --- extra/crds.yaml | 42 ++++++------------------------------------ 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/extra/crds.yaml b/extra/crds.yaml index 68af85a8..f250f312 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -335,14 +335,9 @@ spec: properties: superset_config.py: additionalProperties: - nullable: true type: string default: {} - description: |- - Flat key-value overrides for `*.properties`, Hadoop XML, etc. - - This is backwards-compatible with the existing flat key-value YAML format - used by `HashMap`. + description: Flat key-value overrides for `*.properties`, Hadoop XML, etc. type: object type: object envOverrides: @@ -713,14 +708,9 @@ spec: properties: superset_config.py: additionalProperties: - nullable: true type: string default: {} - description: |- - Flat key-value overrides for `*.properties`, Hadoop XML, etc. - - This is backwards-compatible with the existing flat key-value YAML format - used by `HashMap`. + description: Flat key-value overrides for `*.properties`, Hadoop XML, etc. type: object type: object envOverrides: @@ -1472,14 +1462,9 @@ spec: properties: superset_config.py: additionalProperties: - nullable: true type: string default: {} - description: |- - Flat key-value overrides for `*.properties`, Hadoop XML, etc. - - This is backwards-compatible with the existing flat key-value YAML format - used by `HashMap`. + description: Flat key-value overrides for `*.properties`, Hadoop XML, etc. type: object type: object envOverrides: @@ -1850,14 +1835,9 @@ spec: properties: superset_config.py: additionalProperties: - nullable: true type: string default: {} - description: |- - Flat key-value overrides for `*.properties`, Hadoop XML, etc. - - This is backwards-compatible with the existing flat key-value YAML format - used by `HashMap`. + description: Flat key-value overrides for `*.properties`, Hadoop XML, etc. type: object type: object envOverrides: @@ -2217,14 +2197,9 @@ spec: properties: superset_config.py: additionalProperties: - nullable: true type: string default: {} - description: |- - Flat key-value overrides for `*.properties`, Hadoop XML, etc. - - This is backwards-compatible with the existing flat key-value YAML format - used by `HashMap`. + description: Flat key-value overrides for `*.properties`, Hadoop XML, etc. type: object type: object envOverrides: @@ -2595,14 +2570,9 @@ spec: properties: superset_config.py: additionalProperties: - nullable: true type: string default: {} - description: |- - Flat key-value overrides for `*.properties`, Hadoop XML, etc. - - This is backwards-compatible with the existing flat key-value YAML format - used by `HashMap`. + description: Flat key-value overrides for `*.properties`, Hadoop XML, etc. type: object type: object envOverrides: From 7e8796eb0bfe8f4f280448429b3dfff123ed7a06 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 10 Jun 2026 16:11:33 +0200 Subject: [PATCH 16/16] fix test assert --- tests/templates/kuttl/smoke/34-assert.yaml.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/templates/kuttl/smoke/34-assert.yaml.j2 b/tests/templates/kuttl/smoke/34-assert.yaml.j2 index abc822dc..862bb35f 100644 --- a/tests/templates/kuttl/smoke/34-assert.yaml.j2 +++ b/tests/templates/kuttl/smoke/34-assert.yaml.j2 @@ -87,6 +87,7 @@ commands: LOGGING_CONFIGURATOR = StackableLoggingConfigurator() MAPBOX_API_KEY = os.environ.get('MAPBOX_API_KEY', '') RECAPTCHA_PUBLIC_KEY = '' + ROW_LIMIT = 50000 SECRET_KEY = os.environ.get('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.path.expandvars('postgresql+psycopg2://${METADATA_DATABASE_USERNAME}:${METADATA_DATABASE_PASSWORD}@superset-postgresql:5432/superset') STATS_LOGGER = StatsdStatsLogger(host='0.0.0.0', port=9125)