Skip to content

Commit 155b2c6

Browse files
yeya24dsabsayDaniel Sabsayfriedrichg
authored
Cherrypick commits for 1.16.1 (#5885)
* Upgrade Alpine to 3.18 (#5684) * Upgrade Alpine to 3.18 Signed-off-by: Daniel Sabsay <[email protected]> * Update CHANGELOG.md Signed-off-by: Daniel Sabsay <[email protected]> --------- Signed-off-by: Daniel Sabsay <[email protected]> Co-authored-by: Daniel Sabsay <[email protected]> * Upgrade to go 1.21.9 (#5879) * Upgrade to go 1.21.9 Signed-off-by: Friedrich Gonzalez <[email protected]> * Update changelog and workflows Signed-off-by: Friedrich Gonzalez <[email protected]> * Not use minor version for now. Needs more investigation Signed-off-by: Friedrich Gonzalez <[email protected]> * Update image again Signed-off-by: Friedrich Gonzalez <[email protected]> --------- Signed-off-by: Friedrich Gonzalez <[email protected]> * fix go version for integration tests (#5882) Signed-off-by: Friedrich Gonzalez <[email protected]> * include #5882 to changelog Signed-off-by: Ben Ye <[email protected]> try fixing lint Signed-off-by: Ben Ye <[email protected]> try again Signed-off-by: Ben Ye <[email protected]> --------- Signed-off-by: Daniel Sabsay <[email protected]> Signed-off-by: Friedrich Gonzalez <[email protected]> Signed-off-by: Ben Ye <[email protected]> Co-authored-by: Daniel Sabsay <[email protected]> Co-authored-by: Daniel Sabsay <[email protected]> Co-authored-by: Friedrich Gonzalez <[email protected]>
1 parent 279ed56 commit 155b2c6

File tree

16 files changed

+38
-26
lines changed

16 files changed

+38
-26
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
lint:
1212
runs-on: ubuntu-20.04
1313
container:
14-
image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50
14+
image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16
1515
steps:
1616
- name: Checkout Repo
1717
uses: actions/checkout@v2
@@ -40,7 +40,7 @@ jobs:
4040
test:
4141
runs-on: ubuntu-20.04
4242
container:
43-
image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50
43+
image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16
4444
steps:
4545
- name: Checkout Repo
4646
uses: actions/checkout@v2
@@ -59,7 +59,7 @@ jobs:
5959
build:
6060
runs-on: ubuntu-20.04
6161
container:
62-
image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50
62+
image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16
6363
steps:
6464
- name: Checkout Repo
6565
uses: actions/checkout@v2
@@ -118,7 +118,7 @@ jobs:
118118
- name: Upgrade golang
119119
uses: actions/setup-go@v2
120120
with:
121-
go-version: 1.21.3
121+
go-version: 1.21.9
122122
- name: Checkout Repo
123123
uses: actions/checkout@v2
124124
- name: Install Docker Client
@@ -193,14 +193,14 @@ jobs:
193193
run: |
194194
touch build-image/.uptodate
195195
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations
196-
make BUILD_IMAGE=quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50 TTY='' configs-integration-test
196+
make BUILD_IMAGE=quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16 TTY='' configs-integration-test
197197
198198
deploy_website:
199199
needs: [build, test]
200200
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
201201
runs-on: ubuntu-20.04
202202
container:
203-
image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50
203+
image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16
204204
steps:
205205
- name: Checkout Repo
206206
uses: actions/checkout@v2
@@ -242,7 +242,7 @@ jobs:
242242
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
243243
runs-on: ubuntu-20.04
244244
container:
245-
image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50
245+
image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16
246246
steps:
247247
- name: Checkout Repo
248248
uses: actions/checkout@v2

.golangci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@ linters-settings:
1919
exclude: ./.errcheck-exclude
2020
goimports:
2121
local-prefixes: "github.com/cortexproject/cortex"
22+
revive:
23+
severity: error # We only want critical issues.
2224

2325
depguard:
24-
list-type: blacklist
25-
include-go-root: true
26-
packages-with-error-message:
27-
- github.com/go-kit/kit/log: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
26+
rules:
27+
main:
28+
list-mode: lax
29+
files:
30+
- $all
31+
deny:
32+
- pkg: "github.com/go-kit/kit/log"
33+
desc: Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
2834

2935
run:
3036
timeout: 5m

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## master / unreleased
44

5+
## 1.16.1 2024-04-23
6+
7+
* [ENHANCEMENT] Upgraded Docker base images to `alpine:3.18`. #5684
8+
* [ENHANCEMENT] Upgrade to go 1.21.9 #5879 #5882
9+
510
## 1.16.0 2023-11-20
611

712
* [CHANGE] AlertManager: include reason label in `cortex_alertmanager_notifications_failed_total`. #5409

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ build-image/$(UPTODATE): build-image/*
122122
SUDO := $(shell docker info >/dev/null 2>&1 || echo "sudo -E")
123123
BUILD_IN_CONTAINER := true
124124
BUILD_IMAGE ?= $(IMAGE_PREFIX)build-image
125-
LATEST_BUILD_IMAGE_TAG ?= update-go-1.21.3-e38685e50
125+
LATEST_BUILD_IMAGE_TAG ?= upgrade-go-to-1.21.9-b37062f16
126126

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

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.16.0
1+
1.16.1

build-image/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.21.3-bullseye
1+
FROM golang:1.21.9-bullseye
22
ARG goproxyValue
33
ENV GOPROXY=${goproxyValue}
44
RUN apt-get update && apt-get install -y curl file jq unzip protobuf-compiler libprotobuf-dev && \
@@ -23,7 +23,7 @@ RUN GOARCH=$(go env GOARCH) && \
2323
chmod +x shfmt && \
2424
mv shfmt /usr/bin
2525

26-
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.51.2
26+
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.54.1
2727

2828
ENV HUGO_VERSION=v0.101.0
2929
RUN go install github.com/client9/misspell/cmd/[email protected] &&\

cmd/cortex/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.17
1+
FROM alpine:3.18
22
ARG TARGETARCH
33

44
RUN apk add --no-cache ca-certificates

cmd/query-tee/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.17
1+
FROM alpine:3.18
22
ARG TARGETARCH
33

44
RUN apk add --no-cache ca-certificates

cmd/test-exporter/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.17
1+
FROM alpine:3.18
22
ARG TARGETARCH
33
RUN apk add --no-cache ca-certificates
44
COPY test-exporter-$TARGETARCH /test-exporter

cmd/thanosconvert/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.17
1+
FROM alpine:3.18
22
ARG TARGETARCH
33
RUN apk add --no-cache ca-certificates
44
COPY thanosconvert-$TARGETARCH /thanosconvert

development/tsdb-blocks-storage-s3-gossip/dev.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM golang:1.18
22
ENV CGO_ENABLED=0
33
RUN go get github.com/go-delve/delve/cmd/dlv
44

5-
FROM alpine:3.17
5+
FROM alpine:3.18
66

77
RUN mkdir /cortex
88
WORKDIR /cortex

development/tsdb-blocks-storage-s3-single-binary/dev.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.17
1+
FROM alpine:3.18
22

33
RUN mkdir /cortex
44
WORKDIR /cortex

development/tsdb-blocks-storage-s3/dev.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM golang:1.18
22
ENV CGO_ENABLED=0
33
RUN go get github.com/go-delve/delve/cmd/dlv
44

5-
FROM alpine:3.17
5+
FROM alpine:3.18
66

77
RUN mkdir /cortex
88
WORKDIR /cortex

development/tsdb-blocks-storage-swift-single-binary/dev.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.17
1+
FROM alpine:3.18
22

33
RUN mkdir /cortex
44
WORKDIR /cortex

packaging/fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.17
1+
FROM alpine:3.18
22

33
RUN apk add --no-cache \
44
ruby \

pkg/querier/testutils.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ package querier
22

33
import (
44
"context"
5-
"github.com/cortexproject/cortex/pkg/cortexpb"
6-
"github.com/cortexproject/cortex/pkg/util/limiter"
5+
76
"github.com/prometheus/common/model"
87
"github.com/prometheus/prometheus/model/labels"
98
"github.com/prometheus/prometheus/scrape"
109
"github.com/stretchr/testify/mock"
1110

11+
"github.com/cortexproject/cortex/pkg/cortexpb"
1212
"github.com/cortexproject/cortex/pkg/ingester/client"
1313
"github.com/cortexproject/cortex/pkg/prom1/storage/metric"
1414
"github.com/cortexproject/cortex/pkg/util/flagext"
15+
"github.com/cortexproject/cortex/pkg/util/limiter"
1516
"github.com/cortexproject/cortex/pkg/util/validation"
1617
)
1718

0 commit comments

Comments
 (0)