Skip to content

Commit 04c1a1b

Browse files
chore: Update templated files (f1f1a9e) (#705)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@f1f1a9e Reference-to: stackabletech/operator-templating@f1f1a9e (Bump Rust to 1.85.0) * fix: rustfmt lint * ci: use nightly toolchain for cargo udeps * ci: use nightly toolchain for cargo udeps * Revert "ci: use nightly toolchain for cargo udeps" This reverts commit 077bfda. * Revert "ci: use nightly toolchain for cargo udeps" This reverts commit b377419. --------- Co-authored-by: Nick Larsen <nick.larsen@stackable.tech>
1 parent 098a1cd commit 04c1a1b

File tree

16 files changed

+57
-55
lines changed

16 files changed

+57
-55
lines changed

.github/PULL_REQUEST_TEMPLATE/pre-release-rust-deps.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bump Rust Dependencies for Stackable Release XX.(X)X
1+
# Bump Rust Dependencies for Stackable Release YY.M.X
22

33
<!--
44
Make sure to update the link in 'issues/.github/ISSUE_TEMPLATE/pre-release-operator-rust-deps.md'
@@ -32,7 +32,7 @@ Part of <https://github.com/stackabletech/issues/issues/TRACKING_ISSUE>
3232
3333
```[tasklist]
3434
### Bump Rust Dependencies
35-
- [ ] Bump `stackable-operator` and friends.
36-
- [ ] Bump `product-version`.
37-
- [ ] Bump all other dependencies.
35+
- [ ] Bump `stackable-operator` and friends
36+
- [ ] Bump `product-config`
37+
- [ ] Bump all other dependencies
3838
```

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ env:
2626
CARGO_TERM_COLOR: always
2727
CARGO_INCREMENTAL: '0'
2828
CARGO_PROFILE_DEV_DEBUG: '0'
29-
RUST_TOOLCHAIN_VERSION: "1.84.1"
29+
RUST_TOOLCHAIN_VERSION: "1.85.0"
30+
RUST_NIGHTLY_TOOLCHAIN_VERSION: "nightly-2025-01-15"
3031
PYTHON_VERSION: "3.12"
3132
RUSTFLAGS: "-D warnings"
3233
RUSTDOCFLAGS: "-D warnings"
@@ -136,9 +137,11 @@ jobs:
136137
submodules: recursive
137138
- uses: dtolnay/rust-toolchain@c5a29ddb4d9d194e7c84ec8c3fba61b1c31fee8c
138139
with:
139-
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
140+
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN_VERSION }}
140141
components: rustfmt
141-
- run: cargo fmt --all -- --check
142+
- env:
143+
RUST_TOOLCHAIN_VERSION: ${{ env.RUST_NIGHTLY_TOOLCHAIN_VERSION }}
144+
run: cargo "+$RUST_TOOLCHAIN_VERSION" fmt --all -- --check
142145

143146
run_clippy:
144147
name: Run Clippy

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"rust-analyzer.rustfmt.overrideCommand": [
3+
"rustfmt",
4+
"+nightly-2025-01-15",
5+
"--"
6+
],
7+
}

deny.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ ignore = [
2929
#
3030
# TODO: Remove after https://github.com/kube-rs/kube/pull/1652 is merged
3131
"RUSTSEC-2024-0384",
32-
33-
# https://rustsec.org/advisories/RUSTSEC-2025-0012
34-
# "backoff" is unmainted.
35-
#
36-
# Upstream (kube) has switched to backon in 0.99.0, and an upgrade is scheduled on our end. In the meantime,
37-
# this is a very low-severity problem.
38-
#
39-
# TODO: Remove after upgrading to kube 0.99.
40-
"RUSTSEC-2025-0012",
4132
]
4233

4334
[bans]

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# DO NOT EDIT, this file is generated by operator-templating
22
[toolchain]
3-
channel = "1.84.1"
3+
channel = "1.85.0"

rust/bundle-builder/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ use std::{
44
sync::{Arc, Mutex},
55
};
66

7-
use axum::{extract::State, http, response::IntoResponse, routing::get, Router};
7+
use axum::{Router, extract::State, http, response::IntoResponse, routing::get};
88
use clap::Parser;
99
use flate2::write::GzEncoder;
1010
use futures::{
11+
FutureExt, StreamExt, TryFutureExt,
1112
future::{self, BoxFuture},
12-
pin_mut, FutureExt, StreamExt, TryFutureExt,
13+
pin_mut,
1314
};
1415
use snafu::{ResultExt, Snafu};
1516
use stackable_operator::{

rust/operator-binary/src/controller.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ use std::{
66

77
use const_format::concatcp;
88
use indoc::formatdoc;
9-
use product_config::{types::PropertyNameKind, ProductConfigManager};
9+
use product_config::{ProductConfigManager, types::PropertyNameKind};
1010
use serde::{Deserialize, Serialize};
1111
use serde_json::json;
1212
use snafu::{OptionExt, ResultExt, Snafu};
1313
use stackable_opa_operator::crd::{
14-
user_info_fetcher, v1alpha1, APP_NAME, DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT, OPERATOR_NAME,
14+
APP_NAME, DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT, OPERATOR_NAME, user_info_fetcher, v1alpha1,
1515
};
1616
use stackable_operator::{
1717
builder::{
1818
self,
1919
configmap::ConfigMapBuilder,
2020
meta::ObjectMetaBuilder,
2121
pod::{
22+
PodBuilder,
2223
container::{ContainerBuilder, FieldPathEnvVar},
2324
resources::ResourceRequirementsBuilder,
2425
security::PodSecurityContextBuilder,
2526
volume::VolumeBuilder,
26-
PodBuilder,
2727
},
2828
},
2929
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
@@ -34,6 +34,7 @@ use stackable_operator::{
3434
tls_verification::TlsClientDetailsError,
3535
},
3636
k8s_openapi::{
37+
DeepMerge,
3738
api::{
3839
apps::v1::{DaemonSet, DaemonSetSpec},
3940
core::v1::{
@@ -42,12 +43,11 @@ use stackable_operator::{
4243
},
4344
},
4445
apimachinery::pkg::{apis::meta::v1::LabelSelector, util::intstr::IntOrString},
45-
DeepMerge,
4646
},
4747
kube::{
48-
core::{error_boundary, DeserializeGuard},
49-
runtime::{controller::Action, reflector::ObjectRef},
5048
Resource as KubeResource, ResourceExt,
49+
core::{DeserializeGuard, error_boundary},
50+
runtime::{controller::Action, reflector::ObjectRef},
5151
},
5252
kvp::{Label, LabelError, Labels, ObjectLabels},
5353
logging::controller::ReconcilerError,
@@ -56,7 +56,7 @@ use stackable_operator::{
5656
product_logging::{
5757
self,
5858
framework::{
59-
create_vector_shutdown_file_command, remove_vector_shutdown_file_command, LoggingError,
59+
LoggingError, create_vector_shutdown_file_command, remove_vector_shutdown_file_command,
6060
},
6161
spec::{
6262
AppenderConfig, AutomaticContainerLogConfig, ContainerLogConfig,
@@ -77,7 +77,7 @@ use crate::{
7777
discovery::{self, build_discovery_configmaps},
7878
operations::graceful_shutdown::add_graceful_shutdown_config,
7979
product_logging::{
80-
extend_role_group_config_map, resolve_vector_aggregator_address, BundleBuilderLogLevel,
80+
BundleBuilderLogLevel, extend_role_group_config_map, resolve_vector_aggregator_address,
8181
},
8282
};
8383

@@ -787,11 +787,9 @@ fn build_server_rolegroup_daemonset(
787787
"pipefail".to_string(),
788788
"-c".to_string(),
789789
])
790-
.args(vec![build_prepare_start_command(
791-
merged_config,
792-
&prepare_container_name,
793-
)
794-
.join(" && ")])
790+
.args(vec![
791+
build_prepare_start_command(merged_config, &prepare_container_name).join(" && "),
792+
])
795793
.add_volume_mount(BUNDLES_VOLUME_NAME, BUNDLES_DIR)
796794
.context(AddVolumeMountSnafu)?
797795
.add_volume_mount(LOG_VOLUME_NAME, STACKABLE_LOG_DIR)

rust/operator-binary/src/discovery.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ use stackable_operator::{
44
builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder},
55
commons::product_image_selection::ResolvedProductImage,
66
k8s_openapi::api::core::v1::{ConfigMap, Service},
7-
kube::{runtime::reflector::ObjectRef, Resource, ResourceExt},
7+
kube::{Resource, ResourceExt, runtime::reflector::ObjectRef},
88
utils::cluster_info::KubernetesClusterInfo,
99
};
1010

11-
use crate::controller::{build_recommended_labels, APP_PORT};
11+
use crate::controller::{APP_PORT, build_recommended_labels};
1212

1313
#[derive(Snafu, Debug)]
1414
pub enum Error {

rust/operator-binary/src/main.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
use std::sync::Arc;
22

3-
use clap::{crate_description, crate_version, Parser};
3+
use clap::{Parser, crate_description, crate_version};
44
use futures::StreamExt;
55
use product_config::ProductConfigManager;
6-
use stackable_opa_operator::crd::{v1alpha1, OpaCluster, APP_NAME, OPERATOR_NAME};
6+
use stackable_opa_operator::crd::{APP_NAME, OPERATOR_NAME, OpaCluster, v1alpha1};
77
use stackable_operator::{
8+
YamlSchema,
89
cli::{Command, ProductOperatorRun},
910
client::{self, Client},
1011
k8s_openapi::api::{
1112
apps::v1::DaemonSet,
1213
core::v1::{ConfigMap, Service},
1314
},
1415
kube::{
16+
Api,
1517
core::DeserializeGuard,
1618
runtime::{
19+
Controller,
1720
events::{Recorder, Reporter},
18-
watcher, Controller,
21+
watcher,
1922
},
20-
Api,
2123
},
2224
logging::controller::report_controller_reconciled,
2325
namespace::WatchNamespace,
2426
shared::yaml::SerializeOptions,
25-
YamlSchema,
2627
};
2728

2829
use crate::controller::OPA_FULL_CONTROLLER_NAME;
@@ -127,13 +128,10 @@ async fn create_controller(
127128
.owns(configmaps_api, watcher::Config::default())
128129
.owns(services_api, watcher::Config::default());
129130

130-
let event_recorder = Arc::new(Recorder::new(
131-
client.as_kube_client(),
132-
Reporter {
133-
controller: OPA_FULL_CONTROLLER_NAME.to_string(),
134-
instance: None,
135-
},
136-
));
131+
let event_recorder = Arc::new(Recorder::new(client.as_kube_client(), Reporter {
132+
controller: OPA_FULL_CONTROLLER_NAME.to_string(),
133+
instance: None,
134+
}));
137135
controller
138136
.run(
139137
controller::reconcile_opa,

rust/operator-binary/src/operations/graceful_shutdown.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use snafu::{ResultExt, Snafu};
2-
use stackable_opa_operator::crd::{v1alpha1, SERVER_GRACEFUL_SHUTDOWN_SAFETY_OVERHEAD};
2+
use stackable_opa_operator::crd::{SERVER_GRACEFUL_SHUTDOWN_SAFETY_OVERHEAD, v1alpha1};
33
use stackable_operator::builder::pod::PodBuilder;
44

55
#[derive(Debug, Snafu)]

0 commit comments

Comments
 (0)