Skip to content

Commit

Permalink
Update Go to 1.16.4
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
olix0r committed May 24, 2021
1 parent ab32c4e commit 6531d49
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion cli/Dockerfile-bin
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion cni-plugin/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
2 changes: 1 addition & 1 deletion controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
2 changes: 1 addition & 1 deletion jaeger/injector/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
4 changes: 2 additions & 2 deletions testutil/annotations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand All @@ -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)
}
}
2 changes: 1 addition & 1 deletion viz/metrics-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
2 changes: 1 addition & 1 deletion viz/tap/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
2 changes: 1 addition & 1 deletion web/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down

0 comments on commit 6531d49

Please sign in to comment.