diff --git a/.github/workflows/test-build-deploy.yml b/.github/workflows/test-build-deploy.yml index fc3e95b3bc..140ecd8e50 100644 --- a/.github/workflows/test-build-deploy.yml +++ b/.github/workflows/test-build-deploy.yml @@ -11,7 +11,7 @@ jobs: lint: runs-on: ubuntu-20.04 container: - image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50 + image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16 steps: - name: Checkout Repo uses: actions/checkout@v2 @@ -40,7 +40,7 @@ jobs: test: runs-on: ubuntu-20.04 container: - image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50 + image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16 steps: - name: Checkout Repo uses: actions/checkout@v2 @@ -59,7 +59,7 @@ jobs: build: runs-on: ubuntu-20.04 container: - image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50 + image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16 steps: - name: Checkout Repo uses: actions/checkout@v2 @@ -118,7 +118,7 @@ jobs: - name: Upgrade golang uses: actions/setup-go@v2 with: - go-version: 1.21.3 + go-version: 1.21.9 - name: Checkout Repo uses: actions/checkout@v2 - name: Install Docker Client @@ -193,14 +193,14 @@ jobs: run: | touch build-image/.uptodate MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations - make BUILD_IMAGE=quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50 TTY='' configs-integration-test + make BUILD_IMAGE=quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16 TTY='' configs-integration-test deploy_website: needs: [build, test] if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex' runs-on: ubuntu-20.04 container: - image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50 + image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16 steps: - name: Checkout Repo uses: actions/checkout@v2 @@ -242,7 +242,7 @@ jobs: if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex' runs-on: ubuntu-20.04 container: - image: quay.io/cortexproject/build-image:update-go-1.21.3-e38685e50 + image: quay.io/cortexproject/build-image:upgrade-go-to-1.21.9-b37062f16 steps: - name: Checkout Repo uses: actions/checkout@v2 diff --git a/.golangci.yml b/.golangci.yml index c5c0da324e..77d8f8cab6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -19,12 +19,18 @@ linters-settings: exclude: ./.errcheck-exclude goimports: local-prefixes: "github.com/cortexproject/cortex" + revive: + severity: error # We only want critical issues. depguard: - list-type: blacklist - include-go-root: true - packages-with-error-message: - - github.com/go-kit/kit/log: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log" + rules: + main: + list-mode: lax + files: + - $all + deny: + - pkg: "github.com/go-kit/kit/log" + desc: Use github.com/go-kit/log instead of github.com/go-kit/kit/log" run: timeout: 5m diff --git a/CHANGELOG.md b/CHANGELOG.md index fc03ad3be8..d6b6589735 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## master / unreleased +## 1.16.1 2024-04-23 + +* [ENHANCEMENT] Upgraded Docker base images to `alpine:3.18`. #5684 +* [ENHANCEMENT] Upgrade to go 1.21.9 #5879 #5882 + ## 1.16.0 2023-11-20 * [CHANGE] AlertManager: include reason label in `cortex_alertmanager_notifications_failed_total`. #5409 diff --git a/Makefile b/Makefile index 4804f6734d..e59ccfb501 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ build-image/$(UPTODATE): build-image/* SUDO := $(shell docker info >/dev/null 2>&1 || echo "sudo -E") BUILD_IN_CONTAINER := true BUILD_IMAGE ?= $(IMAGE_PREFIX)build-image -LATEST_BUILD_IMAGE_TAG ?= update-go-1.21.3-e38685e50 +LATEST_BUILD_IMAGE_TAG ?= upgrade-go-to-1.21.9-b37062f16 # TTY is parameterized to allow Google Cloud Builder to run builds, # as it currently disallows TTY devices. This value needs to be overridden diff --git a/VERSION b/VERSION index 15b989e398..41c11ffb73 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.0 +1.16.1 diff --git a/build-image/Dockerfile b/build-image/Dockerfile index 1cee501bfc..10a1ebbf2e 100644 --- a/build-image/Dockerfile +++ b/build-image/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.3-bullseye +FROM golang:1.21.9-bullseye ARG goproxyValue ENV GOPROXY=${goproxyValue} 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) && \ chmod +x shfmt && \ mv shfmt /usr/bin -RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.51.2 +RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.54.1 ENV HUGO_VERSION=v0.101.0 RUN go install github.com/client9/misspell/cmd/misspell@v0.3.4 &&\ diff --git a/cmd/cortex/Dockerfile b/cmd/cortex/Dockerfile index e6604a38d4..28a315d5b9 100644 --- a/cmd/cortex/Dockerfile +++ b/cmd/cortex/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.17 +FROM alpine:3.18 ARG TARGETARCH RUN apk add --no-cache ca-certificates diff --git a/cmd/query-tee/Dockerfile b/cmd/query-tee/Dockerfile index 53242577b3..cbd5f4558b 100644 --- a/cmd/query-tee/Dockerfile +++ b/cmd/query-tee/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.17 +FROM alpine:3.18 ARG TARGETARCH RUN apk add --no-cache ca-certificates diff --git a/cmd/test-exporter/Dockerfile b/cmd/test-exporter/Dockerfile index 52897f0b86..86460a0600 100644 --- a/cmd/test-exporter/Dockerfile +++ b/cmd/test-exporter/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.17 +FROM alpine:3.18 ARG TARGETARCH RUN apk add --no-cache ca-certificates COPY test-exporter-$TARGETARCH /test-exporter diff --git a/cmd/thanosconvert/Dockerfile b/cmd/thanosconvert/Dockerfile index 80ba01201e..80b1341821 100644 --- a/cmd/thanosconvert/Dockerfile +++ b/cmd/thanosconvert/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.17 +FROM alpine:3.18 ARG TARGETARCH RUN apk add --no-cache ca-certificates COPY thanosconvert-$TARGETARCH /thanosconvert diff --git a/development/tsdb-blocks-storage-s3-gossip/dev.dockerfile b/development/tsdb-blocks-storage-s3-gossip/dev.dockerfile index abd818fd3a..e1cf86cb2b 100644 --- a/development/tsdb-blocks-storage-s3-gossip/dev.dockerfile +++ b/development/tsdb-blocks-storage-s3-gossip/dev.dockerfile @@ -2,7 +2,7 @@ FROM golang:1.18 ENV CGO_ENABLED=0 RUN go get github.com/go-delve/delve/cmd/dlv -FROM alpine:3.17 +FROM alpine:3.18 RUN mkdir /cortex WORKDIR /cortex diff --git a/development/tsdb-blocks-storage-s3-single-binary/dev.dockerfile b/development/tsdb-blocks-storage-s3-single-binary/dev.dockerfile index f66add7f19..71d0fc6df7 100644 --- a/development/tsdb-blocks-storage-s3-single-binary/dev.dockerfile +++ b/development/tsdb-blocks-storage-s3-single-binary/dev.dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.17 +FROM alpine:3.18 RUN mkdir /cortex WORKDIR /cortex diff --git a/development/tsdb-blocks-storage-s3/dev.dockerfile b/development/tsdb-blocks-storage-s3/dev.dockerfile index abd818fd3a..e1cf86cb2b 100644 --- a/development/tsdb-blocks-storage-s3/dev.dockerfile +++ b/development/tsdb-blocks-storage-s3/dev.dockerfile @@ -2,7 +2,7 @@ FROM golang:1.18 ENV CGO_ENABLED=0 RUN go get github.com/go-delve/delve/cmd/dlv -FROM alpine:3.17 +FROM alpine:3.18 RUN mkdir /cortex WORKDIR /cortex diff --git a/development/tsdb-blocks-storage-swift-single-binary/dev.dockerfile b/development/tsdb-blocks-storage-swift-single-binary/dev.dockerfile index f66add7f19..71d0fc6df7 100644 --- a/development/tsdb-blocks-storage-swift-single-binary/dev.dockerfile +++ b/development/tsdb-blocks-storage-swift-single-binary/dev.dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.17 +FROM alpine:3.18 RUN mkdir /cortex WORKDIR /cortex diff --git a/packaging/fpm/Dockerfile b/packaging/fpm/Dockerfile index 2796d540bf..e8cd025387 100644 --- a/packaging/fpm/Dockerfile +++ b/packaging/fpm/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.17 +FROM alpine:3.18 RUN apk add --no-cache \ ruby \ diff --git a/pkg/querier/testutils.go b/pkg/querier/testutils.go index 650d93f727..a60e6761f5 100644 --- a/pkg/querier/testutils.go +++ b/pkg/querier/testutils.go @@ -2,16 +2,17 @@ package querier import ( "context" - "github.com/cortexproject/cortex/pkg/cortexpb" - "github.com/cortexproject/cortex/pkg/util/limiter" + "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/scrape" "github.com/stretchr/testify/mock" + "github.com/cortexproject/cortex/pkg/cortexpb" "github.com/cortexproject/cortex/pkg/ingester/client" "github.com/cortexproject/cortex/pkg/prom1/storage/metric" "github.com/cortexproject/cortex/pkg/util/flagext" + "github.com/cortexproject/cortex/pkg/util/limiter" "github.com/cortexproject/cortex/pkg/util/validation" )