Skip to content

Commit 91c489c

Browse files
chore: Update templated files (9001281) (#704)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@9001281 Reference-to: stackabletech/operator-templating@9001281 (Fix pre-commit hook) * chore: Apply formatting * chore: Bump openssl to 0.10.70 to fix RUSTSEC-2025-0004 --------- Co-authored-by: Techassi <git@techassi.dev>
1 parent ae068f4 commit 91c489c

29 files changed

+91
-64
lines changed

.github/workflows/pr_pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
CARGO_TERM_COLOR: always
9-
RUST_TOOLCHAIN_VERSION: "1.82.0"
9+
RUST_TOOLCHAIN_VERSION: "nightly-2025-01-15"
1010
HADOLINT_VERSION: "v2.12.0"
1111
PYTHON_VERSION: "3.12"
1212

.pre-commit-config.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ repos:
1717
- repo: https://github.com/doublify/pre-commit-rust
1818
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0
1919
hooks:
20-
- id: fmt
21-
# Pinning to a specific rustc version, so that we get consistent formatting
22-
entry: RUSTUP_TOOLCHAIN=nightly-2025-01-15 cargo fmt
23-
args: ["--all", "--", "--check"]
2420
- id: clippy
2521
args: ["--all-targets", "--", "-D", "warnings"]
2622

@@ -78,3 +74,10 @@ repos:
7874
entry: cargo test
7975
stages: [pre-commit, pre-merge-commit, manual]
8076
pass_filenames: false
77+
78+
- id: cargo-rustfmt
79+
name: cargo-rustfmt
80+
language: system
81+
entry: cargo +nightly-2025-01-15 fmt --all -- --check
82+
stages: [pre-commit]
83+
pass_filenames: false

Cargo.lock

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

rust/crd/src/affinity.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,9 @@ pub fn get_affinity(
8585

8686
#[cfg(test)]
8787
mod tests {
88-
use super::*;
89-
90-
use rstest::rstest;
9188
use std::collections::BTreeMap;
9289

93-
use crate::TrinoCluster;
90+
use rstest::rstest;
9491
use stackable_operator::{
9592
commons::affinity::StackableAffinity,
9693
k8s_openapi::{
@@ -101,6 +98,9 @@ mod tests {
10198
},
10299
};
103100

101+
use super::*;
102+
use crate::TrinoCluster;
103+
104104
#[rstest]
105105
#[case(TrinoRole::Coordinator)]
106106
#[case(TrinoRole::Worker)]

rust/crd/src/catalog/delta_lake.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
use super::commons::{HdfsConnection, MetastoreConnection};
21
use serde::{Deserialize, Serialize};
32
use stackable_operator::{
43
commons::s3::S3ConnectionInlineOrReference,
54
schemars::{self, JsonSchema},
65
};
76

7+
use super::commons::{HdfsConnection, MetastoreConnection};
8+
89
// This struct is similar to [`super::hive::HiveConnector`], but we do not `#[serde(flatten)]` it here, to avoid changing
910
// stuff there and missing that these settings don't apply to other connectors (such as Iceberg or Delta Lake).
1011
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]

rust/crd/src/catalog/generic.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub enum Property {
3838
#[cfg(test)]
3939
mod tests {
4040
use super::*;
41-
4241
use crate::catalog::{TrinoCatalog, TrinoCatalogConnector};
4342

4443
#[test]

rust/crd/src/catalog/hive.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
use super::commons::{HdfsConnection, MetastoreConnection};
21
use serde::{Deserialize, Serialize};
32
use stackable_operator::{
43
commons::s3::S3ConnectionInlineOrReference,
54
schemars::{self, JsonSchema},
65
};
76

7+
use super::commons::{HdfsConnection, MetastoreConnection};
8+
89
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
910
#[serde(rename_all = "camelCase")]
1011
pub struct HiveConnector {

rust/crd/src/catalog/iceberg.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
use super::commons::{HdfsConnection, MetastoreConnection};
21
use serde::{Deserialize, Serialize};
32
use stackable_operator::{
43
commons::s3::S3ConnectionInlineOrReference,
54
schemars::{self, JsonSchema},
65
};
76

7+
use super::commons::{HdfsConnection, MetastoreConnection};
8+
89
// This struct is similar to [`super::hive::HiveConnector`], but we do not `#[serde(flatten)]` it here, to avoid changing
910
// stuff there and missing that these settings don't apply to other connectors (such as Iceberg or Delta Lake).
1011
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]

rust/crd/src/catalog/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ pub mod iceberg;
88
pub mod tpcds;
99
pub mod tpch;
1010

11-
use serde::{Deserialize, Serialize};
12-
use stackable_operator::{
13-
kube::CustomResource,
14-
schemars::{self, JsonSchema},
15-
};
1611
use std::collections::HashMap;
1712

1813
use black_hole::BlackHoleConnector;
1914
use generic::GenericConnector;
2015
use google_sheet::GoogleSheetConnector;
2116
use hive::HiveConnector;
2217
use iceberg::IcebergConnector;
18+
use serde::{Deserialize, Serialize};
19+
use stackable_operator::{
20+
kube::CustomResource,
21+
schemars::{self, JsonSchema},
22+
};
2323
use tpcds::TpcdsConnector;
2424
use tpch::TpchConnector;
2525

rust/crd/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pub mod authentication;
33
pub mod catalog;
44
pub mod discovery;
55

6-
use crate::discovery::TrinoPodRef;
6+
use std::{collections::BTreeMap, str::FromStr};
77

88
use affinity::get_affinity;
99
use catalog::TrinoCatalog;
@@ -35,9 +35,10 @@ use stackable_operator::{
3535
time::Duration,
3636
utils::cluster_info::KubernetesClusterInfo,
3737
};
38-
use std::{collections::BTreeMap, str::FromStr};
3938
use strum::{Display, EnumIter, EnumString, IntoEnumIterator};
4039

40+
use crate::discovery::TrinoPodRef;
41+
4142
pub const APP_NAME: &str = "trino";
4243
// ports
4344
pub const HTTP_PORT: u16 = 8080;

0 commit comments

Comments
 (0)