Skip to content

Commit

Permalink
Fix inbound fuzzing build
Browse files Browse the repository at this point in the history
Nightly builds were broken when the fuzzer change landed, so we missed
the regression. This change fixes the inbound fuzzer build. It also
updates the devcontainer build to include a nightly toolchain with
cargo-fuzz.

Signed-off-by: Oliver Gould <ver@buoyant.io>
  • Loading branch information
olix0r committed Apr 9, 2022
1 parent 5cecf49 commit 3b96b5e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ ARG YQ_VERSION=v4.2.0
RUN curl --proto '=https' --tlsv1.3 -vsSfLo /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" \
&& chmod +x /usr/local/bin/yq

FROM docker.io/rust:${RUST_VERSION}-bullseye as nightly
RUN rustup toolchain add nightly

FROM nightly as fuzz
RUN cargo +nightly install cargo-fuzz

#
# Main image
#
Expand Down Expand Up @@ -63,6 +69,8 @@ COPY --from=cargo-deny /usr/local/bin/cargo-deny /usr/local/bin/cargo-deny
COPY --from=k3d /usr/local/bin/k3d /usr/local/bin/k3d
COPY --from=kubectl /usr/local/bin/kubectl /usr/local/bin/kubectl
COPY --from=yq /usr/local/bin/yq /usr/local/bin/yq
COPY --from=nightly /usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu /usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu
COPY --from=fuzz /usr/local/cargo/bin/cargo-fuzz /usr/local/cargo/bin/cargo-fuzz

ENTRYPOINT ["/usr/local/share/docker-init.sh"]
CMD ["sleep", "infinity"]
6 changes: 5 additions & 1 deletion linkerd/app/inbound/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ pub mod fuzz {
kind: "server".into(),
name: "testsaz".into(),
}],
kind: "server".into(),
name: "testsrv".into(),
},
);
Expand All @@ -228,7 +229,10 @@ pub mod fuzz {

impl svc::Param<policy::ServerLabel> for Target {
fn param(&self) -> policy::ServerLabel {
policy::ServerLabel("testsrv".into())
policy::ServerLabel {
kind: "server".into(),
name: "testsrv".into(),
}
}
}

Expand Down

0 comments on commit 3b96b5e

Please sign in to comment.