From 4f997d18bff22b41a23f3eec570023b64448d9cd Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 8 Aug 2023 07:53:20 +0200 Subject: [PATCH 1/6] Use workspace member configs --- Cargo.toml | 18 +++++++++++++----- stackable-operator-derive/Cargo.toml | 12 ++++++------ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1c28f8a62..1e969ef0b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,20 @@ -[package] -authors = ["Stackable GmbH "] +[workspace.package] description = "Stackable Operator Framework" -edition = "2021" -license = "Apache-2.0" -name = "stackable-operator" version = "0.45.1" +authors = ["Stackable GmbH "] +license = "Apache-2.0" +edition = "2021" repository = "https://github.com/stackabletech/operator-rs" +[package] +name = "stackable-operator" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +license.workspace = true +repository.workspace = true + [dependencies] chrono = { version = "0.4.26", default-features = false } clap = { version = "4.3.19", features = ["derive", "cargo", "env"] } diff --git a/stackable-operator-derive/Cargo.toml b/stackable-operator-derive/Cargo.toml index a6a2136d9..45456b6c7 100644 --- a/stackable-operator-derive/Cargo.toml +++ b/stackable-operator-derive/Cargo.toml @@ -1,11 +1,11 @@ [package] -authors = ["Stackable GmbH "] -description = "Stackable Operator Framework" -edition = "2021" -license = "Apache-2.0" name = "stackable-operator-derive" -version = "0.45.1" -repository = "https://github.com/stackabletech/operator-rs" +version.workspace = true +authors.workspace = true +edition.workspace = true +description.workspace = true +license.workspace = true +repository.workspace = true [lib] proc-macro = true From 34b9e99095c875e24717cc7dddaa5fdfbf50ce1d Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 8 Aug 2023 07:54:26 +0200 Subject: [PATCH 2/6] bump rust to 1.71.0 --- rust-toolchain.toml | 2 +- src/builder/pod/mod.rs | 2 +- src/builder/pod/security.rs | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 864d3c411..aa464261d 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.68.2" +channel = "1.71.0" diff --git a/src/builder/pod/mod.rs b/src/builder/pod/mod.rs index d54d6b110..cb95ddabf 100644 --- a/src/builder/pod/mod.rs +++ b/src/builder/pod/mod.rs @@ -143,7 +143,7 @@ impl PodBuilder { } pub fn phase(&mut self, phase: &str) -> &mut Self { - let mut status = self.status.get_or_insert_with(PodStatus::default); + let status = self.status.get_or_insert_with(PodStatus::default); status.phase = Some(phase.to_string()); self } diff --git a/src/builder/pod/security.rs b/src/builder/pod/security.rs index 62fa89f45..24896da45 100644 --- a/src/builder/pod/security.rs +++ b/src/builder/pod/security.rs @@ -63,7 +63,7 @@ impl SecurityContextBuilder { } pub fn se_linux_level(&mut self, level: impl Into) -> &mut Self { - let mut sc = self + let sc = self .security_context .se_linux_options .get_or_insert_with(SELinuxOptions::default); @@ -71,7 +71,7 @@ impl SecurityContextBuilder { self } pub fn se_linux_role(&mut self, role: impl Into) -> &mut Self { - let mut sc = self + let sc = self .security_context .se_linux_options .get_or_insert_with(SELinuxOptions::default); @@ -80,7 +80,7 @@ impl SecurityContextBuilder { } pub fn se_linux_type(&mut self, type_: impl Into) -> &mut Self { - let mut sc = self + let sc = self .security_context .se_linux_options .get_or_insert_with(SELinuxOptions::default); @@ -89,7 +89,7 @@ impl SecurityContextBuilder { } pub fn se_linux_user(&mut self, user: impl Into) -> &mut Self { - let mut sc = self + let sc = self .security_context .se_linux_options .get_or_insert_with(SELinuxOptions::default); @@ -98,7 +98,7 @@ impl SecurityContextBuilder { } pub fn seccomp_profile_localhost(&mut self, profile: impl Into) -> &mut Self { - let mut sc = self + let sc = self .security_context .seccomp_profile .get_or_insert_with(SeccompProfile::default); @@ -107,7 +107,7 @@ impl SecurityContextBuilder { } pub fn seccomp_profile_type(&mut self, type_: impl Into) -> &mut Self { - let mut sc = self + let sc = self .security_context .seccomp_profile .get_or_insert_with(SeccompProfile::default); @@ -116,7 +116,7 @@ impl SecurityContextBuilder { } pub fn win_credential_spec(&mut self, spec: impl Into) -> &mut Self { - let mut wo = self + let wo = self .security_context .windows_options .get_or_insert_with(WindowsSecurityContextOptions::default); @@ -125,7 +125,7 @@ impl SecurityContextBuilder { } pub fn win_credential_spec_name(&mut self, name: impl Into) -> &mut Self { - let mut wo = self + let wo = self .security_context .windows_options .get_or_insert_with(WindowsSecurityContextOptions::default); @@ -134,7 +134,7 @@ impl SecurityContextBuilder { } pub fn win_run_as_user_name(&mut self, name: impl Into) -> &mut Self { - let mut wo = self + let wo = self .security_context .windows_options .get_or_insert_with(WindowsSecurityContextOptions::default); From 5e13a3a9fac8b0b69995991882e79698c480720d Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 8 Aug 2023 07:55:02 +0200 Subject: [PATCH 3/6] Release 0.46.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1e969ef0b..15df8f2b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace.package] description = "Stackable Operator Framework" -version = "0.45.1" +version = "0.46.0" authors = ["Stackable GmbH "] license = "Apache-2.0" edition = "2021" From c68265f8ce14c383cf6a1cba07ff4712e93bc4fc Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 8 Aug 2023 07:57:28 +0200 Subject: [PATCH 4/6] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2eec898a4..cd10a4f90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,16 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [0.46.0] - 2023-08-08 + ### Changed - Bump all dependencies (including kube and k8s-openapi) ([#632]). +- Bump Rust version to 0.71.0 ([#633]). +- Refactor Cargo.toml's to share workspace configuration, such as version and license ([#633]). [#632]: https://github.com/stackabletech/operator-rs/pull/632 +[#633]: https://github.com/stackabletech/operator-rs/pull/633 ## [0.45.1] - 2023-08-01 From 59a2b6c7702aa7ccc00755ec65f923ad55a0b090 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 8 Aug 2023 08:00:27 +0200 Subject: [PATCH 5/6] bump rust version --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 05d2bd569..21b5d6fb1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ env: CARGO_TERM_COLOR: always CARGO_INCREMENTAL: '0' CARGO_PROFILE_DEV_DEBUG: '0' - RUST_TOOLCHAIN_VERSION: "1.68.2" + RUST_TOOLCHAIN_VERSION: "1.71.0" RUSTFLAGS: "-D warnings" RUSTDOCFLAGS: "-D warnings" RUST_LOG: "info" From bcec7502cb12f783fc35cc00355874e8a30927fb Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 8 Aug 2023 09:37:11 +0200 Subject: [PATCH 6/6] Update description of stackable-operator-derive package --- Cargo.toml | 5 ++--- stackable-operator-derive/Cargo.toml | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 15df8f2b4..0722a7111 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,4 @@ [workspace.package] -description = "Stackable Operator Framework" version = "0.46.0" authors = ["Stackable GmbH "] license = "Apache-2.0" @@ -8,11 +7,11 @@ repository = "https://github.com/stackabletech/operator-rs" [package] name = "stackable-operator" +description = "Stackable Operator Framework" version.workspace = true authors.workspace = true -edition.workspace = true -description.workspace = true license.workspace = true +edition.workspace = true repository.workspace = true [dependencies] diff --git a/stackable-operator-derive/Cargo.toml b/stackable-operator-derive/Cargo.toml index 45456b6c7..e5732d9bd 100644 --- a/stackable-operator-derive/Cargo.toml +++ b/stackable-operator-derive/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "stackable-operator-derive" +description = "Derive macros for the Stackable Operator Framework" version.workspace = true authors.workspace = true -edition.workspace = true -description.workspace = true license.workspace = true +edition.workspace = true repository.workspace = true [lib]