Skip to content

Cherrypick commits for 1.16.1 #5885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/test-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.16.0
1.16.1
4 changes: 2 additions & 2 deletions build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand All @@ -23,7 +23,7 @@ RUN GOARCH=$(go env GOARCH) && \
chmod +x shfmt && \
mv shfmt /usr/bin

RUN curl -sfL https://github.com/raw/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.51.2
RUN curl -sfL https://github.com/raw/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/[email protected] &&\
Expand Down
2 changes: 1 addition & 1 deletion cmd/cortex/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.18
ARG TARGETARCH

RUN apk add --no-cache ca-certificates
Expand Down
2 changes: 1 addition & 1 deletion cmd/query-tee/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.18
ARG TARGETARCH

RUN apk add --no-cache ca-certificates
Expand Down
2 changes: 1 addition & 1 deletion cmd/test-exporter/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanosconvert/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion development/tsdb-blocks-storage-s3-gossip/dev.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.18

RUN mkdir /cortex
WORKDIR /cortex
Expand Down
2 changes: 1 addition & 1 deletion development/tsdb-blocks-storage-s3/dev.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.18

RUN mkdir /cortex
WORKDIR /cortex
Expand Down
2 changes: 1 addition & 1 deletion packaging/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.18

RUN apk add --no-cache \
ruby \
Expand Down
5 changes: 3 additions & 2 deletions pkg/querier/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
Loading