From c7d7f34fc7882231b57c8b6850fc88cf83664d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Smolarek?= <34063647+Razz4780@users.noreply.github.com> Date: Wed, 27 Nov 2024 19:17:29 +0100 Subject: [PATCH] Removed 'Result' (#2932) --- changelog.d/+type-fix.internal.md | 1 + mirrord/kube/src/resolved.rs | 8 +++----- mirrord/operator/src/client.rs | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 changelog.d/+type-fix.internal.md diff --git a/changelog.d/+type-fix.internal.md b/changelog.d/+type-fix.internal.md new file mode 100644 index 00000000000..87e5d77b60b --- /dev/null +++ b/changelog.d/+type-fix.internal.md @@ -0,0 +1 @@ +Fixed return type of a function in mirrord-operator client code. \ No newline at end of file diff --git a/mirrord/kube/src/resolved.rs b/mirrord/kube/src/resolved.rs index e3c2ca1384e..943198fdf9c 100644 --- a/mirrord/kube/src/resolved.rs +++ b/mirrord/kube/src/resolved.rs @@ -463,17 +463,15 @@ impl ResolvedTarget { api_version: &str, plural: &str, url_path: &str, - ) -> Result { + ) -> String { let name = self.urlfied_name(); let namespace = self.namespace().unwrap_or("default"); - let url = if use_proxy { + if use_proxy { format!("/apis/{api_version}/proxy/namespaces/{namespace}/{plural}/{name}?on_concurrent_steal={concurrent_steal}&connect=true") } else { format!("{url_path}/{name}?on_concurrent_steal={concurrent_steal}&connect=true") - }; - - Ok(url) + } } pub fn urlfied_name(&self) -> String { diff --git a/mirrord/operator/src/client.rs b/mirrord/operator/src/client.rs index bed04d022e1..a1afee20eda 100644 --- a/mirrord/operator/src/client.rs +++ b/mirrord/operator/src/client.rs @@ -626,7 +626,7 @@ impl OperatorApi { &TargetCrd::api_version(&()), &TargetCrd::plural(&()), &TargetCrd::url_path(&(), target.namespace()), - )? + ) }; tracing::debug!("connect_url {connect_url:?}");