Skip to content

Commit 0d2574f

Browse files
authored
Merge branch 'master' into partitioning-compaction
Signed-off-by: Alex Le <[email protected]>
2 parents 0d295f1 + c0e4545 commit 0d2574f

File tree

347 files changed

+13677
-14358
lines changed

Some content is hidden

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

347 files changed

+13677
-14358
lines changed

.github/workflows/scripts/install-docker.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ set -x
44
VER="20.10.19"
55
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
66
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
7+
mkdir -vp ~/.docker/cli-plugins/
8+
curl --silent -L "https://github.com/docker/buildx/releases/download/v0.3.0/buildx-v0.3.0.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
9+
chmod a+x ~/.docker/cli-plugins/docker-buildx
710
mv /tmp/docker/* /usr/bin
11+
docker run --privileged --rm tonistiigi/binfmt --install all

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

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ jobs:
8888
integration:
8989
needs: build
9090
runs-on: ubuntu-20.04
91+
strategy:
92+
fail-fast: false
93+
matrix:
94+
tags:
95+
- requires_docker
96+
- integration_alertmanager
97+
- integration_backward_compatibility
98+
- integration_memberlist
99+
- integration_querier
100+
- integration_ruler
91101
steps:
92102
- name: Upgrade golang
93103
uses: actions/setup-go@v2
@@ -116,35 +126,30 @@ jobs:
116126
# locally and the download time doesn't account in the test execution time, which is subject
117127
# to a timeout
118128
run: |
119-
docker pull minio/minio:RELEASE.2019-12-30T05-45-39Z
120-
docker pull amazon/dynamodb-local:1.11.477
129+
docker pull minio/minio:RELEASE.2021-10-13T00-23-17Z
121130
docker pull consul:1.8.4
122131
docker pull gcr.io/etcd-development/etcd:v3.4.7
123-
docker pull quay.io/cortexproject/cortex:v1.0.0
124-
docker pull quay.io/cortexproject/cortex:v1.1.0
125-
docker pull quay.io/cortexproject/cortex:v1.2.0
126-
docker pull quay.io/cortexproject/cortex:v1.3.0
127-
docker pull quay.io/cortexproject/cortex:v1.4.0
128-
docker pull quay.io/cortexproject/cortex:v1.5.0
129-
docker pull quay.io/cortexproject/cortex:v1.6.0
130-
docker pull quay.io/cortexproject/cortex:v1.7.0
131-
docker pull quay.io/cortexproject/cortex:v1.8.0
132-
docker pull quay.io/cortexproject/cortex:v1.9.0
133-
docker pull quay.io/cortexproject/cortex:v1.10.0
134-
docker pull quay.io/cortexproject/cortex:v1.11.1
135-
docker pull quay.io/cortexproject/cortex:v1.13.1
136-
docker pull quay.io/cortexproject/cortex:v1.14.0
137-
docker pull shopify/bigtable-emulator:0.1.0
132+
if [ "$TEST_TAGS" = "integration_backward_compatibility" ]; then
133+
docker pull quay.io/cortexproject/cortex:v1.6.0
134+
docker pull quay.io/cortexproject/cortex:v1.7.0
135+
docker pull quay.io/cortexproject/cortex:v1.8.0
136+
docker pull quay.io/cortexproject/cortex:v1.9.0
137+
docker pull quay.io/cortexproject/cortex:v1.10.0
138+
docker pull quay.io/cortexproject/cortex:v1.11.1
139+
docker pull quay.io/cortexproject/cortex:v1.13.1
140+
docker pull quay.io/cortexproject/cortex:v1.14.0
141+
fi
138142
docker pull memcached:1.6.1
139-
docker pull bouncestorage/swift-aio:55ba4331
143+
env:
144+
TEST_TAGS: ${{ matrix.tags }}
140145
- name: Integration Tests
141146
run: |
142147
export CORTEX_IMAGE_PREFIX="${IMAGE_PREFIX:-quay.io/cortexproject/}"
143148
export IMAGE_TAG=$(make image-tag)
144-
export CORTEX_IMAGE="${CORTEX_IMAGE_PREFIX}cortex:$IMAGE_TAG"
149+
export CORTEX_IMAGE="${CORTEX_IMAGE_PREFIX}cortex:$IMAGE_TAG-amd64"
145150
export CORTEX_CHECKOUT_DIR="/go/src/github.com/cortexproject/cortex"
146151
echo "Running integration tests with image: $CORTEX_IMAGE"
147-
go test -tags=requires_docker -timeout 2400s -v -count=1 ./integration/...
152+
go test -tags=integration,${{ matrix.tags }} -timeout 2400s -v -count=1 ./integration/...
148153
env:
149154
IMAGE_PREFIX: ${{ secrets.IMAGE_PREFIX }}
150155

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ run:
3333
build-tags:
3434
- netgo
3535
- requires_docker
36+
- integration
37+
- integration_alertmanager
38+
- integration_backward_compatibility
39+
- integration_memberlist
40+
- integration_querier
41+
- integration_ruler

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
# Changelog
22

33
## master / unreleased
4+
* [CHANGE] Alertmanager: Local file disclosure vulnerability in OpsGenie configuration has been fixed. #5045
45
* [ENHANCEMENT] Update Go version to 1.19.3. #4988
56
* [ENHANCEMENT] Querier: limit series query to only ingesters if `start` param is not specified. #4976
67
* [ENHANCEMENT] Query-frontend/scheduler: add a new limit `frontend.max-outstanding-requests-per-tenant` for configuring queue size per tenant. Started deprecating two flags `-query-scheduler.max-outstanding-requests-per-tenant` and `-querier.max-outstanding-requests-per-tenant`, and change their value default to 0. Now if both the old flag and new flag are specified, the old flag's queue size will be picked. #5005
78
* [ENHANCEMENT] Query-tee: Add `/api/v1/query_exemplars` API endpoint support. #5010
9+
* [ENHANCEMENT] Let blocks_cleaner delete blocks concurrently(default 16 goroutines). #5028
10+
* [ENHANCEMENT] Query Frontend/Query Scheduler: Increase upper bound to 60s for queue duration histogram metric. #5029
11+
* [ENHANCEMENT] Query Frontend: Log Vertical sharding information when `query_stats_enabled` is enabled. #5037
12+
* [ENHANCEMENT] Ingester: The metadata APIs should honour `querier.query-ingesters-within` when `querier.query-store-for-labels-enabled` is true. #5027
13+
* [ENHANCEMENT] Query Frontend: Skip instant query roundtripper if sharding is not applicable. #5062
814
* [FEATURE] Querier/Query Frontend: support Prometheus /api/v1/status/buildinfo API. #4978
915
* [FEATURE] Ingester: Add active series to all_user_stats page. #4972
1016
* [FEATURE] Ingester: Added `-blocks-storage.tsdb.head-chunks-write-queue-size` allowing to configure the size of the in-memory queue used before flushing chunks to the disk . #5000
1117
* [FEATURE] Query Frontend: Log query params in query frontend even if error happens. #5005
1218
* [FEATURE] Ingester: Enable snapshotting of In-memory TSDB on disk during shutdown via `-blocks-storage.tsdb.memory-snapshot-on-shutdown`. #5011
19+
* [FEATURE] Query Frontend/Scheduler: Add a new counter metric `cortex_request_queue_requests_total` for total requests going to queue. #5030
20+
* [FEATURE] Build ARM docker images. #5041
21+
* [FEATURE] Query-frontend/Querier: Create spans to measure time to merge promql responses. #5041
1322
* [BUGFIX] Updated `golang.org/x/net` dependency to fix CVE-2022-27664. #5008
23+
* [BUGFIX] Fix panic when otel and xray tracing is enabled. #5044
24+
* [BUGFIX] Fixed no compact block got grouped in shuffle sharding grouper. #5055
25+
* [BUGFIX] Tracing: Fix missing object storage span instrumentation. #5074
1426

1527
## 1.14.0 2022-12-02
1628

Makefile

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
VERSION=$(shell cat "./VERSION" 2> /dev/null)
1010
GOPROXY_VALUE=$(shell go env GOPROXY)
1111

12+
# ARCHS
13+
ARCHS = amd64 arm64
14+
1215
# Boiler plate for building Docker containers.
1316
# All this must go at top of file I'm afraid.
1417
IMAGE_PREFIX ?= quay.io/cortexproject/
@@ -37,8 +40,9 @@ SED ?= $(shell which gsed 2>/dev/null || which sed)
3740
# Dependencies (i.e. things that go in the image) still need to be explicitly
3841
# declared.
3942
%/$(UPTODATE): %/Dockerfile
40-
@echo
41-
$(SUDO) docker build --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) -t $(IMAGE_PREFIX)$(shell basename $(@D)) -t $(IMAGE_PREFIX)$(shell basename $(@D)):$(IMAGE_TAG) $(@D)/
43+
for arch in $(ARCHS); do \
44+
$(SUDO) docker buildx build --platform linux/$$arch --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) -t $(IMAGE_PREFIX)$(shell basename $(@D)) -t $(IMAGE_PREFIX)$(shell basename $(@D)):$(IMAGE_TAG)-$$arch $(@D)/ ; \
45+
done
4246
@echo
4347
@echo Please use push-multiarch-build-image to build and push build image for all supported architectures.
4448
touch $@
@@ -160,7 +164,11 @@ else
160164
exes: $(EXES)
161165

162166
$(EXES):
163-
CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./$(@D)
167+
@for arch in $(ARCHS); do \
168+
echo "Building $@ for $$arch";\
169+
CGO_ENABLED=0 GOARCH=$$arch GOOS=linux go build $(GO_FLAGS) -o $@-$$arch ./$(@D); \
170+
done
171+
164172

165173
protos: $(PROTO_GOS)
166174

@@ -176,7 +184,7 @@ lint:
176184
golangci-lint run
177185

178186
# Ensure no blocklisted package is imported.
179-
GOFLAGS="-tags=requires_docker" faillint -paths "github.com/bmizerany/assert=github.com/stretchr/testify/assert,\
187+
GOFLAGS="-tags=requires_docker,integration,integration_alertmanager,integration_backward_compatibility,integration_memberlist,integration_querier,integration_ruler" faillint -paths "github.com/bmizerany/assert=github.com/stretchr/testify/assert,\
180188
golang.org/x/net/context=context,\
181189
sync/atomic=go.uber.org/atomic,\
182190
github.com/prometheus/client_golang/prometheus.{MultiError}=github.com/prometheus/prometheus/tsdb/errors.{NewMulti},\
@@ -272,16 +280,20 @@ clean-protos:
272280

273281
save-images:
274282
@mkdir -p docker-images
275-
for image_name in $(IMAGE_NAMES); do \
283+
@for image_name in $(IMAGE_NAMES); do \
276284
if ! echo $$image_name | grep build; then \
277-
docker save $$image_name:$(IMAGE_TAG) -o docker-images/$$(echo $$image_name | tr "/" _):$(IMAGE_TAG); \
285+
for arch in $(ARCHS); do \
286+
docker save $$image_name:$(IMAGE_TAG)-$$arch -o docker-images/$$(echo $$image_name | tr "/" _):$(IMAGE_TAG)-$$arch; \
287+
done;\
278288
fi \
279289
done
280290

281291
load-images:
282-
for image_name in $(IMAGE_NAMES); do \
292+
@for image_name in $(IMAGE_NAMES); do \
283293
if ! echo $$image_name | grep build; then \
284-
docker load -i docker-images/$$(echo $$image_name | tr "/" _):$(IMAGE_TAG); \
294+
for arch in $(ARCHS); do \
295+
docker load -i docker-images/$$(echo $$image_name | tr "/" _):$(IMAGE_TAG)-$$arch; \
296+
done;\
285297
fi \
286298
done
287299

cmd/cortex/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
FROM alpine:3.14
2+
ARG TARGETARCH
3+
24
RUN apk add --no-cache ca-certificates
35
COPY migrations /migrations/
4-
COPY cortex /bin/cortex
6+
COPY cortex-$TARGETARCH /bin/cortex
57
EXPOSE 80
68
ENTRYPOINT [ "/bin/cortex" ]
79

cmd/query-tee/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
FROM alpine:3.14
2+
ARG TARGETARCH
3+
24
RUN apk add --no-cache ca-certificates
3-
COPY query-tee /
5+
COPY query-tee-$TARGETARCH /query-tee
46
ENTRYPOINT ["/query-tee"]
57

68
ARG revision

cmd/test-exporter/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM alpine:3.14
2+
ARG TARGETARCH
23
RUN apk add --no-cache ca-certificates
3-
COPY test-exporter /
4+
COPY test-exporter-$TARGETARCH /test-exporter
45
ENTRYPOINT ["/test-exporter"]
56

67
ARG revision

cmd/thanosconvert/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM alpine:3.14
2+
ARG TARGETARCH
23
RUN apk add --no-cache ca-certificates
3-
COPY thanosconvert /
4+
COPY thanosconvert-$TARGETARCH /thanosconvert
45
ENTRYPOINT ["/thanosconvert"]
56

67
ARG revision

docs/blocks-storage/querier.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ querier:
131131
# CLI flag: -querier.query-ingesters-within
132132
[query_ingesters_within: <duration> | default = 0s]
133133

134-
# Query long-term store for series, label values and label names APIs. Works
135-
# only with blocks engine.
134+
# Deprecated (Querying long-term store for labels will be always enabled in
135+
# the future.): Query long-term store for series, label values and label names
136+
# APIs.
136137
# CLI flag: -querier.query-store-for-labels-enabled
137138
[query_store_for_labels_enabled: <boolean> | default = false]
138139

0 commit comments

Comments
 (0)