refector(policy): Prepare for Gateway API type binding library switch #2603
rust.yml
on: pull_request
fmt
23s
clippy
3m 7s
check
1m 10s
test
3m 39s
rust toolchain
6s
Matrix: audit
Annotations
20 errors and 5 warnings
check:
policy-test/src/lib.rs#L15
error[E0432]: unresolved import `linkerd_policy_controller_k8s_api::policy::httproute::ParentReference`
--> policy-test/src/lib.rs:15:14
|
15 | policy::{httproute::ParentReference, EgressNetwork, TrafficPolicy},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ParentReference` in `policy::httproute`
|
= help: consider importing one of these structs instead:
crate::gateway::ParentReference
k8s_gateway_api::ParentReference
linkerd_policy_controller_k8s_api::gateway::ParentReference
|
check:
policy-test/src/grpc.rs#L109
error[E0433]: failed to resolve: could not find `http2` in `conn`
--> policy-test/src/grpc.rs:109:30
|
109 | tx: hyper::client::conn::http2::SendRequest<tonic::body::BoxBody>,
| ^^^^^ could not find `http2` in `conn`
|
note: found an item that was configured out
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.32/src/client/conn.rs:60:9
|
60 | pub mod http2;
| ^^^^^
note: the item is gated here
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.32/src/client/conn.rs:59:1
|
59 | #[cfg(all(feature = "backports", feature = "http2"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
check:
policy-test/src/grpc.rs#L327
error[E0433]: failed to resolve: use of undeclared crate or module `hyper_util`
--> policy-test/src/grpc.rs:327:54
|
327 | hyper::client::conn::http2::Builder::new(hyper_util::rt::TokioExecutor::new())
| ^^^^^^^^^^ use of undeclared crate or module `hyper_util`
|
check:
policy-test/src/grpc.rs#L328
error[E0433]: failed to resolve: use of undeclared crate or module `hyper_util`
--> policy-test/src/grpc.rs:328:28
|
328 | .handshake(hyper_util::rt::TokioIo::new(io))
| ^^^^^^^^^^ use of undeclared crate or module `hyper_util`
|
check:
policy-test/src/lib.rs#L645
error[E0433]: failed to resolve: could not find `httproutes` in `gateway`
--> policy-test/src/lib.rs:645:53
|
645 | statuses: impl IntoIterator<Item = &'a gateway::httproutes::HTTPRouteStatus>,
| ^^^^^^^^^^
| |
| could not find `httproutes` in `gateway`
| help: a struct with a similar name exists: `HttpRoute`
|
check:
policy-test/src/grpc.rs#L327
error[E0433]: failed to resolve: could not find `http2` in `conn`
--> policy-test/src/grpc.rs:327:34
|
327 | hyper::client::conn::http2::Builder::new(hyper_util::rt::TokioExecutor::new())
| ^^^^^ could not find `http2` in `conn`
|
note: found an item that was configured out
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.32/src/client/conn.rs:60:9
|
60 | pub mod http2;
| ^^^^^
note: the item is gated here
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.32/src/client/conn.rs:59:1
|
59 | #[cfg(all(feature = "backports", feature = "http2"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider importing one of these structs
|
6 + use std::thread::Builder;
|
6 + use hyper::client::Builder;
|
6 + use hyper::client::conn::Builder;
|
6 + use hyper::server::Builder;
|
and 2 other candidates
help: if you import `Builder`, refer to it directly
|
327 - hyper::client::conn::http2::Builder::new(hyper_util::rt::TokioExecutor::new())
327 + Builder::new(hyper_util::rt::TokioExecutor::new())
|
|
check:
policy-test/src/grpc.rs#L335
error[E0412]: cannot find type `Incoming` in module `hyper::body`
--> policy-test/src/grpc.rs:335:26
|
335 | type Body = hyper::body::Incoming;
| ^^^^^^^^ not found in `hyper::body`
|
help: consider importing one of these structs
|
6 + use std::net::Incoming;
|
6 + use std::os::unix::net::Incoming;
|
help: if you import `Incoming`, refer to it directly
|
335 - type Body = hyper::body::Incoming;
335 + type Body = Incoming;
|
|
check:
policy-test/src/lib.rs#L238
error[E0412]: cannot find type `RouteStatus` in module `k8s::policy::httproute`
--> policy-test/src/lib.rs:238:30
|
238 | ) -> k8s::policy::httproute::RouteStatus {
| ^^^^^^^^^^^ not found in `k8s::policy::httproute`
|
help: consider importing one of these structs
|
12 + use crate::gateway::RouteStatus;
|
12 + use k8s_gateway_api::RouteStatus;
|
12 + use linkerd_policy_controller_k8s_api::gateway::RouteStatus;
|
help: if you import `RouteStatus`, refer to it directly
|
238 - ) -> k8s::policy::httproute::RouteStatus {
238 + ) -> RouteStatus {
|
|
check:
policy-test/src/lib.rs#L626
error[E0412]: cannot find type `HTTPRouteParentRefs` in module `k8s::policy::httproute`
--> policy-test/src/lib.rs:626:53
|
626 | parent_refs: Option<Vec<k8s::policy::httproute::HTTPRouteParentRefs>>,
| ^^^^^^^^^^^^^^^^^^^ not found in `k8s::policy::httproute`
|
help: consider importing one of these type aliases
|
12 + use crate::gateway::HTTPRouteParentRefs;
|
12 + use linkerd_policy_controller_k8s_api::gateway::HTTPRouteParentRefs;
|
help: if you import `HTTPRouteParentRefs`, refer to it directly
|
626 - parent_refs: Option<Vec<k8s::policy::httproute::HTTPRouteParentRefs>>,
626 + parent_refs: Option<Vec<HTTPRouteParentRefs>>,
|
|
check:
usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.41/src/macros.rs#L2807
error[E0277]: `std::option::Option<std::string::String>` doesn't implement `std::fmt::Display`
--> policy-test/src/lib.rs:177:5
|
177 | / tracing::trace!(
178 | | pod = %pod.name_any(),
179 | | ip = %pod
180 | | .status.as_ref().expect("pod must have a status")
... |
186 | | "Ready",
187 | | );
| | ^
| | |
| |_____`std::option::Option<std::string::String>` cannot be formatted with the default formatter
| required by a bound introduced by this call
|
= help: the trait `std::fmt::Display` is not implemented for `std::option::Option<std::string::String>`, which is required by `&std::option::Option<std::string::String>: std::fmt::Display`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: required for `&std::option::Option<std::string::String>` to implement `std::fmt::Display`
note: required by a bound in `display`
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-core-0.1.33/src/field.rs:361:8
|
359 | pub fn display<T>(t: T) -> DisplayValue<T>
| ------- required by a bound in this function
360 | where
361 | T: fmt::Display,
| ^^^^^^^^^^^^ required by this bound in `display`
= note: this error originates in the macro `$crate::valueset` which comes from the expansion of the macro `tracing::trace` (in Nightly builds, run with -Z macro-backtrace for more info)
|
clippy:
policy-test/src/lib.rs#L15
error[E0432]: unresolved import `linkerd_policy_controller_k8s_api::policy::httproute::ParentReference`
--> policy-test/src/lib.rs:15:14
|
15 | policy::{httproute::ParentReference, EgressNetwork, TrafficPolicy},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ParentReference` in `policy::httproute`
|
= help: consider importing one of these structs instead:
crate::gateway::ParentReference
k8s_gateway_api::ParentReference
linkerd_policy_controller_k8s_api::gateway::ParentReference
|
clippy:
policy-test/src/grpc.rs#L109
error[E0433]: failed to resolve: could not find `http2` in `conn`
--> policy-test/src/grpc.rs:109:30
|
109 | tx: hyper::client::conn::http2::SendRequest<tonic::body::BoxBody>,
| ^^^^^ could not find `http2` in `conn`
|
note: found an item that was configured out
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.32/src/client/conn.rs:60:9
|
60 | pub mod http2;
| ^^^^^
note: the item is gated here
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.32/src/client/conn.rs:59:1
|
59 | #[cfg(all(feature = "backports", feature = "http2"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
clippy:
policy-test/src/grpc.rs#L327
error[E0433]: failed to resolve: use of undeclared crate or module `hyper_util`
--> policy-test/src/grpc.rs:327:54
|
327 | hyper::client::conn::http2::Builder::new(hyper_util::rt::TokioExecutor::new())
| ^^^^^^^^^^ use of undeclared crate or module `hyper_util`
|
clippy:
policy-test/src/grpc.rs#L328
error[E0433]: failed to resolve: use of undeclared crate or module `hyper_util`
--> policy-test/src/grpc.rs:328:28
|
328 | .handshake(hyper_util::rt::TokioIo::new(io))
| ^^^^^^^^^^ use of undeclared crate or module `hyper_util`
|
clippy:
policy-test/src/lib.rs#L645
error[E0433]: failed to resolve: could not find `httproutes` in `gateway`
--> policy-test/src/lib.rs:645:53
|
645 | statuses: impl IntoIterator<Item = &'a gateway::httproutes::HTTPRouteStatus>,
| ^^^^^^^^^^
| |
| could not find `httproutes` in `gateway`
| help: a struct with a similar name exists: `HttpRoute`
|
clippy:
policy-test/src/grpc.rs#L327
error[E0433]: failed to resolve: could not find `http2` in `conn`
--> policy-test/src/grpc.rs:327:34
|
327 | hyper::client::conn::http2::Builder::new(hyper_util::rt::TokioExecutor::new())
| ^^^^^ could not find `http2` in `conn`
|
note: found an item that was configured out
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.32/src/client/conn.rs:60:9
|
60 | pub mod http2;
| ^^^^^
note: the item is gated here
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.32/src/client/conn.rs:59:1
|
59 | #[cfg(all(feature = "backports", feature = "http2"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider importing one of these structs
|
6 + use std::thread::Builder;
|
6 + use hyper::client::Builder;
|
6 + use hyper::client::conn::Builder;
|
6 + use hyper::server::Builder;
|
and 2 other candidates
help: if you import `Builder`, refer to it directly
|
327 - hyper::client::conn::http2::Builder::new(hyper_util::rt::TokioExecutor::new())
327 + Builder::new(hyper_util::rt::TokioExecutor::new())
|
|
clippy:
policy-test/src/grpc.rs#L335
error[E0412]: cannot find type `Incoming` in module `hyper::body`
--> policy-test/src/grpc.rs:335:26
|
335 | type Body = hyper::body::Incoming;
| ^^^^^^^^ not found in `hyper::body`
|
help: consider importing one of these structs
|
6 + use std::net::Incoming;
|
6 + use std::os::unix::net::Incoming;
|
help: if you import `Incoming`, refer to it directly
|
335 - type Body = hyper::body::Incoming;
335 + type Body = Incoming;
|
|
clippy:
policy-test/src/lib.rs#L238
error[E0412]: cannot find type `RouteStatus` in module `k8s::policy::httproute`
--> policy-test/src/lib.rs:238:30
|
238 | ) -> k8s::policy::httproute::RouteStatus {
| ^^^^^^^^^^^ not found in `k8s::policy::httproute`
|
help: consider importing one of these structs
|
12 + use crate::gateway::RouteStatus;
|
12 + use k8s_gateway_api::RouteStatus;
|
12 + use linkerd_policy_controller_k8s_api::gateway::RouteStatus;
|
help: if you import `RouteStatus`, refer to it directly
|
238 - ) -> k8s::policy::httproute::RouteStatus {
238 + ) -> RouteStatus {
|
|
clippy:
policy-test/src/lib.rs#L626
error[E0412]: cannot find type `HTTPRouteParentRefs` in module `k8s::policy::httproute`
--> policy-test/src/lib.rs:626:53
|
626 | parent_refs: Option<Vec<k8s::policy::httproute::HTTPRouteParentRefs>>,
| ^^^^^^^^^^^^^^^^^^^ not found in `k8s::policy::httproute`
|
help: consider importing one of these type aliases
|
12 + use crate::gateway::HTTPRouteParentRefs;
|
12 + use linkerd_policy_controller_k8s_api::gateway::HTTPRouteParentRefs;
|
help: if you import `HTTPRouteParentRefs`, refer to it directly
|
626 - parent_refs: Option<Vec<k8s::policy::httproute::HTTPRouteParentRefs>>,
626 + parent_refs: Option<Vec<HTTPRouteParentRefs>>,
|
|
clippy:
usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.41/src/macros.rs#L2807
error[E0277]: `std::option::Option<std::string::String>` doesn't implement `std::fmt::Display`
--> policy-test/src/lib.rs:177:5
|
177 | / tracing::trace!(
178 | | pod = %pod.name_any(),
179 | | ip = %pod
180 | | .status.as_ref().expect("pod must have a status")
... |
186 | | "Ready",
187 | | );
| | ^
| | |
| |_____`std::option::Option<std::string::String>` cannot be formatted with the default formatter
| required by a bound introduced by this call
|
= help: the trait `std::fmt::Display` is not implemented for `std::option::Option<std::string::String>`, which is required by `&std::option::Option<std::string::String>: std::fmt::Display`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: required for `&std::option::Option<std::string::String>` to implement `std::fmt::Display`
note: required by a bound in `tracing::field::display`
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-core-0.1.33/src/field.rs:361:8
|
359 | pub fn display<T>(t: T) -> DisplayValue<T>
| ------- required by a bound in this function
360 | where
361 | T: fmt::Display,
| ^^^^^^^^^^^^ required by this bound in `display`
= note: this error originates in the macro `$crate::valueset` which comes from the expansion of the macro `tracing::trace` (in Nightly builds, run with -Z macro-backtrace for more info)
|
clippy:
policy-controller/k8s/status/src/tests/routes.rs#L2
warning: unused import: `gateway as k8s_gateway_api`
--> policy-controller/k8s/status/src/tests/routes.rs:2:27
|
2 | self as k8s_core_api, gateway as k8s_gateway_api, policy as linkerd_k8s_api,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
clippy:
policy-controller/k8s/status/src/tests/routes.rs#L5
warning: unused import: `crate::index::POLICY_API_GROUP`
--> policy-controller/k8s/status/src/tests/routes.rs:5:5
|
5 | use crate::index::POLICY_API_GROUP;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
clippy:
policy-controller/k8s/status/src/tests/routes.rs#L6
warning: unused imports: `DateTime` and `Utc`
--> policy-controller/k8s/status/src/tests/routes.rs:6:14
|
6 | use chrono::{DateTime, Utc};
| ^^^^^^^^ ^^^
|
clippy:
policy-controller/k8s/status/src/tests/routes.rs#L6
warning: unused imports: `DateTime` and `Utc`
--> policy-controller/k8s/status/src/tests/routes.rs:6:14
|
6 | use chrono::{DateTime, Utc};
| ^^^^^^^^ ^^^
|
clippy:
policy-controller/k8s/status/src/tests/routes.rs#L7
warning: unused import: `linkerd_policy_controller_core::POLICY_CONTROLLER_NAME`
--> policy-controller/k8s/status/src/tests/routes.rs:7:5
|
7 | use linkerd_policy_controller_core::POLICY_CONTROLLER_NAME;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|