Skip to content

Commit 5461a54

Browse files
authored
Merge branch 'cortexproject:master' into query-rejection
2 parents c7ad0a0 + 79ef088 commit 5461a54

File tree

197 files changed

+7781
-3510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+7781
-3510
lines changed

.github/workflows-doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ As of October 2020, GitHub Actions do not persist between different jobs in the
6969
- name: Compressing Images
7070
run: tar -zcvf images.tar.gz /tmp/images
7171
- name: Cache Images
72-
uses: actions/upload-artifact@v2
72+
uses: actions/upload-artifact@v4
7373
with:
7474
name: Docker Images
7575
path: ./images.tar.gz

.github/workflows/build-image.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build Image
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- 'build-image/**'
8+
- '.github/workflows/build-image.yml'
9+
pull_request:
10+
branches: [ master ]
11+
paths:
12+
- 'build-image/**'
13+
- '.github/workflows/build-image.yml'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-24.04
18+
steps:
19+
- uses: actions/checkout@v4
20+
name: Checkout
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Save image
31+
run: make save-multiarch-build-image
32+
33+
- name: Upload Docker Images Artifacts
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: build-image
37+
path: |
38+
./build-image-amd64.tar
39+
./build-image-arm64.tar
40+
if-no-files-found: error
41+
42+
push:
43+
needs: build
44+
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
45+
runs-on: ubuntu-24.04
46+
steps:
47+
- uses: actions/checkout@v4
48+
name: Checkout
49+
with:
50+
fetch-depth: 0
51+
52+
- name: Download Docker Images Artifacts
53+
uses: actions/download-artifact@v4
54+
with:
55+
name: build-image
56+
57+
- name: Load image
58+
run: make load-multiarch-build-image
59+
60+
- name: Login to Quay.io
61+
uses: docker/login-action@v3
62+
with:
63+
registry: quay.io
64+
username: ${{secrets.QUAY_REGISTRY_USER}}
65+
password: ${{secrets.QUAY_REGISTRY_PASSWORD}}
66+
67+
- name: Push image
68+
run: make push-multiarch-build-image

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

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ on:
55
branches: [master]
66
tags:
77
- v[0-9]+.[0-9]+.[0-9]+** # Tag filters not as strict due to different regex system on Github Actions
8+
paths-ignore:
9+
- 'build-image/**'
10+
- '.github/workflows/build-image.yml'
811
pull_request:
12+
paths-ignore:
13+
- 'build-image/**'
14+
- '.github/workflows/build-image.yml'
915

1016
jobs:
1117
lint:
1218
runs-on: ubuntu-20.04
1319
container:
14-
image: quay.io/cortexproject/build-image:node_version_upgrade-60582e680
20+
image: quay.io/cortexproject/build-image:master-2866917df
1521
steps:
1622
- name: Checkout Repo
1723
uses: actions/checkout@v2
@@ -40,7 +46,7 @@ jobs:
4046
test:
4147
runs-on: ubuntu-20.04
4248
container:
43-
image: quay.io/cortexproject/build-image:node_version_upgrade-60582e680
49+
image: quay.io/cortexproject/build-image:master-2866917df
4450
steps:
4551
- name: Checkout Repo
4652
uses: actions/checkout@v2
@@ -83,7 +89,7 @@ jobs:
8389
build:
8490
runs-on: ubuntu-20.04
8591
container:
86-
image: quay.io/cortexproject/build-image:node_version_upgrade-60582e680
92+
image: quay.io/cortexproject/build-image:master-2866917df
8793
steps:
8894
- name: Checkout Repo
8995
uses: actions/checkout@v2
@@ -107,7 +113,7 @@ jobs:
107113
touch build-image/.uptodate
108114
make BUILD_IN_CONTAINER=false web-build
109115
- name: Upload Website Artifact
110-
uses: actions/upload-artifact@v2
116+
uses: actions/upload-artifact@v4
111117
with:
112118
name: website public
113119
path: website/public/
@@ -119,7 +125,7 @@ jobs:
119125
- name: Create Docker Images Archive
120126
run: tar -cvf images.tar /tmp/images
121127
- name: Upload Docker Images Artifact
122-
uses: actions/upload-artifact@v2
128+
uses: actions/upload-artifact@v4
123129
with:
124130
name: Docker Images
125131
path: ./images.tar
@@ -142,7 +148,7 @@ jobs:
142148
- name: Upgrade golang
143149
uses: actions/setup-go@v2
144150
with:
145-
go-version: 1.21.9
151+
go-version: 1.21.11
146152
- name: Checkout Repo
147153
uses: actions/checkout@v2
148154
- name: Install Docker Client
@@ -152,7 +158,7 @@ jobs:
152158
sudo mkdir -p /go/src/github.com/cortexproject/cortex
153159
sudo ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/cortex
154160
- name: Download Docker Images Artifacts
155-
uses: actions/download-artifact@v2
161+
uses: actions/download-artifact@v4
156162
with:
157163
name: Docker Images
158164
- name: Extract Docker Images Archive
@@ -207,7 +213,7 @@ jobs:
207213
- name: Install Docker Client
208214
run: sudo ./.github/workflows/scripts/install-docker.sh
209215
- name: Download Docker Images Artifact
210-
uses: actions/download-artifact@v2
216+
uses: actions/download-artifact@v4
211217
with:
212218
name: Docker Images
213219
- name: Extract Docker Images Archive
@@ -217,14 +223,14 @@ jobs:
217223
run: |
218224
touch build-image/.uptodate
219225
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations
220-
make BUILD_IMAGE=quay.io/cortexproject/build-image:node_version_upgrade-60582e680 TTY='' configs-integration-test
226+
make BUILD_IMAGE=quay.io/cortexproject/build-image:master-2866917df TTY='' configs-integration-test
221227
222228
deploy_website:
223229
needs: [build, test]
224230
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
225231
runs-on: ubuntu-20.04
226232
container:
227-
image: quay.io/cortexproject/build-image:node_version_upgrade-60582e680
233+
image: quay.io/cortexproject/build-image:master-2866917df
228234
steps:
229235
- name: Checkout Repo
230236
uses: actions/checkout@v2
@@ -241,7 +247,7 @@ jobs:
241247
mkdir -p /go/src/github.com/cortexproject/cortex
242248
ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/cortex
243249
- name: Download Website Artifact
244-
uses: actions/download-artifact@v2
250+
uses: actions/download-artifact@v4
245251
with:
246252
name: website public
247253
path: website/public
@@ -266,7 +272,7 @@ jobs:
266272
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
267273
runs-on: ubuntu-20.04
268274
container:
269-
image: quay.io/cortexproject/build-image:node_version_upgrade-60582e680
275+
image: quay.io/cortexproject/build-image:master-2866917df
270276
steps:
271277
- name: Checkout Repo
272278
uses: actions/checkout@v2
@@ -282,7 +288,7 @@ jobs:
282288
mkdir -p /go/src/github.com/cortexproject/cortex
283289
ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/cortex
284290
- name: Download Docker Images Artifact
285-
uses: actions/download-artifact@v2
291+
uses: actions/download-artifact@v4
286292
with:
287293
name: Docker Images
288294
- name: Extract Docker Images Archive

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ Makefile.local
2727
.vscode
2828
compose
2929
compose-simple
30+
31+
/build-image-arm64.tar
32+
/build-image-amd64.tar

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515
* [ENHANCEMENT] KV: Etcd Added etcd.ping-without-stream-allowed parameter to disable/enable PermitWithoutStream #5933
1616
* [ENHANCEMENT] Ingester: Add a new `limits_per_label_set` limit. This limit functions similarly to `max_series_per_metric`, but allowing users to define the maximum number of series per LabelSet. #5950 #5993
1717
* [ENHANCEMENT] Store Gateway: Log gRPC requests together with headers configured in `http_request_headers_to_log`. #5958
18+
* [ENHANCEMENT] Upgrade Alpine to 3.19. #6014
19+
* [ENHANCEMENT] Upgrade go to 1.21.11 #6014
1820
* [BUGFIX] Configsdb: Fix endline issue in db password. #5920
1921
* [BUGFIX] Ingester: Fix `user` and `type` labels for the `cortex_ingester_tsdb_head_samples_appended_total` TSDB metric. #5952
22+
* [BUGFIX] Querier: Enforce max query length check for `/api/v1/series` API even though `ignoreMaxQueryLength` is set to true. #6018
2023

2124
## 1.17.1 2024-05-20
2225

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Alan Protasio, Amazon Web Services <[email protected]> (@alanprot)
22
Alvin Lin, Amazon Web Services <[email protected]> (@alvinlin123)
33
Ben Ye, Amazon Web Services <[email protected]> (@yeya24)
4+
Charlie Le, Apple <[email protected]> (@CharlieTLe)
45
Friedrich Gonzalez, Adobe <[email protected]> (@friedrichg)

Makefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,7 @@ fetch-build-image:
5353
docker tag $(BUILD_IMAGE):$(LATEST_BUILD_IMAGE_TAG) $(BUILD_IMAGE):latest
5454
touch build-image/.uptodate
5555

56-
push-multiarch-build-image:
57-
@echo
58-
# Build image for each platform separately... it tends to generate fewer errors.
59-
$(SUDO) docker buildx build --platform linux/amd64 --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) build-image/
60-
$(SUDO) docker buildx build --platform linux/arm64 --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) build-image/
61-
# This command will run the same build as above, but it will reuse existing platform-specific images,
62-
# put them together and push to registry.
63-
$(SUDO) docker buildx build -o type=registry --platform linux/amd64,linux/arm64 --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) -t $(IMAGE_PREFIX)build-image:$(IMAGE_TAG) build-image/
56+
-include build-image/Makefile
6457

6558
# We don't want find to scan inside a bunch of directories, to accelerate the
6659
# 'make: Entering directory '/go/src/github.com/cortexproject/cortex' phase.
@@ -122,7 +115,7 @@ build-image/$(UPTODATE): build-image/*
122115
SUDO := $(shell docker info >/dev/null 2>&1 || echo "sudo -E")
123116
BUILD_IN_CONTAINER := true
124117
BUILD_IMAGE ?= $(IMAGE_PREFIX)build-image
125-
LATEST_BUILD_IMAGE_TAG ?= node_version_upgrade-60582e680
118+
LATEST_BUILD_IMAGE_TAG ?= master-2866917df
126119

127120
# TTY is parameterized to allow Google Cloud Builder to run builds,
128121
# 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.21.9-bullseye
1+
FROM golang:1.21.11-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 && \

build-image/Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
save-multiarch-build-image:
2+
@echo
3+
# Build image for each platform separately... it tends to generate fewer errors.
4+
$(SUDO) docker buildx build --platform linux/amd64 --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) -t $(IMAGE_PREFIX)build-image:$(IMAGE_TAG)-amd64 --output type=docker,dest=./build-image-amd64.tar build-image/
5+
$(SUDO) docker buildx build --platform linux/arm64 --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) -t $(IMAGE_PREFIX)build-image:$(IMAGE_TAG)-arm64 --output type=docker,dest=./build-image-arm64.tar build-image/
6+
7+
load-multiarch-build-image:
8+
$(SUDO) docker load -i build-image-amd64.tar
9+
$(SUDO) docker load -i build-image-arm64.tar
10+
11+
push-multiarch-build-image:
12+
# This command will run the same build as multiarch-build-image, but it will reuse existing platform-specific images,
13+
# put them together and push to registry.
14+
$(SUDO) docker push $(IMAGE_PREFIX)build-image:${IMAGE_TAG}-amd64
15+
$(SUDO) docker push $(IMAGE_PREFIX)build-image:${IMAGE_TAG}-arm64
16+
$(SUDO) docker manifest create $(IMAGE_PREFIX)build-image:$(IMAGE_TAG) --amend $(IMAGE_PREFIX)build-image:${IMAGE_TAG}-amd64 --amend $(IMAGE_PREFIX)build-image:${IMAGE_TAG}-arm64
17+
$(SUDO) docker manifest push $(IMAGE_PREFIX)build-image:$(IMAGE_TAG)

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.18
1+
FROM alpine:3.19
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.18
1+
FROM alpine:3.19
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.18
1+
FROM alpine:3.19
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.18
1+
FROM alpine:3.19
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
@@ -1,4 +1,4 @@
1-
FROM golang:1.18
1+
FROM golang:1.19
22
ENV CGO_ENABLED=0
33
RUN go get github.com/go-delve/delve/cmd/dlv
44

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.18
1+
FROM alpine:3.19
22

33
RUN mkdir /cortex
44
WORKDIR /cortex

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

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

5-
FROM alpine:3.18
5+
FROM alpine:3.19
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.18
1+
FROM alpine:3.19
22

33
RUN mkdir /cortex
44
WORKDIR /cortex

docs/api/_index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,18 @@ _For more information, please check out Prometheus [Remote storage integrations]
212212

213213
_Requires [authentication](#authentication)._
214214

215+
### OTLP Receiver
216+
217+
```
218+
POST /api/v1/otlp/v1/metrics
219+
```
220+
221+
Entrypoint for the OTLP Receiver
222+
223+
This API endpoint accepts a HTTP POST request using [OTLP](https://opentelemetry.io/docs/specs/otlp/) format
224+
225+
_Requires [authentication](#authentication)._
226+
215227
### Distributor ring status
216228

217229
```

docs/contributing/how-to-update-the-build-image.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ weight: 5
55
slug: how-to-update-the-build-image
66
---
77

8-
The build image currently can only be updated by a Cortex maintainer. If you're not a maintainer you can still open a PR with the changes, asking a maintainer to assist you publishing the updated image. The procedure is:
8+
The procedure is:
99

1010
1. Update `build-image/Dockerfile`
11-
1. Run `go env` and make sure `GOPROXY=https://proxy.golang.org,direct` (Go's default). Some environment may required `GOPROXY=direct`, and if you push a build image with this, build workflow on GitHub will take a lot longer to download modules.
12-
1. `docker login quay.io`. Note that pushing to `quay.io/cortexproject/build-image` repository can only be done by a maintainer.
13-
1. Build the and publish the image by using `make push-multiarch-build-image`. This will build and push multi-platform docker image (for linux/amd64 and linux/arm64). Running this step successfully requires [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/), but does not require a specific platform.
14-
1. Replace the image tag in `.github/workflows/*` (_there may be multiple references_) and Makefile (variable `LATEST_BUILD_IMAGE_TAG`).
11+
1. Create a PR to master with that changed, after the PR is merged to master, the new build image is available in the quay.io repository. Check github action logs [here](https://github.com/cortexproject/cortex/actions/workflows/build-image.yml) for to find the image tag.
12+
1. Create another PR to replace the image tag in `.github/workflows/*` (_there may be multiple references_) and Makefile (variable `LATEST_BUILD_IMAGE_TAG`).
1513
1. If you are updating Go's runtime version be sure to change `actions/setup-go`'s `go-version` in ``.github/workflows/*`.
1614
1. Open a PR and make sure the CI with new build-image passes

docs/getting-started/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORTEX_VERSION=v1.17.0
1+
CORTEX_VERSION=v1.17.1
22
GRAFANA_VERSION=10.4.2
33
PROMETHEUS_VERSION=v2.51.2
44
SEAWEEDFS_VERSION=3.67

0 commit comments

Comments
 (0)