Skip to content

Commit e49102c

Browse files
simonswinepracucci
andauthored
Update go version in build image to 1.16.6 (cortexproject#4362)
* Update go version in build image to 1.16.6 This addresses CVE-2021-34558. golang/go#47143 Signed-off-by: Christian Simon <simon@swine.de> * Update build image and golang version in CI Signed-off-by: Marco Pracucci <marco@pracucci.com> * Update LATEST_BUILD_IMAGE_TAG in makefile Signed-off-by: Christian Simon <simon@swine.de> Co-authored-by: Marco Pracucci <marco@pracucci.com>
1 parent 03911b6 commit e49102c

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

.github/workflows/test-build-deploy.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
lint:
1111
runs-on: ubuntu-20.04
1212
container:
13-
image: quay.io/cortexproject/build-image:build-image-multiarch-1d2497ff6
13+
image: quay.io/cortexproject/build-image:20210713_update-go-1.16.6-178ab0c4f
1414
steps:
1515
- name: Checkout Repo
1616
uses: actions/checkout@v2
@@ -34,7 +34,7 @@ jobs:
3434
test:
3535
runs-on: ubuntu-20.04
3636
container:
37-
image: quay.io/cortexproject/build-image:build-image-multiarch-1d2497ff6
37+
image: quay.io/cortexproject/build-image:20210713_update-go-1.16.6-178ab0c4f
3838
services:
3939
cassandra:
4040
image: cassandra:3.11
@@ -55,7 +55,7 @@ jobs:
5555
build:
5656
runs-on: ubuntu-20.04
5757
container:
58-
image: quay.io/cortexproject/build-image:build-image-multiarch-1d2497ff6
58+
image: quay.io/cortexproject/build-image:20210713_update-go-1.16.6-178ab0c4f
5959
steps:
6060
- name: Checkout Repo
6161
uses: actions/checkout@v2
@@ -98,8 +98,8 @@ jobs:
9898
- name: Upgrade golang
9999
run: |
100100
cd /tmp
101-
wget https://dl.google.com/go/go1.16.3.linux-amd64.tar.gz
102-
tar -zxvf go1.16.3.linux-amd64.tar.gz
101+
wget https://dl.google.com/go/go1.16.6.linux-amd64.tar.gz
102+
tar -zxvf go1.16.6.linux-amd64.tar.gz
103103
sudo rm -fr /usr/local/go
104104
sudo mv /tmp/go /usr/local/go
105105
cd -
@@ -174,14 +174,14 @@ jobs:
174174
run: |
175175
touch build-image/.uptodate
176176
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations
177-
make BUILD_IMAGE=quay.io/cortexproject/build-image:build-image-multiarch-1d2497ff6 TTY='' configs-integration-test
177+
make BUILD_IMAGE=quay.io/cortexproject/build-image:20210713_update-go-1.16.6-178ab0c4f TTY='' configs-integration-test
178178
179179
deploy_website:
180180
needs: [build, test]
181181
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
182182
runs-on: ubuntu-20.04
183183
container:
184-
image: quay.io/cortexproject/build-image:build-image-multiarch-1d2497ff6
184+
image: quay.io/cortexproject/build-image:20210713_update-go-1.16.6-178ab0c4f
185185
steps:
186186
- name: Checkout Repo
187187
uses: actions/checkout@v2
@@ -218,7 +218,7 @@ jobs:
218218
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
219219
runs-on: ubuntu-20.04
220220
container:
221-
image: quay.io/cortexproject/build-image:build-image-multiarch-1d2497ff6
221+
image: quay.io/cortexproject/build-image:20210713_update-go-1.16.6-178ab0c4f
222222
steps:
223223
- name: Checkout Repo
224224
uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## master / unreleased
44
* [FEATURE] Ruler: Add new `-ruler.query-stats-enabled` which when enabled will report the `cortex_ruler_query_seconds_total` as a per-user metric that tracks the sum of the wall time of executing queries in the ruler in seconds. #4317
55

6+
* [CHANGE] Update Go version to 1.16.6. #4362
67
* [CHANGE] Querier / ruler: Change `-querier.max-fetched-chunks-per-query` configuration to limit to maximum number of chunks that can be fetched in a single query. The number of chunks fetched by ingesters AND long-term storare combined should not exceed the value configured on `-querier.max-fetched-chunks-per-query`. #4260
78
* [CHANGE] Memberlist: the `memberlist_kv_store_value_bytes` has been removed due to values no longer being stored in-memory as encoded bytes. #4345
89
* [ENHANCEMENT] Add timeout for waiting on compactor to become ACTIVE in the ring. #4262

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ build-image/$(UPTODATE): build-image/*
119119
SUDO := $(shell docker info >/dev/null 2>&1 || echo "sudo -E")
120120
BUILD_IN_CONTAINER := true
121121
BUILD_IMAGE ?= $(IMAGE_PREFIX)build-image
122-
LATEST_BUILD_IMAGE_TAG ?= build-image-multiarch-1d2497ff6
122+
LATEST_BUILD_IMAGE_TAG ?= 20210713_update-go-1.16.6-178ab0c4f
123123

124124
# TTY is parameterized to allow Google Cloud Builder to run builds,
125125
# as it currently disallows TTY devices. This value needs to be overridden

build-image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16.3-buster
1+
FROM golang:1.16.6-buster
22
ARG goproxyValue
33
ENV GOPROXY=${goproxyValue}
44
RUN apt-get update && apt-get install -y curl python-requests python-yaml file jq unzip protobuf-compiler libprotobuf-dev && \

docs/contributing/how-to-upgrade-golang-version.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ To upgrade the Golang version:
1414
- Update the Docker image tag in `.github/workflows/*`
1515
2. Upgrade integration tests version
1616
- Update the Golang version installed in the `integration` job in `.github/workflows/*`
17+
3. Upgrade the reference to the latest build image called `LATEST_BUILD_IMAGE_TAG` in `Makefile`
1718

1819
If the minimum support Golang version should be upgraded as well:
1920

0 commit comments

Comments
 (0)