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:?}");