From 6531d4977beb0c0ea32cee10224f1536db7611d4 Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Mon, 24 May 2021 17:22:23 +0000 Subject: [PATCH] Update Go to 1.16.4 Go 1.16.4 includes a fix for a denial-of-service in net/http: golang/go#45710 Go's error file-line formatting changed in 1.16.3, so this change updates tests to only do suffix matching on these error strings. --- .github/workflows/static_checks.yml | 6 +++--- .github/workflows/unit_tests.yml | 2 +- Dockerfile-proxy | 2 +- cli/Dockerfile-bin | 2 +- cni-plugin/Dockerfile | 2 +- controller/Dockerfile | 2 +- jaeger/injector/Dockerfile | 2 +- testutil/annotations_test.go | 4 ++-- viz/metrics-api/Dockerfile | 2 +- viz/tap/Dockerfile | 2 +- web/Dockerfile | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml index 4ed43e34a22f6..a7754b7383e9e 100644 --- a/.github/workflows/static_checks.yml +++ b/.github/workflows/static_checks.yml @@ -13,7 +13,7 @@ jobs: timeout-minutes: 10 runs-on: ubuntu-20.04 container: - image: golang:1.16.2 + image: golang:1.16.4 steps: - name: Checkout code uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 @@ -24,7 +24,7 @@ jobs: timeout-minutes: 10 runs-on: ubuntu-20.04 container: - image: golang:1.16.2 + image: golang:1.16.4 steps: - name: Checkout code uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 @@ -35,7 +35,7 @@ jobs: timeout-minutes: 10 runs-on: ubuntu-20.04 container: - image: golang:1.16.2 + image: golang:1.16.4 steps: - name: Prerequisites run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install unzip diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 3c797664ebae6..e71258ae7b9bc 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -13,7 +13,7 @@ jobs: timeout-minutes: 30 runs-on: ubuntu-20.04 container: - image: golang:1.16.2 + image: golang:1.16.4 steps: - name: Checkout code uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 diff --git a/Dockerfile-proxy b/Dockerfile-proxy index dddcadd08cea6..8650b118a4835 100644 --- a/Dockerfile-proxy +++ b/Dockerfile-proxy @@ -2,7 +2,7 @@ ARG RUNTIME_IMAGE=debian:buster-20210208-slim ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.16.2-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.16.4-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/cli/Dockerfile-bin b/cli/Dockerfile-bin index d4eba7bb3132b..c372bdabf5e7b 100644 --- a/cli/Dockerfile-bin +++ b/cli/Dockerfile-bin @@ -2,7 +2,7 @@ ARG BUILDPLATFORM=linux/amd64 ARG BUILD_STAGE=single-arch # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.16.2-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.16.4-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/cni-plugin/Dockerfile b/cni-plugin/Dockerfile index 7e974d314024d..b8455e63c31c8 100644 --- a/cni-plugin/Dockerfile +++ b/cni-plugin/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.16.2-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.16.4-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/controller/Dockerfile b/controller/Dockerfile index 373d776fbb484..2be516b1377c0 100644 --- a/controller/Dockerfile +++ b/controller/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.16.2-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.16.4-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/jaeger/injector/Dockerfile b/jaeger/injector/Dockerfile index 67f484fe3933d..e536ac0809e83 100644 --- a/jaeger/injector/Dockerfile +++ b/jaeger/injector/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.16.2-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.16.4-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/testutil/annotations_test.go b/testutil/annotations_test.go index 359ecee38e3d4..9866d56fefc2f 100644 --- a/testutil/annotations_test.go +++ b/testutil/annotations_test.go @@ -48,7 +48,7 @@ func TestError(t *testing.T) { Error(&testing.T{}, msg) out := restoreStdout(outC, origStdout) - if strings.TrimSpace(out) != "::error file=testutil/annotations_test.go,line=48:: - This is an error" { + if !strings.HasSuffix(strings.TrimSpace(out), "testutil/annotations_test.go,line=48:: - This is an error") { t.Fatalf("unexpected stdout content: %s", out) } } @@ -63,7 +63,7 @@ func TestAnnotatedErrorf(t *testing.T) { AnnotatedErrorf(&testing.T{}, msgDesc, msgFormat, str) out := restoreStdout(outC, origStdout) - if strings.TrimSpace(out) != "::error file=testutil/annotations_test.go,line=63:: - This is a generic error" { + if !strings.HasSuffix(strings.TrimSpace(out), "testutil/annotations_test.go,line=63:: - This is a generic error") { t.Fatalf("unexpected stdout content: %s", out) } } diff --git a/viz/metrics-api/Dockerfile b/viz/metrics-api/Dockerfile index ef66e7758bd26..4ac473cb551e8 100644 --- a/viz/metrics-api/Dockerfile +++ b/viz/metrics-api/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.16.2-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.16.4-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/viz/tap/Dockerfile b/viz/tap/Dockerfile index 3e4402cbf19e5..f58c68ba7552b 100644 --- a/viz/tap/Dockerfile +++ b/viz/tap/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.16.2-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.16.4-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/web/Dockerfile b/web/Dockerfile index 228c6f2038ef0..acb4bf728c217 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.16.2-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.16.4-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/