Skip to content

Commit 8745609

Browse files
authored
Upgrade cortex to v1.19.1 (#53)
* Upgrade to cortex v1.19.1 Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * mod vendor Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * fix bugs Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Update to go 1.23 Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Update config for golangci Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Fix lint issues Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Fix integration test Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Update go version and cortex version Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Update CHANGELOG and changelogs Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> --------- Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
1 parent 8b50728 commit 8745609

944 files changed

Lines changed: 78552 additions & 45400 deletions

File tree

Some content is hidden

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

.github/workflows/integration_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-go@v5
1616
with:
17-
go-version: 1.22
17+
go-version: 1.23
1818
- name: Start Cortex
1919
run: |
2020
docker run -d --name cortex \
2121
-p 9009:9009 \
2222
-v ${{ github.workspace }}/integration/cortex-config.yaml:/etc/cortex/config.yaml \
23-
cortexproject/cortex:v1.18.1 \
23+
cortexproject/cortex:v1.19.1 \
2424
-config.file=/etc/cortex/config.yaml \
2525
-target=all,alertmanager
2626
- name: Wait for Cortex

.github/workflows/validate_pr.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-go@v5
1616
with:
17-
go-version: 1.22
17+
go-version: 1.23
1818
cache: false
1919
- name: golangci-lint
20-
uses: golangci/golangci-lint-action@v4
20+
uses: golangci/golangci-lint-action@v6
2121
with:
22-
version: v1.54
22+
version: v1.64
2323
unit_tests:
2424
name: Unit-Tests
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@v4
2828
- uses: actions/setup-go@v5
2929
with:
30-
go-version: 1.22
30+
go-version: 1.23
3131
- name: Unit Tests
3232
run: make test
3333
build:
@@ -37,6 +37,6 @@ jobs:
3737
- uses: actions/checkout@v4
3838
- uses: actions/setup-go@v5
3939
with:
40-
go-version: 1.22
40+
go-version: 1.23
4141
- name: Build All
4242
run: make all

.golangci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ run:
66
- require_docker
77

88
output:
9-
format: line-number
9+
formats:
10+
- format: line-number
1011

1112
linters:
1213
enable:
@@ -17,6 +18,7 @@ linters:
1718

1819
linters-settings:
1920
errcheck:
20-
exclude: .errcheck-exclude
21+
exclude-functions:
22+
- (github.com/go-kit/log.Logger).Log
2123
goimports:
2224
local-prefixes: "github.com/cortexproject/cortex-tools"

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Order should be `CHANGE`, `FEATURE`, `ENHANCEMENT`, and `BUGFIX`
44

5+
## v0.19.0
6+
* [CHANGE] Upgrade cortex to v1.19.1
7+
* [CHANGE] Upgrade Go to 1.23
8+
* [CHANGE] Upgrade golangci-lint to v1.64
9+
510
## v0.18.0
611
* [CHANGE] Upgrade cortex to v1.18.1
712
* [FEATURE] Add kubeconfig-style configuration file support #50

changelogs/v0.19.0.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# v0.19.0 Release
2+
3+
## Changes
4+
5+
* [CHANGE] Upgrade cortex to v1.19.1
6+
* [CHANGE] Upgrade Go to 1.23
7+
* [CHANGE] Upgrade golangci-lint to v1.64
8+
9+
## Installation
10+
11+
## cortextool
12+
13+
```console
14+
# download the binary (adapt os and arch as needed)
15+
$ curl -fSL -o "cortextool" "https://github.com/cortexproject/cortex-tools/releases/download/v0.19.0/cortextool_0.19.0_linux_x86_64"
16+
17+
# make it executable
18+
$ chmod a+x "cortextool"
19+
20+
# have fun :)
21+
$ ./cortextool --help
22+
```
23+
24+
## benchtool
25+
26+
```console
27+
# download the binary (adapt os and arch as needed)
28+
$ curl -fSL -o "benchtool" "https://github.com/cortexproject/cortex-tools/releases/download/v0.19.0/benchtool_0.19.0_linux_x86_64"
29+
30+
# make it executable
31+
$ chmod a+x "benchtool"
32+
33+
# have fun :)
34+
$ ./benchtool --help
35+
```

cmd/sim/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ func run(k int, sizer func(float64) int) {
116116

117117
fmt.Printf("%d, %d, %d, %d, %f, %f\n",
118118
k,
119-
int(min(nodeSeries)),
120-
int(max(nodeSeries)),
119+
int(minFloat(nodeSeries)),
120+
int(maxFloat(nodeSeries)),
121121
int(stat.Mean(nodeSeries, nil)),
122122
stat.StdDev(nodeSeries, nil),
123123
float64(maxAffectedTenants)/float64(numTenants))
@@ -168,7 +168,7 @@ func shuffleShard(entropy *rand.Rand, shardSize, numReplicas int) []int {
168168
return ids
169169
}
170170

171-
func min(fs []float64) float64 {
171+
func minFloat(fs []float64) float64 {
172172
result := math.MaxFloat64
173173
for _, f := range fs {
174174
if f < result {
@@ -178,7 +178,7 @@ func min(fs []float64) float64 {
178178
return result
179179
}
180180

181-
func max(fs []float64) float64 {
181+
func maxFloat(fs []float64) float64 {
182182
result := 0.0
183183
for _, f := range fs {
184184
if f > result {

0 commit comments

Comments
 (0)