Skip to content

Commit 53f7ae7

Browse files
authored
Use go1.26 from ee0b97c (#7437)
* Use go1.26 from ee0b97c Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Update changelog Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Update to 1.26.2 Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Modernize Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Remove unused functions Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> * Modernize again Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com> --------- Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
1 parent ee0b97c commit 53f7ae7

File tree

11 files changed

+91
-98
lines changed

11 files changed

+91
-98
lines changed

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

Lines changed: 7 additions & 7 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-fe84258322
20+
image: quay.io/cortexproject/build-image:master-ee0b97cc37
2121
steps:
2222
- name: Checkout Repo
2323
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -53,7 +53,7 @@ jobs:
5353
name: test (${{ matrix.name }})
5454
runs-on: ${{ matrix.runner }}
5555
container:
56-
image: quay.io/cortexproject/build-image:master-fe84258322
56+
image: quay.io/cortexproject/build-image:master-ee0b97cc37
5757
steps:
5858
- name: Checkout Repo
5959
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -81,7 +81,7 @@ jobs:
8181
name: test-no-race (${{ matrix.name }})
8282
runs-on: ${{ matrix.runner }}
8383
container:
84-
image: quay.io/cortexproject/build-image:master-fe84258322
84+
image: quay.io/cortexproject/build-image:master-ee0b97cc37
8585
steps:
8686
- name: Checkout Repo
8787
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -124,7 +124,7 @@ jobs:
124124
build:
125125
runs-on: ubuntu-24.04
126126
container:
127-
image: quay.io/cortexproject/build-image:master-fe84258322
127+
image: quay.io/cortexproject/build-image:master-ee0b97cc37
128128
steps:
129129
- name: Checkout Repo
130130
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -228,7 +228,7 @@ jobs:
228228
- name: Upgrade golang
229229
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
230230
with:
231-
go-version: 1.25.8
231+
go-version: 1.26.2
232232
- name: Checkout Repo
233233
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
234234
- name: Install Docker Client
@@ -311,14 +311,14 @@ jobs:
311311
touch build-image/.uptodate
312312
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations
313313
echo "Running configs integration tests on ${{ matrix.arch }}"
314-
make BUILD_IMAGE=quay.io/cortexproject/build-image:master-fe84258322 TTY='' configs-integration-test
314+
make BUILD_IMAGE=quay.io/cortexproject/build-image:master-ee0b97cc37 TTY='' configs-integration-test
315315
316316
deploy:
317317
needs: [build, test, lint, integration, integration-configs-db]
318318
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
319319
runs-on: ubuntu-24.04
320320
container:
321-
image: quay.io/cortexproject/build-image:master-fe84258322
321+
image: quay.io/cortexproject/build-image:master-ee0b97cc37
322322
steps:
323323
- name: Checkout Repo
324324
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* [ENHANCEMENT] Distributor: Introduce dynamic `Symbols` slice capacity pooling. #7398 #7401
99
* [ENHANCEMENT] Metrics Helper: Add native histogram support for aggregating and merging, including dual-format histogram handling that exposes both native and classic bucket formats. #7359
1010
* [ENHANCEMENT] Cache: Add per-tenant TTL configuration for query results cache to control cache expiration on a per-tenant basis with separate TTLs for regular and out-of-order data. #7357
11+
* [ENHANCEMENT] Update build image and Go version to 1.26. #7437
1112
* [CHANGE] Querier: Make query time range configurations per-tenant: `query_ingesters_within`, `query_store_after`, and `shuffle_sharding_ingesters_lookback_period`. Uses `model.Duration` instead of `time.Duration` to support serialization but has minimum unit of 1ms (nanoseconds/microseconds not supported). #7160
1213
* [ENHANCEMENT] Tenant Federation: Add a local cache to regex resolver. #7363
1314
* [ENHANCEMENT] Query Scheduler: Add `cortex_query_scheduler_tracked_requests` metric to track the current number of requests held by the scheduler. #7355

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-fe84258322
115+
LATEST_BUILD_IMAGE_TAG ?= master-ee0b97cc37
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

go.mod

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

3-
go 1.25.0
3+
go 1.26.0
44

55
require (
66
github.com/Masterminds/squirrel v1.5.4

pkg/alertmanager/api.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ func validateAlertmanagerConfig(cfg any) error {
405405

406406
// If the input config is a struct, recursively iterate on all fields.
407407
if t.Kind() == reflect.Struct {
408-
for i := 0; i < t.NumField(); i++ {
409-
field := t.Field(i)
408+
for field := range t.Fields() {
410409
fieldValue := v.FieldByIndex(field.Index)
411410

412411
// Skip any field value which can't be converted to interface (eg. primitive types).

pkg/ring/kv/multi_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,14 @@ import (
77
"gopkg.in/yaml.v2"
88
)
99

10-
func boolPtr(b bool) *bool {
11-
return &b
12-
}
13-
1410
func TestMultiRuntimeConfigWithVariousEnabledValues(t *testing.T) {
1511
testcases := map[string]struct {
1612
yaml string
1713
expected *bool
1814
}{
1915
"nil": {"primary: test", nil},
20-
"true": {"primary: test\nmirror_enabled: true", boolPtr(true)},
21-
"false": {"mirror_enabled: false", boolPtr(false)},
16+
"true": {"primary: test\nmirror_enabled: true", new(true)},
17+
"false": {"mirror_enabled: false", new(false)},
2218
}
2319

2420
for name, tc := range testcases {

pkg/util/metrics_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ func makeBucketsFromMap(buckets map[int]int64) ([]*dto.BucketSpan, []int64) {
11801180
// at the very beginning, or because we have found a gap
11811181
// of more than two buckets.
11821182
spans = append(spans, &dto.BucketSpan{
1183-
Offset: proto.Int32(iDelta),
1183+
Offset: new(iDelta),
11841184
Length: proto.Uint32(0),
11851185
})
11861186
} else {

0 commit comments

Comments
 (0)