Skip to content

Commit 1652f30

Browse files
authored
Update build image to use golang 1.25.5 (#7197)
* Update build image tag to master-8b48921f71 which is using golang 1.25.5 Signed-off-by: Alex Le <leqiyue@amazon.com> * update go.mod version and fix build Signed-off-by: Alex Le <leqiyue@amazon.com> * update go mod Signed-off-by: Alex Le <leqiyue@amazon.com> * fix modernize Signed-off-by: Alex Le <leqiyue@amazon.com> * fix integration tests Signed-off-by: Alex Le <leqiyue@amazon.com> --------- Signed-off-by: Alex Le <leqiyue@amazon.com>
1 parent 6185c1e commit 1652f30

223 files changed

Lines changed: 24215 additions & 9856 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/test-build-deploy.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
lint:
1818
runs-on: ubuntu-24.04
1919
container:
20-
image: quay.io/cortexproject/build-image:master-59491e9aae
20+
image: quay.io/cortexproject/build-image:master-8b48921f71
2121
steps:
2222
- name: Checkout Repo
2323
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -48,7 +48,7 @@ jobs:
4848
test:
4949
runs-on: ubuntu-24.04
5050
container:
51-
image: quay.io/cortexproject/build-image:master-59491e9aae
51+
image: quay.io/cortexproject/build-image:master-8b48921f71
5252
steps:
5353
- name: Checkout Repo
5454
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -66,7 +66,7 @@ jobs:
6666
test-no-race:
6767
runs-on: ubuntu-24.04
6868
container:
69-
image: quay.io/cortexproject/build-image:master-59491e9aae
69+
image: quay.io/cortexproject/build-image:master-8b48921f71
7070
steps:
7171
- name: Checkout Repo
7272
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -109,7 +109,7 @@ jobs:
109109
build:
110110
runs-on: ubuntu-24.04
111111
container:
112-
image: quay.io/cortexproject/build-image:master-59491e9aae
112+
image: quay.io/cortexproject/build-image:master-8b48921f71
113113
steps:
114114
- name: Checkout Repo
115115
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -210,7 +210,7 @@ jobs:
210210
- name: Upgrade golang
211211
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
212212
with:
213-
go-version: 1.24.0
213+
go-version: 1.25.5
214214
- name: Checkout Repo
215215
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
216216
- name: Install Docker Client
@@ -293,14 +293,14 @@ jobs:
293293
touch build-image/.uptodate
294294
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations
295295
echo "Running configs integration tests on ${{ matrix.arch }}"
296-
make BUILD_IMAGE=quay.io/cortexproject/build-image:master-59491e9aae TTY='' configs-integration-test
296+
make BUILD_IMAGE=quay.io/cortexproject/build-image:master-8b48921f71 TTY='' configs-integration-test
297297
298298
deploy_website:
299299
needs: [build, test]
300300
if: github.ref == 'refs/heads/master' && github.repository == 'cortexproject/cortex'
301301
runs-on: ubuntu-24.04
302302
container:
303-
image: quay.io/cortexproject/build-image:master-59491e9aae
303+
image: quay.io/cortexproject/build-image:master-8b48921f71
304304
steps:
305305
- name: Checkout Repo
306306
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -342,7 +342,7 @@ jobs:
342342
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
343343
runs-on: ubuntu-24.04
344344
container:
345-
image: quay.io/cortexproject/build-image:master-59491e9aae
345+
image: quay.io/cortexproject/build-image:master-8b48921f71
346346
steps:
347347
- name: Checkout Repo
348348
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ build-image/$(UPTODATE): build-image/*
112112
SUDO := $(shell docker info >/dev/null 2>&1 || echo "sudo -E")
113113
BUILD_IN_CONTAINER := true
114114
BUILD_IMAGE ?= $(IMAGE_PREFIX)build-image
115-
LATEST_BUILD_IMAGE_TAG ?= master-59491e9aae
115+
LATEST_BUILD_IMAGE_TAG ?= master-8b48921f71
116116

117117
# TTY is parameterized to allow Google Cloud Builder to run builds,
118118
# as it currently disallows TTY devices. This value needs to be overridden

cmd/cortex/main_test.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,17 +177,13 @@ func captureOutput(t *testing.T) *capturedOutput {
177177
stderrReader: stderrR,
178178
stderrWriter: stderrW,
179179
}
180-
co.wg.Add(1)
181-
go func() {
182-
defer co.wg.Done()
180+
co.wg.Go(func() {
183181
io.Copy(&co.stdoutBuf, stdoutR)
184-
}()
182+
})
185183

186-
co.wg.Add(1)
187-
go func() {
188-
defer co.wg.Done()
184+
co.wg.Go(func() {
189185
io.Copy(&co.stderrBuf, stderrR)
190-
}()
186+
})
191187

192188
return co
193189
}

go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/cortexproject/cortex
22

3-
go 1.24.0
3+
go 1.25.5
44

55
require (
66
github.com/Masterminds/squirrel v1.5.4
@@ -19,7 +19,7 @@ require (
1919
github.com/gogo/protobuf v1.3.2
2020
github.com/gogo/status v1.1.1
2121
github.com/golang-migrate/migrate/v4 v4.18.1
22-
github.com/golang/protobuf v1.5.4
22+
github.com/golang/protobuf v1.5.4 // indirect
2323
github.com/golang/snappy v1.0.0
2424
github.com/gorilla/mux v1.8.1
2525
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc
@@ -87,7 +87,7 @@ require (
8787
github.com/hashicorp/golang-lru/v2 v2.0.7
8888
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
8989
github.com/oklog/ulid/v2 v2.1.1
90-
github.com/parquet-go/parquet-go v0.25.1
90+
github.com/parquet-go/parquet-go v0.26.4
9191
github.com/prometheus-community/parquet-common v0.0.0-20251211092633-65ebeae24e94
9292
github.com/prometheus/client_golang/exp v0.0.0-20250914183048-a974e0d45e0a
9393
github.com/prometheus/procfs v0.16.1
@@ -233,6 +233,8 @@ require (
233233
github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.129.0 // indirect
234234
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.129.0 // indirect
235235
github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor v0.129.0 // indirect
236+
github.com/parquet-go/bitpack v1.0.0 // indirect
237+
github.com/parquet-go/jsonlite v1.0.0 // indirect
236238
github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect
237239
github.com/pierrec/lz4/v4 v4.1.22 // indirect
238240
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect

go.sum

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,8 +1604,12 @@ github.com/oracle/oci-go-sdk/v65 v65.93.1/go.mod h1:u6XRPsw9tPziBh76K7GrrRXPa8P8
16041604
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
16051605
github.com/ovh/go-ovh v1.9.0 h1:6K8VoL3BYjVV3In9tPJUdT7qMx9h0GExN9EXx1r2kKE=
16061606
github.com/ovh/go-ovh v1.9.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c=
1607-
github.com/parquet-go/parquet-go v0.25.1 h1:l7jJwNM0xrk0cnIIptWMtnSnuxRkwq53S+Po3KG8Xgo=
1608-
github.com/parquet-go/parquet-go v0.25.1/go.mod h1:AXBuotO1XiBtcqJb/FKFyjBG4aqa3aQAAWF3ZPzCanY=
1607+
github.com/parquet-go/bitpack v1.0.0 h1:AUqzlKzPPXf2bCdjfj4sTeacrUwsT7NlcYDMUQxPcQA=
1608+
github.com/parquet-go/bitpack v1.0.0/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs=
1609+
github.com/parquet-go/jsonlite v1.0.0 h1:87QNdi56wOfsE5bdgas0vRzHPxfJgzrXGml1zZdd7VU=
1610+
github.com/parquet-go/jsonlite v1.0.0/go.mod h1:nDjpkpL4EOtqs6NQugUsi0Rleq9sW/OtC1NnZEnxzF0=
1611+
github.com/parquet-go/parquet-go v0.26.4 h1:zJ3l8ef5WJZE2m63pKwyEJ2BhyDlgS0PfOEhuCQQU2A=
1612+
github.com/parquet-go/parquet-go v0.26.4/go.mod h1:h9GcSt41Knf5qXI1tp1TfR8bDBUtvdUMzSKe26aZcHk=
16091613
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
16101614
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
16111615
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=

pkg/alertmanager/alertmanager.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,9 @@ func New(cfg *Config, reg *prometheus.Registry) (*Alertmanager, error) {
220220
}
221221
c := am.state.AddState("nfl:"+cfg.UserID, am.nflog, am.registry)
222222
am.nflog.SetBroadcast(c.Broadcast)
223-
am.wg.Add(1)
224-
go func() {
223+
am.wg.Go(func() {
225224
am.nflog.Maintenance(maintenancePeriod, notificationFile, am.stop, nil)
226-
am.wg.Done()
227-
}()
225+
})
228226
memMarker := types.NewMarker(reg)
229227
am.alertMarker = memMarker
230228
am.groupMarker = memMarker
@@ -268,11 +266,9 @@ func New(cfg *Config, reg *prometheus.Registry) (*Alertmanager, error) {
268266

269267
am.pipelineBuilder = notify.NewPipelineBuilder(am.registry, featureConfig)
270268

271-
am.wg.Add(1)
272-
go func() {
269+
am.wg.Go(func() {
273270
am.silences.Maintenance(maintenancePeriod, silencesFile, am.stop, nil)
274-
am.wg.Done()
275-
}()
271+
})
276272

277273
var callback mem.AlertStoreCallback
278274
if am.cfg.Limits != nil {

pkg/compactor/sharded_block_populator.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,14 @@ func (c ShardedBlockPopulator) PopulateBlock(ctx context.Context, metrics *tsdb.
151151
var chks []chunks.Meta
152152
var wg sync.WaitGroup
153153
r := ref
154-
wg.Add(1)
155-
go func() {
154+
wg.Go(func() {
156155
for curChksIter.Next() {
157156
// We are not iterating in streaming way over chunk as
158157
// it's more efficient to do bulk write for index and
159158
// chunk file purposes.
160159
chks = append(chks, curChksIter.At())
161160
}
162-
wg.Done()
163-
}()
161+
})
164162

165163
ch <- func() error {
166164
wg.Wait()

pkg/distributor/distributor_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4075,7 +4075,6 @@ func TestShardByAllLabelsReturnsWrongResultsForUnsortedLabels(t *testing.T) {
40754075
}
40764076

40774077
func TestSortLabels(t *testing.T) {
4078-
t.Parallel()
40794078
sorted := []cortexpb.LabelAdapter{
40804079
{Name: "__name__", Value: "foo"},
40814080
{Name: "bar", Value: "baz"},

pkg/frontend/v2/frontend_scheduler_worker.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,9 @@ func newFrontendSchedulerWorker(conn *grpc.ClientConn, schedulerAddr string, fro
181181
func (w *frontendSchedulerWorker) start() {
182182
client := schedulerpb.NewSchedulerForFrontendClient(w.conn)
183183
for i := 0; i < w.concurrency; i++ {
184-
w.wg.Add(1)
185-
go func() {
186-
defer w.wg.Done()
184+
w.wg.Go(func() {
187185
w.runOne(w.ctx, client)
188-
}()
186+
})
189187
}
190188
}
191189

pkg/ingester/active_series_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ func benchmarkActiveSeriesConcurrencySingleSeries(b *testing.B, goroutines int)
118118
max := int(math.Ceil(float64(b.N) / float64(goroutines)))
119119
labelhash := series.Hash()
120120
for range goroutines {
121-
wg.Add(1)
122-
go func() {
123-
defer wg.Done()
121+
wg.Go(func() {
124122
<-start
125123

126124
now := time.Now()
@@ -129,7 +127,7 @@ func benchmarkActiveSeriesConcurrencySingleSeries(b *testing.B, goroutines int)
129127
now = now.Add(time.Duration(ix) * time.Millisecond)
130128
c.UpdateSeries(series, labelhash, now, false, copyFn)
131129
}
132-
}()
130+
})
133131
}
134132

135133
b.ResetTimer()

0 commit comments

Comments
 (0)