Skip to content

Commit 4df72c2

Browse files
adwk67maltesander
andauthored
chore/bump-operator-rs-0.67-and-deps (#495)
* bumped dependencies and refactored * reorganized imports * regenerate charts * finish up bump to 0.67.1 * adress review comments --------- Co-authored-by: Malte Sander <[email protected]> Co-authored-by: Malte Sander <[email protected]>
1 parent 1ba0f08 commit 4df72c2

File tree

17 files changed

+2081
-1543
lines changed

17 files changed

+2081
-1543
lines changed

Cargo.lock

Lines changed: 491 additions & 459 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 1090 additions & 863 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ repository = "https://github.com/stackabletech/superset-operator"
1111

1212
[workspace.dependencies]
1313
anyhow = "1.0"
14-
built = { version = "0.6", features = ["chrono", "git2"] }
15-
clap = "4.3"
14+
built = { version = "0.7", features = ["chrono", "git2"] }
15+
clap = "4.5"
1616
fnv = "1.0"
1717
futures = { version = "0.3", features = ["compat"] }
1818
indoc = "2.0"
1919
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.6.0" }
2020
serde = { version = "1.0", features = ["derive"] }
2121
serde_json = "1.0"
2222
serde_yaml = "0.9"
23-
snafu = "0.7"
24-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.64.0" }
25-
strum = { version = "0.25", features = ["derive"] }
26-
tokio = { version = "1.29", features = ["full"] }
23+
snafu = "0.8"
24+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.67.1" }
25+
strum = { version = "0.26", features = ["derive"] }
26+
tokio = { version = "1.37", features = ["full"] }
2727
tracing = "0.1"
2828

2929
# [patch."https://github.com/stackabletech/operator-rs.git"]

crate-hashes.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/helm/superset-operator/crds/crds.yaml

Lines changed: 422 additions & 142 deletions
Large diffs are not rendered by default.

rust/crd/src/affinity.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ mod tests {
8181
)
8282
]))
8383
}),
84-
namespace_selector: None,
85-
namespaces: None,
8684
topology_key: "kubernetes.io/hostname".to_string(),
85+
..PodAffinityTerm::default()
8786
},
8887
weight: 70
8988
}

rust/crd/src/authentication.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use stackable_operator::{
99
oidc::{self, IdentityProviderHint},
1010
AuthenticationClass, AuthenticationClassProvider, ClientAuthenticationDetails,
1111
},
12-
error::OperatorResult,
1312
schemars::{self, JsonSchema},
1413
};
1514
use tracing::info;
@@ -29,7 +28,7 @@ pub enum Error {
2928

3029
#[snafu(display("failed to retrieve AuthenticationClass"))]
3130
AuthenticationClassRetrievalFailed {
32-
source: stackable_operator::error::Error,
31+
source: stackable_operator::client::Error,
3332
},
3433

3534
#[snafu(display("only one authentication type at a time is supported by Superset, see https://github.com/dpgaspar/Flask-AppBuilder/issues/1924"))]
@@ -63,7 +62,7 @@ pub enum Error {
6362

6463
#[snafu(display("invalid OIDC configuration"))]
6564
OidcConfigurationInvalid {
66-
source: stackable_operator::error::Error,
65+
source: stackable_operator::commons::authentication::Error,
6766
},
6867

6968
#[snafu(display("the OIDC provider {oidc_provider:?} is not yet supported (AuthenticationClass {auth_class_name:?})"))]
@@ -162,7 +161,7 @@ impl SupersetClientAuthenticationDetailsResolved {
162161
resolve_auth_class: impl Fn(ClientAuthenticationDetails) -> R,
163162
) -> Result<SupersetClientAuthenticationDetailsResolved>
164163
where
165-
R: Future<Output = OperatorResult<AuthenticationClass>>,
164+
R: Future<Output = Result<AuthenticationClass, stackable_operator::client::Error>>,
166165
{
167166
let mut resolved_auth_classes = Vec::new();
168167
let mut user_registration = None;
@@ -770,7 +769,7 @@ mod tests {
770769
invalid OIDC configuration
771770
772771
Caused by this error:
773-
1: OIDC authentication details not specified. The AuthenticationClass "oidc" uses an OIDC provider, you need to specify OIDC authentication details (such as client credentials) as well"#
772+
1: authentication details for OIDC were not specified. The AuthenticationClass "oidc" uses an OIDC provider, you need to specify OIDC authentication details (such as client credentials) as well"#
774773
},
775774
error_message
776775
);
@@ -931,7 +930,9 @@ mod tests {
931930
auth_classes: Vec<AuthenticationClass>,
932931
) -> impl Fn(
933932
ClientAuthenticationDetails,
934-
) -> Pin<Box<dyn Future<Output = OperatorResult<AuthenticationClass>>>> {
933+
) -> Pin<
934+
Box<dyn Future<Output = Result<AuthenticationClass, stackable_operator::client::Error>>>,
935+
> {
935936
move |auth_details: ClientAuthenticationDetails| {
936937
let auth_classes = auth_classes.clone();
937938
Box::pin(async move {
@@ -942,7 +943,7 @@ mod tests {
942943
== Some(auth_details.authentication_class_name())
943944
})
944945
.cloned()
945-
.ok_or_else(|| stackable_operator::error::Error::KubeError {
946+
.ok_or_else(|| stackable_operator::client::Error::ListResources {
946947
source: kube::Error::Api(kube::error::ErrorResponse {
947948
code: 404,
948949
message: "AuthenticationClass not found".into(),

rust/crd/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use stackable_operator::{
1818
k8s_openapi::apimachinery::pkg::api::resource::Quantity,
1919
kube::{runtime::reflector::ObjectRef, CustomResource, ResourceExt},
2020
memory::{BinaryMultiple, MemoryQuantity},
21-
product_config_utils::{ConfigError, Configuration},
21+
product_config_utils::{self, Configuration},
2222
product_logging::{self, spec::Logging},
2323
role_utils::{GenericRoleConfig, Role, RoleGroupRef},
2424
schemars::{self, JsonSchema},
@@ -381,7 +381,7 @@ impl Configuration for SupersetConfigFragment {
381381
&self,
382382
cluster: &Self::Configurable,
383383
_role_name: &str,
384-
) -> Result<BTreeMap<String, Option<String>>, ConfigError> {
384+
) -> Result<BTreeMap<String, Option<String>>, product_config_utils::Error> {
385385
let mut result = BTreeMap::new();
386386
result.insert(
387387
SupersetConfig::CREDENTIALS_SECRET_PROPERTY.to_string(),
@@ -401,7 +401,7 @@ impl Configuration for SupersetConfigFragment {
401401
&self,
402402
_cluster: &Self::Configurable,
403403
_role_name: &str,
404-
) -> Result<BTreeMap<String, Option<String>>, ConfigError> {
404+
) -> Result<BTreeMap<String, Option<String>>, product_config_utils::Error> {
405405
Ok(BTreeMap::new())
406406
}
407407

@@ -410,7 +410,7 @@ impl Configuration for SupersetConfigFragment {
410410
_cluster: &Self::Configurable,
411411
_role_name: &str,
412412
file: &str,
413-
) -> Result<BTreeMap<String, Option<String>>, ConfigError> {
413+
) -> Result<BTreeMap<String, Option<String>>, product_config_utils::Error> {
414414
let mut result = BTreeMap::new();
415415

416416
if file == SUPERSET_CONFIG_FILENAME {

rust/operator-binary/build.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
use std::path::PathBuf;
2-
31
fn main() {
4-
let out_dir = PathBuf::from(std::env::var("OUT_DIR").expect("OUT_DIR is required"));
5-
built::write_built_file_with_opts(
6-
// built's env module depends on a whole bunch of variables that crate2nix doesn't provide
7-
// so we grab the specific env variables that we care about out ourselves instead.
8-
built::Options::default().set_env(false),
9-
"Cargo.toml".as_ref(),
10-
&out_dir.join("built.rs"),
11-
)
12-
.unwrap();
2+
built::write_built_file().unwrap();
133
}

rust/operator-binary/src/controller_commons.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use stackable_operator::{
2-
builder::VolumeBuilder,
2+
builder::pod::volume::VolumeBuilder,
33
k8s_openapi::api::core::v1::{ConfigMapVolumeSource, EmptyDirVolumeSource, Volume},
44
product_logging::{
55
self,

0 commit comments

Comments
 (0)