From 2475dd1a8b200acdf65a5145960c821aa20f125a Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 25 Mar 2022 14:22:32 +0100 Subject: [PATCH] github+Docker: bump and fix go version to 1.16.9 There's a race condition in the h2_bundle.go of go 1.16.10 and later. The issue https://github.com/golang/go/issues/51799 mentions that this might be fixed in go 1.19, so we'll need to wait for that. We make sure we build our docker images with go 1.16.9 to not run into the issue in the wild. --- .github/workflows/main.yml | 11 ++++++++--- Dockerfile | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f6ab30..1408800 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,12 @@ env: # If you change this value, please change it in the following files as well: # /Dockerfile - GO_VERSION: 1.17.8 + # + # Don't bump this until go 1.19 is out (which should include a fix for + # https://github.com/golang/go/issues/51799). There was a race condition + # introduced with go 1.16.10 that causes the unit tests to fail (could also + # happen in production). + GO_VERSION: 1.16.9 jobs: ######################## @@ -48,7 +53,7 @@ jobs: - name: setup go ${{ env.GO_VERSION }} uses: actions/setup-go@v2 with: - go-version: '~${{ env.GO_VERSION }}' + go-version: '${{ env.GO_VERSION }}' - name: lint run: make lint @@ -83,7 +88,7 @@ jobs: - name: setup go ${{ env.GO_VERSION }} uses: actions/setup-go@v2 with: - go-version: '~${{ env.GO_VERSION }}' + go-version: '${{ env.GO_VERSION }}' - name: run ${{ matrix.unit_type }} run: make ${{ matrix.unit_type }} diff --git a/Dockerfile b/Dockerfile index c796429..ba65a6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,8 @@ -FROM golang:1.15.5-alpine as builder +# Don't bump this until go 1.19 is out (which should include a fix for +# https://github.com/golang/go/issues/51799). There was a race condition +# introduced with go 1.16.10 that causes the unit tests to fail (could also +# happen in production). +FROM golang:1.16.9-alpine as builder # Force Go to use the cgo based DNS resolver. This is required to ensure DNS # queries required to connect to linked containers succeed.