Skip to content

Commit

Permalink
Merge pull request #1410 from grafana/prepare-2.0.0-rc.2
Browse files Browse the repository at this point in the history
Prepare 2.0.0 rc.2
  • Loading branch information
pracucci committed Mar 8, 2022
2 parents 5d67088 + e8bf79f commit c0c349e
Show file tree
Hide file tree
Showing 225 changed files with 27,414 additions and 4,507 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/test-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
lint:
runs-on: ubuntu-20.04
container:
image: grafana/mimir-build-image:chore-publish-images-to-dockerhub-771364985
image: grafana/mimir-build-image:update-go-1.17.8-8a996bb57
credentials:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
lint-jsonnet:
runs-on: ubuntu-20.04
container:
image: grafana/mimir-build-image:chore-publish-images-to-dockerhub-771364985
image: grafana/mimir-build-image:update-go-1.17.8-8a996bb57
credentials:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
test:
runs-on: ubuntu-20.04
container:
image: grafana/mimir-build-image:chore-publish-images-to-dockerhub-771364985
image: grafana/mimir-build-image:update-go-1.17.8-8a996bb57
credentials:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
Expand All @@ -113,7 +113,7 @@ jobs:
build-mimir:
runs-on: ubuntu-20.04
container:
image: grafana/mimir-build-image:chore-publish-images-to-dockerhub-771364985
image: grafana/mimir-build-image:update-go-1.17.8-8a996bb57
credentials:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
build-tools:
runs-on: ubuntu-20.04
container:
image: grafana/mimir-build-image:chore-publish-images-to-dockerhub-771364985
image: grafana/mimir-build-image:update-go-1.17.8-8a996bb57
credentials:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
- name: Upgrade golang
uses: actions/setup-go@v2
with:
go-version: 1.17.3
go-version: 1.17.8
- name: Checkout Repo
uses: actions/checkout@v2
- name: Install Docker Client
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
if: (startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/r') ) && github.event_name == 'push' && github.repository == 'grafana/mimir'
runs-on: ubuntu-20.04
container:
image: grafana/mimir-build-image:chore-publish-images-to-dockerhub-771364985
image: grafana/mimir-build-image:update-go-1.17.8-8a996bb57
credentials:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
Expand Down
19 changes: 16 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

### Jsonnet

## 2.0.0-rc.1
### Mimirtool

## 2.0.0-rc.2

### Grafana Mimir

Expand Down Expand Up @@ -314,8 +316,7 @@ _Changes since Cortex 1.10.0._
* `-querier.split-queries-by-interval` renamed to `-query-frontend.split-queries-by-interval`
* `-querier.align-querier-with-step` renamed to `-query-frontend.align-querier-with-step`
* `-querier.cache-results` renamed to `-query-frontend.cache-results`
* `-query-frontend.parallelize-shardable-queries` renamed to `-query-frontend.parallelize-shardable-queries`
* `-query-frontend.cache-unaligned-requests` renamed to `-query-frontend.cache-unaligned-requests`
* `-querier.parallelise-shardable-queries` renamed to `-query-frontend.parallelize-shardable-queries`
* [CHANGE] Query-frontend: the default value of `-query-frontend.split-queries-by-interval` has changed from `0` to `24h`. #1131
* [CHANGE] Query-frontend: `-frontend.` flags were renamed to `-query-frontend.`: #1167
* [CHANGE] Query-frontend / Query-scheduler: classified the `-query-frontend.querier-forget-delay` and `-query-scheduler.querier-forget-delay` flags (and their respective YAML config options) as experimental. #1208
Expand Down Expand Up @@ -567,6 +568,8 @@ _Changes since Cortex 1.10.0._
* `ruler_max_rule_groups_per_tenant`
* [ENHANCEMENT] Overrides exporter: add a metrics `cortex_limits_defaults` to expose the default values of limits. #173
* [ENHANCEMENT] Overrides exporter: Add `max_fetched_chunks_per_query` and `max_global_exemplars_per_user` limits to the default and per-tenant limits exported as metrics. #471 #515
* [ENHANCEMENT] Upgrade Go to 1.17.8. #1347 #1381
* [ENHANCEMENT] Upgrade Docker base images to `alpine:3.15.0`. #1348
* [BUGFIX] Azure storage: only create HTTP client once, to reduce memory utilization. #605
* [BUGFIX] Ingester: fixed ingester stuck on start up (LEAVING ring state) when `-ingester.ring.heartbeat-period=0` and `-ingester.unregister-on-shutdown=false`. [#4366](https://github.com/cortexproject/cortex/pull/4366)
* [BUGFIX] Ingester: prevent any reads or writes while the ingester is stopping. This will prevent accessing TSDB blocks once they have been already closed. [#4304](https://github.com/cortexproject/cortex/pull/4304)
Expand Down Expand Up @@ -655,6 +658,7 @@ _Changes since `grafana/cortex-jsonnet` `1.9.0`._
* [FEATURE] Added `Cortex / Overrides` dashboard, displaying default limits and per-tenant overrides applied to Mimir. #673
* [FEATURE] Added `Mimir / Tenants` and `Mimir / Top tenants` dashboards, displaying user-based metrics. #776
* [FEATURE] Added querier autoscaling panels and alerts. #1006 #1016
* [FEATURE] Mimir / Top tenants dashboard now has tenants ranked by rule group size and evaluation time. #1338
* [ENHANCEMENT] cortex-mixin: Make `cluster_namespace_deployment:kube_pod_container_resource_requests_{cpu_cores,memory_bytes}:sum` backwards compatible with `kube-state-metrics` v2.0.0. [#317](https://github.com/grafana/cortex-jsonnet/pull/317)
* [ENHANCEMENT] Cortex-mixin: Include `cortex-gw-internal` naming variation in default `gateway` job names. [#328](https://github.com/grafana/cortex-jsonnet/pull/328)
* [ENHANCEMENT] Ruler dashboard: added object storage metrics. [#354](https://github.com/grafana/cortex-jsonnet/pull/354)
Expand Down Expand Up @@ -815,6 +819,7 @@ _Changes since `grafana/cortex-jsonnet` `1.9.0`._
* [CHANGE] Changed the default of `bucket_index_enabled` to `true`. #924
* [CHANGE] Remove the support for the test-exporter. #1133
* [CHANGE] Removed `$.distributor_deployment_labels`, `$.ingester_deployment_labels` and `$.querier_deployment_labels` fields, that were used by gossip.libsonnet to inject additional label. Now the label is injected directly into pods of statefulsets and deployments. #1297
* [CHANGE] Disabled `-ingester.readiness-check-ring-health`. #1352
* [FEATURE] Added query sharding support. It can be enabled setting `cortex_query_sharding_enabled: true` in the `_config` object. #653
* [FEATURE] Added shuffle-sharding support. It can be enabled and configured using the following config: #902
```
Expand All @@ -828,6 +833,7 @@ _Changes since `grafana/cortex-jsonnet` `1.9.0`._
},
}
```
* [FEATURE] Added multi-zone ingesters and store-gateways support. #1352
* [ENHANCEMENT] Add overrides config to compactor. This allows setting retention configs per user. [#386](https://github.com/grafana/cortex-jsonnet/pull/386)
* [ENHANCEMENT] Added 256MB memory ballast to querier. [#369](https://github.com/grafana/cortex-jsonnet/pull/369)
* [ENHANCEMENT] Update `etcd-operator` to latest version (see https://github.com/grafana/jsonnet-libs/pull/480). [#263](https://github.com/grafana/cortex-jsonnet/pull/263)
Expand Down Expand Up @@ -860,6 +866,7 @@ _Changes since cortextool `0.10.7`._
* `CORTEX_TLS_KEY_PATH` to `MIMIR_TLS_KEY_PATH`
* [CHANGE] Change `cortex` backend to `mimir`. #883
* [CHANGE] Do not publish `mimirtool` binary for 386 windows architecture. #1263
* [CHANGE] `analyse` command has been renamed to `analyze`. #1318
* [FEATURE] Support Arm64 on Darwin for all binaries (benchtool etc). https://github.com/grafana/cortex-tools/pull/215
* [ENHANCEMENT] Correctly support federated rules. #823
* [BUGFIX] Fix `cortextool rules` legends displaying wrong symbols for updates and deletions. https://github.com/grafana/cortex-tools/pull/226
Expand Down Expand Up @@ -892,6 +899,12 @@ _Changes since Cortex `1.10.0`._

* [CHANGE] Removed the test-exporter tool. #1133

### Tools

_Changes since Cortex `1.10.0`._

* [CHANGE] Removed `query-audit`. You can use `query-tee` to compare query results and performances of two Grafana Mimir backends. #1380

## Cortex 1.10.0 / 2021-08-03

* [CHANGE] Prevent path traversal attack from users able to control the HTTP header `X-Scope-OrgID`. #4375 (CVE-2021-36157)
Expand Down
5 changes: 3 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ The following are the main/default maintainers:
Some parts of the codebase have other maintainers, the package paths also include all sub-packages:

- `docs`:
- Jack Baldry - [@jdbaldry](https://github.com/jdbaldry) ([Grafana Labs](https://grafana.com/))
- Ursula Kallio — [@osg-grafana](https://github.com/osg-grafana) ([Grafana Labs](https://grafana.com/))
- `pkg/ruler`:
- Josh Abreu Mesa — [@gotjosh](https://github.com/gotjosh) ([Grafana Labs](https://grafana.com/))
- `pkg/alertmanager`:
- Josh Abreu Mesa — [@gotjosh](https://github.com/gotjosh) ([Grafana Labs](https://grafana.com/))
- `pkg/frontend`:
- Cyril Tovena — [@cyriltovena](https://github.com/cyriltovena) ([Grafana Labs](https://grafana.com/)) # limited to reviews
- `pkg/ruler`:
- Josh Abreu Mesa — [@gotjosh](https://github.com/gotjosh) ([Grafana Labs](https://grafana.com/))
70 changes: 35 additions & 35 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ MIXIN_OUT_PATH := operations/mimir-mixin-compiled
JSONNET_MANIFESTS_PATH := operations/mimir

# Doc templates in use
DOC_TEMPLATES := docs/sources/configuration/reference-configuration-parameters.template
DOC_TEMPLATES := docs/sources/configuring/reference-configuration-parameters.template

# Documents to run through embedding
DOC_EMBED := docs/sources/configuration/using-the-query-frontend-with-prometheus.md \
DOC_EMBED := docs/sources/architecture/components/query-frontend/using-the-query-frontend-with-prometheus.md \
docs/sources/operating-grafana-mimir/mirror-requests-to-a-second-cluster.md \
docs/sources/architecture/overrides-exporter.md \
docs/sources/architecture/components/overrides-exporter.md \
docs/sources/getting-started/_index.md \
operations/mimir/README.md

Expand Down Expand Up @@ -183,7 +183,7 @@ mimir-build-image/$(UPTODATE): mimir-build-image/*
# All the boiler plate for building golang follows:
SUDO := $(shell docker info >/dev/null 2>&1 || echo "sudo -E")
BUILD_IN_CONTAINER := true
LATEST_BUILD_IMAGE_TAG ?= chore-publish-images-to-dockerhub-771364985
LATEST_BUILD_IMAGE_TAG ?= update-go-1.17.8-8a996bb57

# TTY is parameterized to allow Google Cloud Builder to run builds,
# as it currently disallows TTY devices. This value needs to be overridden
Expand All @@ -206,7 +206,7 @@ GOVOLUMES= -v $(shell pwd)/.cache:/go/cache:delegated,z \
# Mount local ssh credentials to be able to clone private repos when doing `mod-check`
SSHVOLUME= -v ~/.ssh/:/root/.ssh:delegated,z

exes $(EXES) protos $(PROTO_GOS) lint test test-with-race cover shell mod-check check-protos doc format: mimir-build-image/$(UPTODATE)
exes $(EXES) protos $(PROTO_GOS) lint test test-with-race cover shell mod-check check-protos doc format dist: mimir-build-image/$(UPTODATE)
@mkdir -p $(shell pwd)/.pkg
@mkdir -p $(shell pwd)/.cache
@echo
Expand Down Expand Up @@ -335,6 +335,36 @@ license:
check-license: license
@git diff --exit-code || (echo "Please add the license header running 'make BUILD_IN_CONTAINER=false license'" && false)

dist: ## Generates binaries for a Mimir release.
rm -fr ./dist
mkdir -p ./dist
# Build binaries for various architectures and operating systems. Only
# mimirtool supports Windows for now.
for os in linux darwin windows; do \
for arch in amd64 arm64; do \
suffix="" ; \
if [ "$$os" = "windows" ]; then \
suffix=".exe" ; \
fi; \
echo "Building mimirtool for $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/mimirtool-$$os-$$arch$$suffix ./cmd/mimirtool; \
sha256sum ./dist/mimirtool-$$os-$$arch$$suffix | cut -d ' ' -f 1 > ./dist/mimirtool-$$os-$$arch$$suffix-sha-256; \
if [ "$$os" = "windows" ]; then \
continue; \
fi; \
echo "Building Mimir for $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/mimir-$$os-$$arch$$suffix ./cmd/mimir; \
sha256sum ./dist/mimir-$$os-$$arch$$suffix | cut -d ' ' -f 1 > ./dist/mimir-$$os-$$arch$$suffix-sha-256; \
echo "Building query-tee for $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/query-tee-$$os-$$arch$$suffix ./cmd/query-tee; \
sha256sum ./dist/query-tee-$$os-$$arch$$suffix | cut -d ' ' -f 1 > ./dist/query-tee-$$os-$$arch$$suffix-sha-256; \
echo "Building metaconvert for $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/metaconvert-$$os-$$arch$$suffix ./cmd/metaconvert; \
sha256sum ./dist/metaconvert-$$os-$$arch$$suffix | cut -d ' ' -f 1 > ./dist/metaconvert-$$os-$$arch$$suffix-sha-256; \
done; \
done; \
touch $@

endif

.PHONY: check-makefiles
Expand Down Expand Up @@ -466,36 +496,6 @@ check-jsonnet-tests: build-jsonnet-tests
check-tsdb-blocks-storage-s3-docker-compose-yaml:
cd development/tsdb-blocks-storage-s3 && make check

dist: ## Generates binaries for a Mimir release.
rm -fr ./dist
mkdir -p ./dist
# Build binaries for various architectures and operating systems. Only
# mimirtool supports Windows for now.
for os in linux darwin windows; do \
for arch in amd64 arm64; do \
suffix="" ; \
if [ "$$os" = "windows" ]; then \
suffix=".exe" ; \
fi; \
echo "Building mimirtool for $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/mimirtool-$$os-$$arch$$suffix ./cmd/mimirtool; \
sha256sum ./dist/mimirtool-$$os-$$arch$$suffix | cut -d ' ' -f 1 > ./dist/mimirtool-$$os-$$arch$$suffix-sha-256; \
if [ "$$os" = "windows" ]; then \
continue; \
fi; \
echo "Building Mimir for $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/mimir-$$os-$$arch$$suffix ./cmd/mimir; \
sha256sum ./dist/mimir-$$os-$$arch$$suffix | cut -d ' ' -f 1 > ./dist/mimir-$$os-$$arch$$suffix-sha-256; \
echo "Building query-tee for $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/query-tee-$$os-$$arch$$suffix ./cmd/query-tee; \
sha256sum ./dist/query-tee-$$os-$$arch$$suffix | cut -d ' ' -f 1 > ./dist/query-tee-$$os-$$arch$$suffix-sha-256; \
echo "Building metaconvert for $$os/$$arch"; \
GOOS=$$os GOARCH=$$arch CGO_ENABLED=0 go build $(GO_FLAGS) -o ./dist/metaconvert-$$os-$$arch$$suffix ./cmd/metaconvert; \
sha256sum ./dist/metaconvert-$$os-$$arch$$suffix | cut -d ' ' -f 1 > ./dist/metaconvert-$$os-$$arch$$suffix-sha-256; \
done; \
done; \
touch $@

integration-tests: cmd/mimir/$(UPTODATE)
go test -tags=requires_docker ./integration/...

Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ To publish a release candidate:
1. Wait until the CI pipeline succeeds (once a tag is created, the release process through GitHub Actions will be triggered for this tag)
1. Create a pre-release on GitHub
- Write the release notes (including a copy-paste of the changelog)
- Build binaries with `make dist` and attach them to the release
- Build binaries with `make BUILD_IN_CONTAINER=true dist` and attach them to the release (building in container ensures standardized toolchain)

### Publish a stable release

Expand All @@ -84,7 +84,7 @@ To publish a stable release:
1. Wait until the CI pipeline succeeds (once a tag is created, the release process through GitHub Actions will be triggered for this tag)
1. Create a release on GitHub
- Write the release notes (including a copy-paste of the changelog)
- Build binaries with `make dist` and attach them to the release
- Build binaries with `make BUILD_IN_CONTAINER=true dist` and attach them to the release (building in container ensures standardized toolchain)
1. Merge the release branch `release-x.y` into `main`
- Create `merge-release-X.Y-to-main` branch **from the `release-X.Y` branch** locally
- Merge the upstream `main` branch into your `merge-release-X.Y-to-main` branch and resolve conflicts
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-rc.1
2.0.0-rc.2
2 changes: 1 addition & 1 deletion cmd/metaconvert/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Provenance-includes-license: Apache-2.0
# Provenance-includes-copyright: The Cortex Authors.

FROM alpine:3.13
FROM alpine:3.15.0
RUN apk add --no-cache ca-certificates
COPY metaconvert /
ENTRYPOINT ["/metaconvert"]
Expand Down
2 changes: 1 addition & 1 deletion cmd/mimir/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Provenance-includes-license: Apache-2.0
# Provenance-includes-copyright: The Cortex Authors.

FROM alpine:3.13
FROM alpine:3.15.0
RUN apk add --no-cache ca-certificates
# Expose TARGETOS and TARGETARCH variables. These are supported by Docker when using BuildKit, but must be "enabled" using ARG.
ARG TARGETOS
Expand Down
4 changes: 2 additions & 2 deletions cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Usage of ./cmd/mimir/mimir:
-alertmanager.max-alerts-count int
Maximum number of alerts that a single tenant can have. Inserting more alerts will fail with a log message and metric increment. 0 = no limit.
-alertmanager.max-alerts-size-bytes int
Maximum total size of alerts that a single user can have, alert size is the sum of the bytes of its labels, annotations and generatorURL. Inserting more alerts will fail with a log message and metric increment. 0 = no limit.
Maximum total size of alerts that a single tenant can have, alert size is the sum of the bytes of its labels, annotations and generatorURL. Inserting more alerts will fail with a log message and metric increment. 0 = no limit.
-alertmanager.max-config-size-bytes int
Maximum size of configuration file for Alertmanager that tenant can upload via Alertmanager API. 0 = no limit.
-alertmanager.max-dispatcher-aggregation-groups int
Expand Down Expand Up @@ -796,7 +796,7 @@ Usage of ./cmd/mimir/mimir:
-ingester.client.tls-server-name string
Override the expected name on the server certificate.
-ingester.exemplars-update-period duration
[experimental] Period with which to update per-user max exemplars. (default 15s)
[experimental] Period with which to update per-tenant max exemplar limit. (default 15s)
-ingester.ignore-series-limit-for-metric-names string
Comma-separated list of metric names, for which the -ingester.max-global-series-per-metric limit will be ignored. Does not affect the -ingester.max-global-series-per-user limit.
-ingester.instance-limits.max-inflight-push-requests int
Expand Down
2 changes: 1 addition & 1 deletion cmd/mimir/help.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Usage of ./cmd/mimir/mimir:
-alertmanager.max-alerts-count int
Maximum number of alerts that a single tenant can have. Inserting more alerts will fail with a log message and metric increment. 0 = no limit.
-alertmanager.max-alerts-size-bytes int
Maximum total size of alerts that a single user can have, alert size is the sum of the bytes of its labels, annotations and generatorURL. Inserting more alerts will fail with a log message and metric increment. 0 = no limit.
Maximum total size of alerts that a single tenant can have, alert size is the sum of the bytes of its labels, annotations and generatorURL. Inserting more alerts will fail with a log message and metric increment. 0 = no limit.
-alertmanager.max-config-size-bytes int
Maximum size of configuration file for Alertmanager that tenant can upload via Alertmanager API. 0 = no limit.
-alertmanager.max-dispatcher-aggregation-groups int
Expand Down
2 changes: 1 addition & 1 deletion cmd/mimirtool/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

FROM alpine:3.13
FROM alpine:3.15.0
RUN apk add --no-cache ca-certificates
# Expose TARGETOS and TARGETARCH variables. These are supported by Docker when using BuildKit, but must be "enabled" using ARG.
ARG TARGETOS
Expand Down
Loading

0 comments on commit c0c349e

Please sign in to comment.