Skip to content

Commit c0ebd1e

Browse files
authored
chore: Bump Rust version to 1.87.0 and workflow actions (#1072)
* chore: Bump Rust version to 1.87.0 and workflow actions * Fix clippy lints * linter * docs: Convert arguments lists to actual lists
1 parent 7328943 commit c0ebd1e

File tree

16 files changed

+156
-104
lines changed

16 files changed

+156
-104
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
CARGO_TERM_COLOR: always
1818
CARGO_INCREMENTAL: '0'
1919
CARGO_PROFILE_DEV_DEBUG: '0'
20-
RUST_TOOLCHAIN_VERSION: "1.85.0"
20+
RUST_TOOLCHAIN_VERSION: "1.87.0"
2121
RUSTFLAGS: "-D warnings"
2222
RUSTDOCFLAGS: "-D warnings"
2323
RUST_LOG: "info"
@@ -38,10 +38,10 @@ jobs:
3838
- uses: dtolnay/rust-toolchain@master
3939
with:
4040
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
41-
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
41+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
4242
with:
4343
key: udeps
44-
- run: cargo install --locked [email protected].55
44+
- run: cargo install --locked [email protected].57
4545
- run: cargo udeps --all-targets --all-features
4646

4747
run_cargodeny:
@@ -60,7 +60,7 @@ jobs:
6060
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6161
with:
6262
persist-credentials: false
63-
- uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
63+
- uses: EmbarkStudios/cargo-deny-action@30f817c6f72275c6d54dc744fbca09ebc958599f # v2.0.12
6464
with:
6565
command: check ${{ matrix.checks }}
6666

@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
7777
components: rustfmt
78-
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
78+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
7979
with:
8080
key: doc
8181
- run: cargo doc --document-private-items
@@ -96,7 +96,7 @@ jobs:
9696
# for our cases.
9797
# See: https://github.com/dtolnay/trybuild/issues/236#issuecomment-1620950759
9898
components: rust-src
99-
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
99+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
100100
with:
101101
key: test
102102
- run: cargo test --no-default-features --workspace

.github/workflows/pr_pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
persist-credentials: false
2121
fetch-depth: 0
22-
- uses: stackabletech/actions/run-pre-commit@4bfd3b65f22af597fe784599c077dc34bf5894a7 # v0.8.0
22+
- uses: stackabletech/actions/run-pre-commit@4483641a7e24057bd2ba51cb4c3f2f0010ad21b7 # v0.8.4
2323
with:
2424
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
2525
# rust-src is required for trybuild stderr output comparison to work

.github/workflows/publish-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- crates/**
1414

1515
env:
16-
RUST_TOOLCHAIN_VERSION: "1.85.0"
16+
RUST_TOOLCHAIN_VERSION: "1.87.0"
1717

1818
permissions: {}
1919

@@ -37,7 +37,7 @@ jobs:
3737
run: echo '<meta http-equiv="refresh" content="0;url=stackable_operator/index.html">' > target/doc/index.html
3838

3939
- name: Upload Documentation Artifacts
40-
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa #v3.0.1
40+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
4141
with:
4242
path: target/doc
4343

Cargo.lock

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

crates/stackable-certs/src/ca/mod.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ where
128128
{
129129
#[snafu(display("failed to retrieve secret \"{secret_ref}\""))]
130130
GetSecret {
131-
source: kube::Error,
131+
#[snafu(source(from(kube::Error, Box::new)))]
132+
source: Box<kube::Error>,
132133
secret_ref: SecretReference,
133134
},
134135

@@ -146,15 +147,19 @@ where
146147

147148
#[snafu(display("failed to read PEM-encoded certificate chain from secret {secret:?}"))]
148149
ReadChain {
149-
source: x509_cert::der::Error,
150+
#[snafu(source(from(x509_cert::der::Error, Box::new)))]
151+
source: Box<x509_cert::der::Error>,
150152
secret: ObjectRef<Secret>,
151153
},
152154

153155
#[snafu(display("failed to parse UTF-8 encoded byte string"))]
154156
DecodeUtf8String { source: std::str::Utf8Error },
155157

156158
#[snafu(display("failed to deserialize private key from PEM"))]
157-
DeserializeKeyFromPem { source: E },
159+
DeserializeKeyFromPem {
160+
#[snafu(source(from(E, Box::new)))]
161+
source: Box<E>,
162+
},
158163
}
159164

160165
/// A certificate authority (CA) which is used to generate and sign

crates/stackable-operator/src/cluster_resources.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ pub enum Error {
5353
MissingObjectKey { key: &'static str },
5454

5555
#[snafu(display("failed to list cluster resources with label selector"))]
56-
ListClusterResources { source: crate::client::Error },
56+
ListClusterResources {
57+
#[snafu(source(from(crate::client::Error, Box::new)))]
58+
source: Box<crate::client::Error>,
59+
},
5760

5861
#[snafu(display("label {label:?} is missing"))]
5962
MissingLabel { label: &'static str },
@@ -68,13 +71,22 @@ pub enum Error {
6871
},
6972

7073
#[snafu(display("failed to get resource"))]
71-
GetResource { source: crate::client::Error },
74+
GetResource {
75+
#[snafu(source(from(crate::client::Error, Box::new)))]
76+
source: Box<crate::client::Error>,
77+
},
7278

7379
#[snafu(display("failed to apply patch"))]
74-
ApplyPatch { source: crate::client::Error },
80+
ApplyPatch {
81+
#[snafu(source(from(crate::client::Error, Box::new)))]
82+
source: Box<crate::client::Error>,
83+
},
7584

7685
#[snafu(display("failed to delete orphaned resource"))]
77-
DeleteOrphanedResource { source: crate::client::Error },
86+
DeleteOrphanedResource {
87+
#[snafu(source(from(crate::client::Error, Box::new)))]
88+
source: Box<crate::client::Error>,
89+
},
7890
}
7991

8092
/// A cluster resource handled by [`ClusterResources`].

crates/stackable-operator/src/crd/s3/connection/v1alpha1_impl.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ use crate::{
1717
pub enum ConnectionError {
1818
#[snafu(display("failed to retrieve S3 connection '{s3_connection}'"))]
1919
RetrieveS3Connection {
20-
source: crate::client::Error,
20+
#[snafu(source(from(crate::client::Error, Box::new)))]
21+
source: Box<crate::client::Error>,
2122
s3_connection: String,
2223
},
2324

@@ -37,11 +38,15 @@ pub enum ConnectionError {
3738
AddS3TlsClientDetailsVolumes { source: TlsClientDetailsError },
3839

3940
#[snafu(display("failed to add required volumes"))]
40-
AddVolumes { source: crate::builder::pod::Error },
41+
AddVolumes {
42+
#[snafu(source(from(crate::builder::pod::Error, Box::new)))]
43+
source: Box<crate::builder::pod::Error>,
44+
},
4145

4246
#[snafu(display("failed to add required volumeMounts"))]
4347
AddVolumeMounts {
44-
source: crate::builder::pod::container::Error,
48+
#[snafu(source(from(crate::builder::pod::container::Error, Box::new)))]
49+
source: Box<crate::builder::pod::container::Error>,
4550
},
4651
}
4752

0 commit comments

Comments
 (0)