Skip to content

Commit ec8b415

Browse files
chore: Update templated files (f1f1a9e) (#340)
* 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 97a9b54. * Revert "ci: use nightly toolchain for cargo udeps" This reverts commit 6670ac0. --------- Co-authored-by: Nick Larsen <[email protected]>
1 parent 427f0c2 commit ec8b415

File tree

8 files changed

+44
-35
lines changed

8 files changed

+44
-35
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+
}

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/operator-binary/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
mod restart_controller;
22

33
use built_info::PKG_VERSION;
4-
use clap::{crate_description, crate_version, Parser};
4+
use clap::{Parser, crate_description, crate_version};
55
use futures::pin_mut;
66
use stackable_operator::{
7+
CustomResourceExt,
78
cli::{Command, ProductOperatorRun},
89
commons::{
910
authentication::AuthenticationClass,
1011
s3::{S3Bucket, S3Connection},
1112
},
12-
CustomResourceExt,
1313
};
1414

1515
mod built_info {

rust/operator-binary/src/restart_controller/pod.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ use stackable_operator::{
1313
api::{EvictParams, PartialObjectMeta},
1414
core::DynamicObject,
1515
runtime::{
16+
Controller,
1617
controller::Action,
1718
events::{Recorder, Reporter},
1819
reflector::ObjectRef,
19-
watcher, Controller,
20+
watcher,
2021
},
2122
},
22-
logging::controller::{report_controller_reconciled, ReconcilerError},
23+
logging::controller::{ReconcilerError, report_controller_reconciled},
2324
namespace::WatchNamespace,
2425
};
2526
use strum::{EnumDiscriminants, IntoStaticStr};
@@ -73,13 +74,10 @@ pub async fn start(client: &Client, watch_namespace: &WatchNamespace) {
7374
watch_namespace.get_api::<PartialObjectMeta<Pod>>(client),
7475
watcher::Config::default(),
7576
);
76-
let event_recorder = Arc::new(Recorder::new(
77-
client.as_kube_client(),
78-
Reporter {
79-
controller: FULL_CONTROLLER_NAME.to_string(),
80-
instance: None,
81-
},
82-
));
77+
let event_recorder = Arc::new(Recorder::new(client.as_kube_client(), Reporter {
78+
controller: FULL_CONTROLLER_NAME.to_string(),
79+
instance: None,
80+
}));
8381
controller
8482
.run(
8583
reconcile,

rust/operator-binary/src/restart_controller/statefulset.rs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::{
22
collections::BTreeMap,
3-
sync::{atomic::AtomicBool, Arc},
3+
sync::{Arc, atomic::AtomicBool},
44
time::Duration,
55
};
66

7-
use futures::{stream, Stream, StreamExt, TryStream};
7+
use futures::{Stream, StreamExt, TryStream, stream};
88
use serde_json::json;
99
use snafu::{ResultExt, Snafu};
1010
use stackable_operator::{
@@ -15,19 +15,19 @@ use stackable_operator::{
1515
},
1616
kube,
1717
kube::{
18+
Resource, ResourceExt,
1819
api::{PartialObjectMeta, Patch, PatchParams},
19-
core::{error_boundary, DeserializeGuard, DynamicObject},
20+
core::{DeserializeGuard, DynamicObject, error_boundary},
2021
runtime::{
21-
applier,
22-
controller::{trigger_self, trigger_with, Action, ReconcileRequest},
22+
Config, WatchStreamExt, applier,
23+
controller::{Action, ReconcileRequest, trigger_self, trigger_with},
2324
events::{Recorder, Reporter},
2425
metadata_watcher, reflector,
2526
reflector::{ObjectRef, Store},
26-
watcher, Config, WatchStreamExt,
27+
watcher,
2728
},
28-
Resource, ResourceExt,
2929
},
30-
logging::controller::{report_controller_reconciled, ReconcilerError},
30+
logging::controller::{ReconcilerError, report_controller_reconciled},
3131
namespace::WatchNamespace,
3232
};
3333
use strum::{EnumDiscriminants, IntoStaticStr};
@@ -87,13 +87,10 @@ pub async fn start(client: &Client, watch_namespace: &WatchNamespace) {
8787
let secret_store = reflector::store::Writer::<PartialObjectMeta<Secret>>::new(());
8888
let cms_inited = Arc::new(AtomicBool::from(false));
8989
let secrets_inited = Arc::new(AtomicBool::from(false));
90-
let event_recorder = Arc::new(Recorder::new(
91-
client.as_kube_client(),
92-
Reporter {
93-
controller: FULL_CONTROLLER_NAME.to_string(),
94-
instance: None,
95-
},
96-
));
90+
let event_recorder = Arc::new(Recorder::new(client.as_kube_client(), Reporter {
91+
controller: FULL_CONTROLLER_NAME.to_string(),
92+
instance: None,
93+
}));
9794

9895
applier(
9996
|sts, ctx| Box::pin(reconcile(sts, ctx)),

rustfmt.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# This file includes unstable features, so you need to run "cargo +nightly fmt" to format your code.
22
# It's also ok to use the stable toolchain by simple running "cargo fmt", but using the nigthly formatter is prefered.
33

4+
# https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rustfmt-style-edition.html
5+
style_edition = "2024"
46
imports_granularity = "Crate"
5-
group_imports = "StdExternalCrate"
7+
group_imports = "StdExternalCrate"
8+
reorder_impl_items = true
9+
use_field_init_shorthand = true

0 commit comments

Comments
 (0)