Skip to content

Commit dd117d7

Browse files
committed
Merge branch 'master' into partitioning-compaction
Signed-off-by: Alex Le <[email protected]>
2 parents b872dad + 654600d commit dd117d7

File tree

1,951 files changed

+263611
-57078
lines changed

Some content is hidden

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

1,951 files changed

+263611
-57078
lines changed

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

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ jobs:
1111
lint:
1212
runs-on: ubuntu-20.04
1313
container:
14-
image: quay.io/cortexproject/build-image:upgrade-to-go1.19.3-e8b98ddc0
14+
image: quay.io/cortexproject/build-image:upgrade-to-go1.20.1-pr-5159
1515
steps:
1616
- name: Checkout Repo
1717
uses: actions/checkout@v2
18+
- name: Setup Git safe.directory
19+
run: |
20+
echo "this step is needed because when running in container, actions/checkout does not set safe.directory effectively."
21+
echo "See https://github.com/actions/runner/issues/2033. We should use --system instead of --global"
22+
git config --system --add safe.directory $GITHUB_WORKSPACE
1823
# Commands in the Makefile are hardcoded with an assumed file structure of the CI container
1924
# Symlink ensures paths specified in previous commands don’t break
2025
- name: Sym Link Expected Path to Workspace
@@ -35,10 +40,15 @@ jobs:
3540
test:
3641
runs-on: ubuntu-20.04
3742
container:
38-
image: quay.io/cortexproject/build-image:upgrade-to-go1.19.3-e8b98ddc0
43+
image: quay.io/cortexproject/build-image:upgrade-to-go1.20.1-pr-5159
3944
steps:
4045
- name: Checkout Repo
4146
uses: actions/checkout@v2
47+
- name: Setup Git safe.directory
48+
run: |
49+
echo "this step is needed because when running in container, actions/checkout does not set safe.directory effectively."
50+
echo "See https://github.com/actions/runner/issues/2033. We should use --system instead of --global"
51+
git config --system --add safe.directory $GITHUB_WORKSPACE
4252
- name: Sym Link Expected Path to Workspace
4353
run: |
4454
mkdir -p /go/src/github.com/cortexproject/cortex
@@ -49,10 +59,15 @@ jobs:
4959
build:
5060
runs-on: ubuntu-20.04
5161
container:
52-
image: quay.io/cortexproject/build-image:upgrade-to-go1.19.3-e8b98ddc0
62+
image: quay.io/cortexproject/build-image:upgrade-to-go1.20.1-pr-5159
5363
steps:
5464
- name: Checkout Repo
5565
uses: actions/checkout@v2
66+
- name: Setup Git safe.directory
67+
run: |
68+
echo "this step is needed because when running in container, actions/checkout does not set safe.directory effectively."
69+
echo "See https://github.com/actions/runner/issues/2033. We should use --system instead of --global"
70+
git config --system --add safe.directory $GITHUB_WORKSPACE
5671
- name: Install Docker Client
5772
run: ./.github/workflows/scripts/install-docker.sh
5873
- name: Sym Link Expected Path to Workspace
@@ -92,17 +107,18 @@ jobs:
92107
fail-fast: false
93108
matrix:
94109
tags:
95-
- requires_docker
96-
- integration_alertmanager
97-
- integration_backward_compatibility
98-
- integration_memberlist
99-
- integration_querier
100-
- integration_ruler
110+
- requires_docker
111+
- integration_alertmanager
112+
- integration_backward_compatibility
113+
- integration_memberlist
114+
- integration_querier
115+
- integration_ruler
116+
- integration_query_fuzz
101117
steps:
102118
- name: Upgrade golang
103119
uses: actions/setup-go@v2
104120
with:
105-
go-version: 1.19.x
121+
go-version: 1.20.1
106122
- name: Checkout Repo
107123
uses: actions/checkout@v2
108124
- name: Install Docker Client
@@ -137,9 +153,14 @@ jobs:
137153
docker pull quay.io/cortexproject/cortex:v1.10.0
138154
docker pull quay.io/cortexproject/cortex:v1.11.1
139155
docker pull quay.io/cortexproject/cortex:v1.13.1
156+
docker pull quay.io/cortexproject/cortex:v1.13.2
140157
docker pull quay.io/cortexproject/cortex:v1.14.0
158+
docker pull quay.io/cortexproject/cortex:v1.14.1
159+
docker pull quay.io/cortexproject/cortex:v1.15.0
160+
docker pull quay.io/cortexproject/cortex:v1.15.1
141161
fi
142162
docker pull memcached:1.6.1
163+
docker pull redis:7.0.4-alpine
143164
env:
144165
TEST_TAGS: ${{ matrix.tags }}
145166
- name: Integration Tests
@@ -172,20 +193,25 @@ jobs:
172193
run: |
173194
touch build-image/.uptodate
174195
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations
175-
make BUILD_IMAGE=quay.io/cortexproject/build-image:upgrade-to-go1.19.3-e8b98ddc0 TTY='' configs-integration-test
196+
make BUILD_IMAGE=quay.io/cortexproject/build-image:upgrade-to-go1.20.1-pr-5159 TTY='' configs-integration-test
176197
177198
deploy_website:
178199
needs: [build, test]
179200
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
180201
runs-on: ubuntu-20.04
181202
container:
182-
image: quay.io/cortexproject/build-image:upgrade-to-go1.19.3-e8b98ddc0
203+
image: quay.io/cortexproject/build-image:upgrade-to-go1.20.1-pr-5159
183204
steps:
184205
- name: Checkout Repo
185206
uses: actions/checkout@v2
186207
with:
187208
# web-deploy script expects repo to be cloned with ssh for some commands to work
188209
ssh-key: ${{ secrets.WEBSITE_DEPLOY_SSH_PRIVATE_KEY }}
210+
- name: Setup Git safe.directory
211+
run: |
212+
echo "this step is needed because when running in container, actions/checkout does not set safe.directory effectively."
213+
echo "See https://github.com/actions/runner/issues/2033. We should use --system instead of --global"
214+
git config --system --add safe.directory $GITHUB_WORKSPACE
189215
- name: Sym Link Expected Path to Workspace
190216
run: |
191217
mkdir -p /go/src/github.com/cortexproject/cortex
@@ -216,10 +242,15 @@ jobs:
216242
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
217243
runs-on: ubuntu-20.04
218244
container:
219-
image: quay.io/cortexproject/build-image:upgrade-to-go1.19.3-e8b98ddc0
245+
image: quay.io/cortexproject/build-image:upgrade-to-go1.20.1-pr-5159
220246
steps:
221247
- name: Checkout Repo
222248
uses: actions/checkout@v2
249+
- name: Setup Git safe.directory
250+
run: |
251+
echo "this step is needed because when running in container, actions/checkout does not set safe.directory effectively."
252+
echo "See https://github.com/actions/runner/issues/2033. We should use --system instead of --global"
253+
git config --system --add safe.directory $GITHUB_WORKSPACE
223254
- name: Install Docker Client
224255
run: ./.github/workflows/scripts/install-docker.sh
225256
- name: Sym link Expected Path to Workspace

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ run:
3939
- integration_memberlist
4040
- integration_querier
4141
- integration_ruler
42+
- integration_query_fuzz

CHANGELOG.md

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

33
## master / unreleased
4+
* [CHANGE] Alertmanager: Validating new fields on the PagerDuty AM config. #5290
5+
* [CHANGE] Ingester: Creating label `native-histogram-sample` on the `cortex_discarded_samples_total` to keep track of discarded native histogram samples. #5289
6+
* [FEATURE] Store Gateway: Add `max_downloaded_bytes_per_request` to limit max bytes to download per store gateway request.
7+
* [BUGFIX] Ruler: Validate if rule group can be safely converted back to rule group yaml from protobuf message #5265
8+
* [BUGFIX] Querier: Convert gRPC `ResourceExhausted` status code from store gateway to 422 limit error. #5286
9+
* [BUGFIX] Alertmanager: Route web-ui requests to the alertmanager distributor when sharding is enabled. #5293
10+
11+
## 1.15.1 2023-04-26
12+
13+
* [CHANGE] Alertmanager: Validating new fields on the PagerDuty AM config. #5290
14+
* [BUGFIX] Querier: Convert gRPC `ResourceExhausted` status code from store gateway to 422 limit error. #5286
15+
16+
## 1.15.0 2023-04-19
17+
18+
* [CHANGE] Storage: Make Max exemplars config per tenant instead of global configuration. #5080 #5122
419
* [CHANGE] Alertmanager: Local file disclosure vulnerability in OpsGenie configuration has been fixed. #5045
5-
* [ENHANCEMENT] Update Go version to 1.19.3. #4988
6-
* [ENHANCEMENT] Querier: limit series query to only ingesters if `start` param is not specified. #4976
7-
* [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
8-
* [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
20+
* [CHANGE] Rename oltp_endpoint to otlp_endpoint to match opentelemetry spec and lib name. #5068
21+
* [CHANGE] Distributor/Ingester: Log warn level on push requests when they have status code 4xx. Do not log if status is 429. #5103
22+
* [CHANGE] Tracing: Use the default OTEL trace sampler when `-tracing.otel.exporter-type` is set to `awsxray`. #5141
23+
* [CHANGE] Ingester partial error log line to debug level. #5192
24+
* [CHANGE] Change HTTP status code from 503/422 to 499 if a request is canceled. #5220
25+
* [CHANGE] Store gateways summary metrics have been converted to histograms `cortex_bucket_store_series_blocks_queried`, `cortex_bucket_store_series_data_fetched`, `cortex_bucket_store_series_data_size_touched_bytes`, `cortex_bucket_store_series_data_size_fetched_bytes`, `cortex_bucket_store_series_data_touched`, `cortex_bucket_store_series_result_series` #5239
1426
* [FEATURE] Querier/Query Frontend: support Prometheus /api/v1/status/buildinfo API. #4978
1527
* [FEATURE] Ingester: Add active series to all_user_stats page. #4972
1628
* [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
@@ -19,10 +31,48 @@
1931
* [FEATURE] Query Frontend/Scheduler: Add a new counter metric `cortex_request_queue_requests_total` for total requests going to queue. #5030
2032
* [FEATURE] Build ARM docker images. #5041
2133
* [FEATURE] Query-frontend/Querier: Create spans to measure time to merge promql responses. #5041
34+
* [FEATURE] Querier/Ruler: Support the new thanos promql engine. This is an experimental feature and might change in the future. #5093
35+
* [FEATURE] Added zstd as an option for grpc compression #5092
36+
* [FEATURE] Ring: Add new kv store option `dynamodb`. #5026
37+
* [FEATURE] Cache: Support redis as backend for caching bucket and index cache. #5057
38+
* [FEATURE] Querier/Store-Gateway: Added `-blocks-storage.bucket-store.ignore-blocks-within` allowing to filter out the recently created blocks from being synced by queriers and store-gateways. #5166
39+
* [FEATURE] AlertManager/Ruler: Added support for `keep_firing_for` on alerting rulers.
40+
* [FEATURE] Alertmanager: Add support for time_intervals. #5102
41+
* [FEATURE] Added `snappy-block` as an option for grpc compression #5215
42+
* [FEATURE] Enable experimental out-of-order samples support. Added 2 new configs `ingester.out_of_order_time_window` and `blocks-storage.tsdb.out_of_order_cap_max`. #4964
43+
* [ENHANCEMENT] Querier: limit series query to only ingesters if `start` param is not specified. #4976
44+
* [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. #4991
45+
* [ENHANCEMENT] Query-tee: Add `/api/v1/query_exemplars` API endpoint support. #5010
46+
* [ENHANCEMENT] Let blocks_cleaner delete blocks concurrently(default 16 goroutines). #5028
47+
* [ENHANCEMENT] Query Frontend/Query Scheduler: Increase upper bound to 60s for queue duration histogram metric. #5029
48+
* [ENHANCEMENT] Query Frontend: Log Vertical sharding information when `query_stats_enabled` is enabled. #5037
49+
* [ENHANCEMENT] Ingester: The metadata APIs should honour `querier.query-ingesters-within` when `querier.query-store-for-labels-enabled` is true. #5027
50+
* [ENHANCEMENT] Query Frontend: Skip instant query roundtripper if sharding is not applicable. #5062
51+
* [ENHANCEMENT] Push reduce one hash operation of Labels. #4945 #5114
52+
* [ENHANCEMENT] Alertmanager: Added `-alertmanager.enabled-tenants` and `-alertmanager.disabled-tenants` to explicitly enable or disable alertmanager for specific tenants. #5116
53+
* [ENHANCEMENT] Upgraded Docker base images to `alpine:3.17`. #5132
54+
* [ENHANCEMENT] Add retry logic to S3 bucket client. #5135
55+
* [ENHANCEMENT] Update Go version to 1.20.1. #5159
56+
* [ENHANCEMENT] Distributor: Reuse byte slices when serializing requests from distributors to ingesters. #5193
57+
* [ENHANCEMENT] Query Frontend: Add number of chunks and samples fetched in query stats. #5198
58+
* [ENHANCEMENT] Implement grpc.Compressor.DecompressedSize for snappy to optimize memory allocations. #5213
59+
* [ENHANCEMENT] Querier: Batch Iterator optimization to prevent transversing it multiple times query ranges steps does not overlap. #5237
2260
* [BUGFIX] Updated `golang.org/x/net` dependency to fix CVE-2022-27664. #5008
2361
* [BUGFIX] Fix panic when otel and xray tracing is enabled. #5044
2462
* [BUGFIX] Fixed no compact block got grouped in shuffle sharding grouper. #5055
63+
* [BUGFIX] Fixed ingesters with less tokens stuck in LEAVING. #5061
2564
* [BUGFIX] Tracing: Fix missing object storage span instrumentation. #5074
65+
* [BUGFIX] Ingester: Fix Ingesters returning empty response for metadata APIs. #5081
66+
* [BUGFIX] Ingester: Fix panic when querying metadata from blocks that are being deleted. #5119
67+
* [BUGFIX] Ring: Fix case when dynamodb kv reaches the limit of 25 actions per batch call. #5136
68+
* [BUGFIX] Query-frontend: Fix shardable instant queries do not produce sorted results for `sort`, `sort_desc`, `topk`, `bottomk` functions. #5148, #5170
69+
* [BUGFIX] Querier: Fix `/api/v1/series` returning 5XX instead of 4XX when limits are hit. #5169
70+
* [BUGFIX] Compactor: Fix issue that shuffle sharding planner return error if block is under visit by other compactor. #5188
71+
* [BUGFIX] Fix S3 BucketWithRetries upload empty content issue #5217
72+
* [BUGFIX] Query Frontend: Disable `absent`, `absent_over_time` and `scalar` for vertical sharding. #5221
73+
* [BUGFIX] Catch context error in the s3 bucket client. #5240
74+
* [BUGFIX] Fix query frontend remote read empty body. #5257
75+
* [BUGFIX] Fix query frontend incorrect error response format at `SplitByQuery` middleware. #5260
2676

2777
## 1.14.0 2022-12-02
2878

@@ -56,6 +106,7 @@
56106
- `-ingester.chunk-age-jitter`
57107
- `-ingester.concurrent-flushes`
58108
- `-ingester.spread-flushes`
109+
- `-ingester.chunk-encoding`
59110
- `-store.*` except `-store.engine` and `-store.max-query-length`
60111
- `-store.query-chunk-limit` was deprecated and replaced by `-querier.max-fetched-chunks-per-query`
61112
- `-deletes.*`
@@ -81,7 +132,6 @@
81132
* [FEATURE] QueryFrontend: Support vertical sharding for subqueries. #4955
82133
* [FEATURE] Querier: Added a new limit `-querier.max-fetched-data-bytes-per-query` allowing to limit the maximum size of all data in bytes that a query can fetch from each ingester and storage. #4854
83134
* [FEATURE] Added 2 flags `-alertmanager.alertmanager-client.grpc-compression` and `-querier.store-gateway-client.grpc-compression` to configure compression methods for grpc clients. #4889
84-
* [BUGFIX] Storage/Bucket: Enable AWS SDK for go authentication for s3 to fix IMDSv1 authentication. #4897
85135
* [ENHANCEMENT] AlertManager: Retrying AlertManager Get Requests (Get Alertmanager status, Get Alertmanager Receivers) on next replica on error #4840
86136
* [ENHANCEMENT] Querier/Ruler: Retry store-gateway in case of unexpected failure, instead of failing the query. #4532 #4839
87137
* [ENHANCEMENT] Ring: DoBatch prioritize 4xx errors when failing. #4783
@@ -92,6 +142,7 @@
92142
* [ENHANCEMENT] Enhance traces with hostname information. #4898
93143
* [ENHANCEMENT] Improve the documentation around limits. #4905
94144
* [ENHANCEMENT] Distributor: cache user overrides to reduce lock contention. #4904
145+
* [BUGFIX] Storage/Bucket: Enable AWS SDK for go authentication for s3 to fix IMDSv1 authentication. #4897
95146
* [BUGFIX] Memberlist: Add join with no retrying when starting service. #4804
96147
* [BUGFIX] Ruler: Fix /ruler/rule_groups returns YAML with extra fields. #4767
97148
* [BUGFIX] Respecting `-tracing.otel.sample-ratio` configuration when enabling OpenTelemetry tracing with X-ray. #4862

Makefile

Lines changed: 2 additions & 2 deletions
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 ?= upgrade-to-go1.19.3-e8b98ddc0
125+
LATEST_BUILD_IMAGE_TAG ?= upgrade-to-go1.20.1-e6945e022
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
@@ -184,7 +184,7 @@ lint:
184184
golangci-lint run
185185

186186
# Ensure no blocklisted package is imported.
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,\
187+
GOFLAGS="-tags=requires_docker,integration,integration_alertmanager,integration_backward_compatibility,integration_memberlist,integration_querier,integration_ruler,integration_query_fuzz" faillint -paths "github.com/bmizerany/assert=github.com/stretchr/testify/assert,\
188188
golang.org/x/net/context=context,\
189189
sync/atomic=go.uber.org/atomic,\
190190
github.com/prometheus/client_golang/prometheus.{MultiError}=github.com/prometheus/prometheus/tsdb/errors.{NewMulti},\

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Cortex is primarily used as a [remote write](https://prometheus.io/docs/operatin
2727

2828
The chunks storage is deprecated since v1.10.0. You're encouraged to use the [blocks storage](docs/blocks-storage/_index.md).
2929

30-
Chunks storage is scheduled to be removed in release 1.14.0
30+
Chunks storage was removed in release 1.14.0
3131

3232
## Documentation
3333

RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Our goal is to provide a new minor release every 6 weeks. This is a new process
3030
| v1.12.0 | 2022-02-17 | _Abandoned_ |
3131
| v1.13.0 | 2022-06-23 | Alvin Lin (@alvinlin123) |
3232
| v1.14.0 | 2022-11-15 | Alan Protasio (@alanprot) |
33+
| v1.15.0 | 2023-03-27 | Ben Ye (@yeya24) |
3334

3435
## Release shepherd responsibilities
3536

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.14.0
1+
1.15.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.19.3-buster
1+
FROM golang:1.20.1-buster
22
ARG goproxyValue
33
ENV GOPROXY=${goproxyValue}
44
RUN apt-get update && apt-get install -y curl python-requests python-yaml 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.48.0
26+
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.51.2
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.14
1+
FROM alpine:3.17
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.14
1+
FROM alpine:3.17
22
ARG TARGETARCH
33

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

0 commit comments

Comments
 (0)