Skip to content

Commit 52a4fe4

Browse files
authored
chore: Bump operator-rs to 0.67.0 (#183)
* chore: Bump operator-rs to 0.67.0 * bumps deps as much as possible * Bump built to 0.7 * Use PKG_VERSION directly
1 parent e0ab3bf commit 52a4fe4

File tree

9 files changed

+1980
-1639
lines changed

9 files changed

+1980
-1639
lines changed

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/listener-operator"
1111

1212
[workspace.dependencies]
1313
anyhow = "1.0"
14-
built = { version = "0.6", features = ["chrono", "git2"] }
14+
built = { version = "0.7", features = ["chrono", "git2"] }
1515
clap = "4.3"
1616
futures = { version = "0.3", features = ["compat"] }
1717
h2 = "=0.3.18" # We need to keep this in sync with our patched h2 build
@@ -20,11 +20,11 @@ pin-project = "1.1"
2020
prost = "0.11"
2121
prost-types = "0.11"
2222
serde = "1.0"
23-
snafu = "0.7"
24-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.64.0" }
25-
strum = { version = "0.25", features = ["derive"] }
26-
socket2 = { version = "0.5.3", features = ["all"] }
27-
tokio = { version = "1.29", features = ["full"] }
23+
snafu = "0.8"
24+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.67.0" }
25+
strum = { version = "0.26", features = ["derive"] }
26+
socket2 = { version = "0.5", features = ["all"] }
27+
tokio = { version = "1.37", features = ["full"] }
2828
tokio-stream = { version = "0.1", features = ["net"] }
2929
tonic = "0.9"
3030
tonic-build = "0.9"

crate-hashes.json

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

rust/operator-binary/build.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
use std::path::PathBuf;
2-
31
fn main() {
4-
let out_dir = PathBuf::from(std::env::var("OUT_DIR").expect("OUT_DIR is required"));
5-
built::write_built_file_with_opts(
6-
// built's env module depends on a whole bunch of variables that crate2nix doesn't provide
7-
// so we grab the specific env variables that we care about out ourselves instead.
8-
built::Options::default().set_env(false),
9-
"Cargo.toml".as_ref(),
10-
&out_dir.join("built.rs"),
11-
)
12-
.unwrap();
2+
built::write_built_file().unwrap();
133
}

rust/operator-binary/src/csi_server/controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ enum CreateVolumeError {
3131
DecodeRequestParams { source: serde::de::value::Error },
3232
#[snafu(display("failed to get {obj}"))]
3333
GetObject {
34-
source: stackable_operator::error::Error,
34+
source: stackable_operator::client::Error,
3535
obj: Box<ObjectRef<DynamicObject>>,
3636
},
3737
#[snafu(display("failed to decode volume context"))]

rust/operator-binary/src/csi_server/node.rs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use csi_grpc::{self as csi, v1::Topology};
22
use serde::{de::IntoDeserializer, Deserialize};
33
use snafu::{OptionExt, ResultExt, Snafu};
44
use stackable_operator::{
5-
builder::OwnerReferenceBuilder,
5+
builder::meta::OwnerReferenceBuilder,
66
commons::listener::{
77
Listener, ListenerIngress, ListenerPort, ListenerSpec, PodListener, PodListenerScope,
88
PodListeners, PodListenersSpec,
@@ -45,47 +45,58 @@ struct ListenerNodeVolumeContext {
4545
enum PublishVolumeError {
4646
#[snafu(display("failed to decode volume context"))]
4747
DecodeVolumeContext { source: serde::de::value::Error },
48+
4849
#[snafu(display("failed to get {obj}"))]
4950
GetObject {
50-
source: stackable_operator::error::Error,
51+
source: stackable_operator::client::Error,
5152
obj: ObjectRef<DynamicObject>,
5253
},
54+
5355
#[snafu(display("PersistentVolume has no corresponding PersistentVolumeClaim"))]
5456
UnclaimedPv,
57+
5558
#[snafu(display("failed to generate {listener}'s pod selector"))]
5659
ListenerPodSelector {
5760
source: ListenerMountedPodLabelError,
5861
listener: ObjectRef<Listener>,
5962
},
63+
6064
#[snafu(display("{pod} has not been scheduled to a node yet"))]
6165
PodHasNoNode { pod: ObjectRef<Pod> },
66+
6267
#[snafu(display("failed to build Listener's owner reference"))]
6368
BuildListenerOwnerRef {
64-
source: stackable_operator::error::Error,
69+
source: stackable_operator::builder::meta::Error,
6570
},
71+
6672
#[snafu(display("failed to apply {listener}"))]
6773
ApplyListener {
68-
source: stackable_operator::error::Error,
74+
source: stackable_operator::client::Error,
6975
listener: ObjectRef<Listener>,
7076
},
77+
7178
#[snafu(display("failed to add listener label to {pod}"))]
7279
AddListenerLabelToPod {
73-
source: stackable_operator::error::Error,
80+
source: stackable_operator::client::Error,
7481
pod: ObjectRef<Pod>,
7582
},
83+
7684
#[snafu(display("listener has no addresses yet"))]
7785
NoAddresses,
86+
7887
#[snafu(display("failed to prepare pod dir at {target_path:?}"))]
7988
PreparePodDir {
8089
source: pod_dir::Error,
8190
target_path: PathBuf,
8291
},
92+
8393
#[snafu(display("failed to write {pod_listeners} (also tried to create: {create_error})"))]
8494
WritePodListeners {
85-
source: stackable_operator::error::Error,
86-
create_error: stackable_operator::error::Error,
95+
source: stackable_operator::client::Error,
96+
create_error: stackable_operator::client::Error,
8797
pod_listeners: ObjectRef<PodListeners>,
8898
},
99+
89100
#[snafu(display("failed to find Pod volume corresponding for {pvc}"))]
90101
FindPodVolumeForPvc {
91102
pvc: ObjectRef<PersistentVolumeClaim>,

rust/operator-binary/src/listener_controller.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{collections::BTreeMap, sync::Arc};
33
use futures::{future::try_join_all, StreamExt};
44
use snafu::{OptionExt, ResultExt, Snafu};
55
use stackable_operator::{
6-
builder::OwnerReferenceBuilder,
6+
builder::meta::OwnerReferenceBuilder,
77
commons::listener::{
88
AddressType, Listener, ListenerClass, ListenerIngress, ListenerPort, ListenerSpec,
99
ListenerStatus, ServiceType,
@@ -81,21 +81,21 @@ pub enum Error {
8181
},
8282
#[snafu(display("failed to get {obj}"))]
8383
GetObject {
84-
source: stackable_operator::error::Error,
84+
source: stackable_operator::client::Error,
8585
obj: ObjectRef<DynamicObject>,
8686
},
8787
#[snafu(display("failed to build owner reference to Listener"))]
8888
BuildListenerOwnerRef {
89-
source: stackable_operator::error::Error,
89+
source: stackable_operator::builder::meta::Error,
9090
},
9191
#[snafu(display("failed to apply {svc}"))]
9292
ApplyService {
93-
source: stackable_operator::error::Error,
93+
source: stackable_operator::client::Error,
9494
svc: ObjectRef<Service>,
9595
},
9696
#[snafu(display("failed to apply status for Listener"))]
9797
ApplyStatus {
98-
source: stackable_operator::error::Error,
98+
source: stackable_operator::client::Error,
9999
},
100100
}
101101
type Result<T, E = Error> = std::result::Result<T, E>;

rust/operator-binary/src/main.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,16 @@ enum RunMode {
5454

5555
mod built_info {
5656
include!(concat!(env!("OUT_DIR"), "/built.rs"));
57-
pub const TARGET: Option<&str> = option_env!("TARGET");
58-
pub const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
5957
}
6058

6159
#[tokio::main]
6260
async fn main() -> anyhow::Result<()> {
6361
let opts = Opts::parse();
6462
match opts.cmd {
6563
stackable_operator::cli::Command::Crd => {
66-
ListenerClass::print_yaml_schema(built_info::CARGO_PKG_VERSION)?;
67-
Listener::print_yaml_schema(built_info::CARGO_PKG_VERSION)?;
68-
PodListeners::print_yaml_schema(built_info::CARGO_PKG_VERSION)?;
64+
ListenerClass::print_yaml_schema(built_info::PKG_VERSION)?;
65+
Listener::print_yaml_schema(built_info::PKG_VERSION)?;
66+
PodListeners::print_yaml_schema(built_info::PKG_VERSION)?;
6967
}
7068
stackable_operator::cli::Command::Run(ListenerOperatorRun {
7169
tracing_target,
@@ -81,7 +79,7 @@ async fn main() -> anyhow::Result<()> {
8179
&format!("{} ({})", crate_description!(), mode.as_ref()),
8280
crate_version!(),
8381
built_info::GIT_VERSION,
84-
built_info::TARGET.unwrap_or("unknown target"),
82+
built_info::TARGET,
8583
built_info::BUILT_TIME_UTC,
8684
built_info::RUSTC_VERSION,
8785
);

0 commit comments

Comments
 (0)