Skip to content

Commit 1f10eca

Browse files
maltesanderclaude
andcommitted
chore: Apply rustfmt and add CHANGELOG entry for product-config removal
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0bf8d55 commit 1f10eca

6 files changed

Lines changed: 19 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.
1818
This struct is consistent between different CRDs, so that you can easily copy/paste it between stacklets.
1919
Read on the [Hive database documentation](https://docs.stackable.tech/home/nightly/hive/usage-guide/database-driver) for details ([#674]).
2020
- Internal operator refactoring: introduce dereference() and validate() steps in the reconciler ([#707]).
21+
- Remove the direct `product-config` dependency; `hive-site.xml`, `security.properties` and `core-site.xml` are now rendered by typed Rust builders. Switch `stackable-operator` to the `smooth-operator` branch and adopt its shared `v2::` framework ([#XXX]).
2122
- test: Bump vector-aggregator to 0.55.0, replace /graphql call with gRPC call ([#713]).
2223
- Deprecated support for `4.0.1` ([#711]).
2324

rust/operator-binary/src/controller.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,12 +436,11 @@ pub async fn reconcile_hive(
436436
rolegroup: rolegroup.clone(),
437437
})?;
438438

439-
cluster_resources
440-
.add(client, rg_configmap)
441-
.await
442-
.context(ApplyRoleGroupConfigSnafu {
439+
cluster_resources.add(client, rg_configmap).await.context(
440+
ApplyRoleGroupConfigSnafu {
443441
rolegroup: rolegroup.clone(),
444-
})?;
442+
},
443+
)?;
445444

446445
// Note: The StatefulSet needs to be applied after all ConfigMaps and Secrets it
447446
// mounts to prevent unnecessary Pod restarts.

rust/operator-binary/src/controller/build/config_map.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ use stackable_operator::{
1010

1111
use crate::{
1212
controller::{
13-
ValidatedCluster, build_recommended_labels,
13+
ValidatedCluster,
1414
build::properties::{core_site, hive_site, resolved_overrides, security_properties},
15+
build_recommended_labels,
1516
},
1617
crd::{CORE_SITE_XML, HIVE_SITE_XML, HiveRole, JVM_SECURITY_PROPERTIES_FILE, v1alpha1},
1718
framework::writer::{to_hadoop_xml, to_java_properties_string},

rust/operator-binary/src/controller/build/properties/core_site.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ mod tests {
2828
use super::*;
2929

3030
fn hive_cluster(yaml: &str) -> v1alpha1::HiveCluster {
31-
stackable_operator::utils::yaml_from_str_singleton_map(yaml).expect("valid HiveCluster YAML")
31+
stackable_operator::utils::yaml_from_str_singleton_map(yaml)
32+
.expect("valid HiveCluster YAML")
3233
}
3334

3435
const NO_KERBEROS_YAML: &str = r#"

rust/operator-binary/src/controller/build/properties/hive_site.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ use std::collections::BTreeMap;
1111

1212
use snafu::{ResultExt, Snafu};
1313
use stackable_operator::{
14-
crd::s3,
15-
database_connections::drivers::jdbc::JdbcDatabaseConnectionDetails,
16-
k8s_openapi::api::core::v1::EnvVar,
17-
utils::cluster_info::KubernetesClusterInfo,
14+
crd::s3, database_connections::drivers::jdbc::JdbcDatabaseConnectionDetails,
15+
k8s_openapi::api::core::v1::EnvVar, utils::cluster_info::KubernetesClusterInfo,
1816
};
1917

2018
use crate::{
@@ -103,7 +101,11 @@ pub fn build(
103101
if let Some(s3) = s3_connection_spec {
104102
data.insert(
105103
MetaStoreConfig::S3_ENDPOINT.to_string(),
106-
Some(s3.endpoint().context(ConfigureS3ConnectionSnafu)?.to_string()),
104+
Some(
105+
s3.endpoint()
106+
.context(ConfigureS3ConnectionSnafu)?
107+
.to_string(),
108+
),
107109
);
108110
data.insert(
109111
MetaStoreConfig::S3_REGION_NAME.to_string(),
@@ -163,7 +165,8 @@ mod tests {
163165
use super::*;
164166

165167
fn hive_cluster(yaml: &str) -> v1alpha1::HiveCluster {
166-
stackable_operator::utils::yaml_from_str_singleton_map(yaml).expect("valid HiveCluster YAML")
168+
stackable_operator::utils::yaml_from_str_singleton_map(yaml)
169+
.expect("valid HiveCluster YAML")
167170
}
168171

169172
const DERBY_YAML: &str = r#"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use stackable_operator::{
1919
fragment::{self, Fragment, ValidationError},
2020
merge::Merge,
2121
},
22-
v2::config_overrides::KeyValueConfigOverrides,
2322
crd::s3,
2423
deep_merger::ObjectOverrides,
2524
k8s_openapi::apimachinery::pkg::api::resource::Quantity,
@@ -30,6 +29,7 @@ use stackable_operator::{
3029
shared::time::Duration,
3130
status::condition::{ClusterCondition, HasStatusCondition},
3231
utils::cluster_info::KubernetesClusterInfo,
32+
v2::config_overrides::KeyValueConfigOverrides,
3333
versioned::versioned,
3434
};
3535
use strum::{Display, EnumIter, EnumString, IntoEnumIterator};

0 commit comments

Comments
 (0)