Skip to content

Commit 5bee491

Browse files
authored
Merge branch 'db_main' into yuchen-db/scaledown-with-operator
Signed-off-by: Yuchen Wang <[email protected]>
2 parents ea0d891 + 17f9d7c commit 5bee491

File tree

150 files changed

+6687
-1072
lines changed

Some content is hidden

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

150 files changed

+6687
-1072
lines changed

.bingo/Variables.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ $(BINGO): $(BINGO_DIR)/bingo.mod
2929
@echo "(re)installing $(GOBIN)/bingo-v0.9.0"
3030
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.9.0 "github.com/bwplotka/bingo"
3131

32+
CAPNPC_GO := $(GOBIN)/capnpc-go-v3.0.1-alpha.2.0.20240830165715-46ccd63a72af
33+
$(CAPNPC_GO): $(BINGO_DIR)/capnpc-go.mod
34+
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
35+
@echo "(re)installing $(GOBIN)/capnpc-go-v3.0.1-alpha.2.0.20240830165715-46ccd63a72af"
36+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=capnpc-go.mod -o=$(GOBIN)/capnpc-go-v3.0.1-alpha.2.0.20240830165715-46ccd63a72af "capnproto.org/go/capnp/v3/capnpc-go"
37+
3238
FAILLINT := $(GOBIN)/faillint-v1.13.0
3339
$(FAILLINT): $(BINGO_DIR)/faillint.mod
3440
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.

.bingo/capnpc-go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
2+
3+
go 1.23.1
4+
5+
require capnproto.org/go/capnp/v3 v3.0.1-alpha.2.0.20240830165715-46ccd63a72af // capnpc-go

.bingo/capnpc-go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
capnproto.org/go/capnp/v3 v3.0.1-alpha.2.0.20240830165715-46ccd63a72af h1:A5wxH0ZidOtYYUGjhtBaRuB87M73bGfc06uWB8sHpg0=
2+
capnproto.org/go/capnp/v3 v3.0.1-alpha.2.0.20240830165715-46ccd63a72af/go.mod h1:2vT5D2dtG8sJGEoEKU17e+j7shdaYp1Myl8X03B3hmc=
3+
github.com/colega/zeropool v0.0.0-20230505084239-6fb4a4f75381 h1:d5EKgQfRQvO97jnISfR89AiCCCJMwMFoSxUiU0OGCRU=
4+
github.com/colega/zeropool v0.0.0-20230505084239-6fb4a4f75381/go.mod h1:OU76gHeRo8xrzGJU3F3I1CqX1ekM8dfJw0+wPeMwnp0=
5+
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
6+
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=

.bingo/variables.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ ALERTMANAGER="${GOBIN}/alertmanager-v0.27.0"
1212

1313
BINGO="${GOBIN}/bingo-v0.9.0"
1414

15+
CAPNPC_GO="${GOBIN}/capnpc-go-v3.0.1-alpha.2.0.20240830165715-46ccd63a72af"
16+
1517
FAILLINT="${GOBIN}/faillint-v1.13.0"
1618

1719
GOIMPORTS="${GOBIN}/goimports-v0.23.0"

.circleci/config.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,27 +127,18 @@ workflows:
127127
version: 2
128128
thanos:
129129
jobs:
130-
- test:
131-
filters:
132-
tags:
133-
only: /.*/
134130
- publish_main:
135-
requires:
136-
- test
137131
filters:
138132
branches:
139133
only: main
140134
- cross_build:
141-
requires:
142-
- test
143135
filters:
144136
tags:
145137
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
146138
branches:
147139
ignore: /.*/
148140
- publish_release:
149141
requires:
150-
- test
151142
- cross_build
152143
filters:
153144
tags:

.github/workflows/go.yaml

Lines changed: 32 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,42 @@ on:
77
tags:
88
pull_request:
99

10-
# TODO(bwplotka): Add tests here.
1110
permissions:
1211
contents: read
1312

1413
jobs:
14+
unit:
15+
runs-on: ubuntu-latest
16+
name: Thanos unit tests
17+
env:
18+
THANOS_TEST_OBJSTORE_SKIP: GCS,S3,AZURE,COS,ALIYUNOSS,BOS,OCI,OBS,SWIFT
19+
OS_AUTH_URL: http://127.0.0.1:5000/v2.0
20+
OS_PASSWORD: s3cr3t
21+
OS_PROJECT_NAME: admin
22+
OS_REGION_NAME: RegionOne
23+
OS_USERNAME: admin
24+
GOBIN: /tmp/.bin
25+
services:
26+
swift:
27+
image: 'quay.io/thanos/docker-swift-onlyone-authv2-keystone:v0.1'
28+
ports:
29+
- 5000:5000
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
33+
34+
- name: Install Go.
35+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
36+
with:
37+
go-version: 1.23.x
38+
39+
- name: Install bingo modules
40+
run: make install-tool-deps
41+
- name: Add GOBIN to path
42+
run: echo "/tmp/.bin" >> $GITHUB_PATH
43+
- name: Run unit tests
44+
run: make test
45+
1546
cross-build-check:
1647
runs-on: ubuntu-latest
1748
name: Go build for different platforms
@@ -96,43 +127,6 @@ jobs:
96127
- name: Linting & vetting
97128
run: make go-lint
98129

99-
unit:
100-
strategy:
101-
fail-fast: false
102-
runs-on: ubuntu-latest
103-
name: Thanos unit tests
104-
env:
105-
GOBIN: /home/runner/go/bin
106-
steps:
107-
- name: Checkout code
108-
uses: actions/checkout@v3
109-
110-
- name: Install Go.
111-
uses: actions/setup-go@v3
112-
with:
113-
go-version: 1.23.x
114-
115-
- name: Install bingo and configure PATH
116-
run: |
117-
go install github.com/bwplotka/bingo@latest
118-
ls -l $GOPATH/bin
119-
echo $PATH
120-
121-
- name: Install Prometheus using bingo
122-
run: |
123-
bingo get prometheus
124-
125-
- uses: actions/cache@v3
126-
with:
127-
path: |
128-
~/.cache/go-build
129-
~/.cache/golangci-lint
130-
~/go/pkg/mod
131-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
132-
133-
- name: Run unit tests
134-
run: make test-local
135-
136130
codespell:
137131
runs-on: ubuntu-latest
138132
name: Check misspelled words

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,25 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
1919
- [#7658](https://github.com/thanos-io/thanos/pull/7658) Store: Fix panic because too small buffer in pool.
2020
- [#7643](https://github.com/thanos-io/thanos/pull/7643) Receive: fix thanos_receive_write_{timeseries,samples} stats
2121
- [#7644](https://github.com/thanos-io/thanos/pull/7644) fix(ui): add null check to find overlapping blocks logic
22+
- [#7814](https://github.com/thanos-io/thanos/pull/7814) Store: label_values: if matchers contain **name**=="something", do not add <labelname> != "" to fetch less postings.
2223
- [#7679](https://github.com/thanos-io/thanos/pull/7679) Query: respect store.limit.* flags when evaluating queries
2324
- [#7821](https://github.com/thanos-io/thanos/pull/7679) Query/Receive: Fix coroutine leak introduced in https://github.com/thanos-io/thanos/pull/7796.
25+
- [#7843](https://github.com/thanos-io/thanos/pull/7843) Query Frontend: fix slow query logging for non-query endpoints.
26+
- [#7852](https://github.com/thanos-io/thanos/pull/7852) Query Frontend: pass "stats" parameter forward to queriers and fix Prometheus stats merging.
27+
- [#7832](https://github.com/thanos-io/thanos/pull/7832) Query Frontend: Fix cache keys for dynamic split intervals.
28+
- [#7885](https://github.com/thanos-io/thanos/pull/7885) Store: Return chunks to the pool after completing a Series call.
2429

2530
### Added
2631
- [#7763](https://github.com/thanos-io/thanos/pull/7763) Ruler: use native histograms for client latency metrics.
2732
- [#7609](https://github.com/thanos-io/thanos/pull/7609) API: Add limit param to metadata APIs (series, label names, label values).
2833
- [#7429](https://github.com/thanos-io/thanos/pull/7429): Reloader: introduce `TolerateEnvVarExpansionErrors` to allow suppressing errors when expanding environment variables in the configuration file. When set, this will ensure that the reloader won't consider the operation to fail when an unset environment variable is encountered. Note that all unset environment variables are left as is, whereas all set environment variables are expanded as usual.
2934
- [#7560](https://github.com/thanos-io/thanos/pull/7560) Query: Added the possibility of filtering rules by rule_name, rule_group or file to HTTP api.
3035
- [#7652](https://github.com/thanos-io/thanos/pull/7652) Store: Implement metadata API limit in stores.
36+
- [#7659](https://github.com/thanos-io/thanos/pull/7659) Receive: Add support for replication using [Cap'n Proto](https://capnproto.org/). This protocol has a lower CPU and memory footprint, which leads to a reduction in resource usage in Receivers. Before enabling it, make sure that all receivers are updated to a version which supports this replication method.
37+
- [#7853](https://github.com/thanos-io/thanos/pull/7853) UI: Add support for selecting graph time range with mouse drag.
38+
- [#7855](https://github.com/thanos-io/thanos/pull/7855) Compcat/Query: Add support for comma separated replica labels.
39+
- [#7654](https://github.com/thanos-io/thanos/pull/7654) *: Add '--grpc-server-tls-min-version' flag to allow user to specify TLS version, otherwise default to TLS 1.3
40+
- [#7854](https://github.com/thanos-io/thanos/pull/7854) Query Frontend: Add `--query-frontend.force-query-stats` flag to force collection of query statistics from upstream queriers.
3141

3242
### Changed
3343

Dockerfile.e2e-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Taking a non-alpine image for e2e tests so that cgo can be enabled for the race detector.
2-
FROM golang:1.23.2 as builder
2+
FROM golang:1.23.3 as builder
33

44
WORKDIR $GOPATH/src/github.com/thanos-io/thanos
55

Dockerfile.multi-stage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# By default we pin to amd64 sha. Use make docker to automatically adjust for arm64 versions.
22
ARG BASE_DOCKER_SHA="14d68ca3d69fceaa6224250c83d81d935c053fb13594c811038c461194599973"
3-
FROM golang:1.23.2-alpine3.20 as builder
3+
FROM golang:1.23.3-alpine3.20 as builder
44

55
WORKDIR $GOPATH/src/github.com/thanos-io/thanos
66
# Change in the docker context invalidates the cache so to leverage docker

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,13 @@ proto: ## Generates Go files from Thanos proto files.
295295
proto: check-git $(GOIMPORTS) $(PROTOC) $(PROTOC_GEN_GOGOFAST)
296296
@GOIMPORTS_BIN="$(GOIMPORTS)" PROTOC_BIN="$(PROTOC)" PROTOC_GEN_GOGOFAST_BIN="$(PROTOC_GEN_GOGOFAST)" PROTOC_VERSION="$(PROTOC_VERSION)" scripts/genproto.sh
297297

298+
.PHONY: capnp
299+
capnp: ## Generates Go files from Thanos capnproto files.
300+
capnp: check-git
301+
capnp compile -I $(shell go list -m -f '{{.Dir}}' capnproto.org/go/capnp/v3)/std -ogo pkg/receive/writecapnp/write_request.capnp
302+
@$(GOIMPORTS) -w pkg/receive/writecapnp/write_request.capnp.go
303+
go run ./scripts/copyright
304+
298305
.PHONY: tarballs-release
299306
tarballs-release: ## Build tarballs.
300307
tarballs-release: $(PROMU)

0 commit comments

Comments
 (0)