Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build-dist:
runs-on: ubuntu-24.04
container:
image: quay.io/cortexproject/build-image:master-5607698940
image: quay.io/cortexproject/build-image:master-7bc8b2491b
steps:
- name: Checkout Repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
lint:
runs-on: ubuntu-24.04
container:
image: quay.io/cortexproject/build-image:master-5607698940
image: quay.io/cortexproject/build-image:master-7bc8b2491b
steps:
- name: Checkout Repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
name: test (${{ matrix.name }})
runs-on: ${{ matrix.runner }}
container:
image: quay.io/cortexproject/build-image:master-5607698940
image: quay.io/cortexproject/build-image:master-7bc8b2491b
steps:
- name: Checkout Repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
name: test-no-race (${{ matrix.name }})
runs-on: ${{ matrix.runner }}
container:
image: quay.io/cortexproject/build-image:master-5607698940
image: quay.io/cortexproject/build-image:master-7bc8b2491b
steps:
- name: Checkout Repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
build:
runs-on: ubuntu-24.04
container:
image: quay.io/cortexproject/build-image:master-5607698940
image: quay.io/cortexproject/build-image:master-7bc8b2491b
outputs:
image_tag: ${{ steps.image-tag.outputs.image_tag }}
steps:
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
name: build-integration-tests (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
container:
image: quay.io/cortexproject/build-image:master-5607698940
image: quay.io/cortexproject/build-image:master-7bc8b2491b
steps:
- name: Checkout Repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down Expand Up @@ -357,7 +357,7 @@ jobs:
if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex'
runs-on: ubuntu-24.04
container:
image: quay.io/cortexproject/build-image:master-5607698940
image: quay.io/cortexproject/build-image:master-7bc8b2491b
steps:
- name: Checkout Repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
* [ENHANCEMENT] Upgrade Thanos and promql-engine to latest. #7740
* [ENHANCEMENT] Ruler: Adjust ruler frontend decoder to not wrap query error messages with execution prefix, this makes error responses consistent between internal and external ruler paths. #7741
* [ENHANCEMENT] Distributor: Deduplicate metric metadata when converting PRW 2.0 requests. PRW 2.0 attaches metadata to every series, so a metric family was previously expanded into one `MetricMetadata` per series. #7760
* [ENHANCEMENT] Update build image and Go version to 1.27.0. #7814
* [BUGFIX] Querier: Fix queryWithRetry and labelsWithRetry returning (nil, nil) on cancelled context by propagating ctx.Err(). #7370
* [BUGFIX] Metrics Helper: Fix non-deterministic bucket order in merged histograms by sorting buckets after map iteration, matching Prometheus client library behavior. #7380
* [BUGFIX] Distributor: Return HTTP 401 Unauthorized when tenant ID resolution fails in the Prometheus Remote Write 2.0 path. #7389
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ build-image/$(UPTODATE): build-image/*
SUDO := $(shell docker info >/dev/null 2>&1 || echo "sudo -E")
BUILD_IN_CONTAINER := true
BUILD_IMAGE ?= $(IMAGE_PREFIX)build-image
LATEST_BUILD_IMAGE_TAG ?= master-5607698940
LATEST_BUILD_IMAGE_TAG ?= master-7bc8b2491b

# TTY is parameterized to allow Google Cloud Builder to run builds,
# as it currently disallows TTY devices. This value needs to be overridden
Expand Down Expand Up @@ -223,7 +223,7 @@ check-protos: clean-protos protos
@git diff --exit-code -- $(PROTO_GOS)

modernize:
GOTOOLCHAIN=auto go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.22.0 -fix ./...
GOTOOLCHAIN=auto go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.23.0 -fix ./...

# Generates the config file documentation.
doc: clean-doc
Expand Down
57 changes: 27 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,62 +1,80 @@
module github.com/cortexproject/cortex

go 1.26.0
go 1.27.0

require (
github.com/Masterminds/squirrel v1.5.4
github.com/VictoriaMetrics/fastcache v1.13.3
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b
github.com/alicebob/miniredis/v2 v2.38.0
github.com/aws/aws-sdk-go-v2 v1.42.0
github.com/aws/aws-sdk-go-v2/config v1.32.26
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.59.1
github.com/axiomhq/hyperloglog v0.2.6
github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3
github.com/bradfitz/gomemcache v0.0.0-20250403215159-8d39553ac7cf
github.com/cespare/xxhash/v2 v2.3.0
github.com/cortexproject/promqlsmith v0.0.0-20260205231645-0c8ef5fe46a5
github.com/dustin/go-humanize v1.0.1
github.com/edsrzf/mmap-go v1.2.0
github.com/efficientgo/core v1.0.0-rc.3
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
github.com/felixge/fgprof v0.9.5
github.com/go-kit/log v0.2.1
github.com/go-openapi/strfmt v0.26.4
github.com/go-openapi/swag v0.26.0 // indirect
github.com/go-openapi/swag/jsonutils v0.27.0
github.com/go-redis/redis/v8 v8.11.5
github.com/gogo/protobuf v1.3.2
github.com/gogo/status v1.1.1
github.com/golang-migrate/migrate/v4 v4.19.1
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v1.0.0
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/hashicorp/consul/api v1.34.3
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-metrics v0.6.0
github.com/hashicorp/go-sockaddr v1.0.7
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/hashicorp/memberlist v0.5.4
github.com/json-iterator/go v1.1.12
github.com/klauspost/compress v1.18.7
github.com/lib/pq v1.11.2 // indirect
github.com/minio/minio-go/v7 v7.2.1
github.com/mitchellh/go-wordwrap v1.0.1
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
github.com/oklog/ulid v1.3.1
github.com/oklog/ulid/v2 v2.1.1
github.com/opentracing-contrib/go-grpc v0.1.4
github.com/opentracing-contrib/go-stdlib v1.1.1
github.com/opentracing/opentracing-go v1.2.0
github.com/parquet-go/parquet-go v0.30.1
github.com/pkg/errors v0.9.1
github.com/prometheus-community/parquet-common v0.0.0-20260614025832-5f32460b5373
github.com/prometheus/alertmanager v0.33.0
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/client_golang/exp v0.0.0-20251212205219-7ba246a648ca
github.com/prometheus/client_model v0.6.2
github.com/prometheus/common v0.69.0
github.com/prometheus/procfs v0.21.0
// Prometheus maps version 3.x.y to tags v0.30x.y.
github.com/prometheus/prometheus v0.309.1
github.com/segmentio/fasthash v1.0.3
github.com/sercand/kuberesolver/v5 v5.1.1
github.com/sony/gobreaker v1.0.0
github.com/spf13/afero v1.15.0
github.com/stretchr/testify v1.11.1
github.com/thanos-io/objstore v0.0.0-20250804093838-71d60dfee488
github.com/thanos-io/promql-engine v0.0.0-20260729073658-f8bd3f940687
github.com/thanos-io/thanos v0.42.1-0.20260727122508-92397939e4cc
github.com/tjhop/slog-gokit v0.2.0
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5
go.etcd.io/etcd/api/v3 v3.5.17
go.etcd.io/etcd/client/pkg/v3 v3.5.17
go.etcd.io/etcd/client/v3 v3.5.17
go.opentelemetry.io/collector/pdata v1.61.0
go.opentelemetry.io/contrib/propagators/aws v1.44.0
go.opentelemetry.io/otel v1.45.0
go.opentelemetry.io/otel/bridge/opentracing v1.45.0
Expand All @@ -65,40 +83,16 @@ require (
go.opentelemetry.io/otel/sdk v1.44.0
go.opentelemetry.io/otel/trace v1.45.0
go.uber.org/atomic v1.11.0
go.uber.org/automaxprocs v1.6.0
golang.org/x/net v0.57.0
golang.org/x/sync v0.22.0
golang.org/x/time v0.15.0
google.golang.org/grpc v1.83.0
google.golang.org/protobuf v1.36.11
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/VictoriaMetrics/fastcache v1.13.3
github.com/aws/aws-sdk-go-v2 v1.42.0
github.com/aws/aws-sdk-go-v2/config v1.32.26
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.59.1
github.com/axiomhq/hyperloglog v0.2.6
github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3
github.com/cespare/xxhash/v2 v2.3.0
github.com/edsrzf/mmap-go v1.2.0
github.com/go-openapi/swag/jsonutils v0.27.0
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
github.com/oklog/ulid/v2 v2.1.1
github.com/parquet-go/parquet-go v0.30.1
github.com/prometheus-community/parquet-common v0.0.0-20260614025832-5f32460b5373
github.com/prometheus/client_golang/exp v0.0.0-20251212205219-7ba246a648ca
github.com/prometheus/procfs v0.21.0
github.com/sercand/kuberesolver/v5 v5.1.1
github.com/tjhop/slog-gokit v0.2.0
go.opentelemetry.io/collector/pdata v1.61.0
go.uber.org/automaxprocs v1.6.0
google.golang.org/protobuf v1.36.11
)

require (
cel.dev/expr v0.25.2 // indirect
cloud.google.com/go v0.121.6 // indirect
Expand Down Expand Up @@ -172,6 +166,7 @@ require (
github.com/go-openapi/loads v0.23.3 // indirect
github.com/go-openapi/runtime v0.29.4 // indirect
github.com/go-openapi/spec v0.22.4 // indirect
github.com/go-openapi/swag v0.26.0 // indirect
github.com/go-openapi/swag/cmdutils v0.26.0 // indirect
github.com/go-openapi/swag/conv v0.27.0 // indirect
github.com/go-openapi/swag/fileutils v0.26.0 // indirect
Expand All @@ -189,6 +184,7 @@ require (
github.com/gogo/googleapis v1.4.1 // indirect
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f // indirect
Expand Down Expand Up @@ -219,6 +215,7 @@ require (
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/lib/pq v1.11.2 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mdlayher/socket v0.5.1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions integration/query_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1599,10 +1599,10 @@ func TestStoreGatewayLazyExpandedPostingsSeriesFuzzWithPrometheus(t *testing.T)

flags := mergeFlags(BlocksStorageFlags(), map[string]string{
"-blocks-storage.bucket-store.index-cache.backend": tsdb.IndexCacheBackendInMemory,
"-ring.store": "consul",
"-consul.hostname": consul.NetworkHTTPEndpoint(),
"-store-gateway.sharding-enabled": "false",
"-blocks-storage.bucket-store.sync-interval": "1s",
"-ring.store": "consul",
"-consul.hostname": consul.NetworkHTTPEndpoint(),
"-store-gateway.sharding-enabled": "false",
"-blocks-storage.bucket-store.sync-interval": "1s",
"-blocks-storage.bucket-store.lazy-expanded-postings-enabled": "true",
})

Expand Down
40 changes: 18 additions & 22 deletions pkg/alertmanager/alertmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,33 +143,29 @@ route:

inputAlerts := []*alert.Alert{
{
Alert: model.Alert{
Labels: model.LabelSet{
"alertname": alertName,
"a": "b",
},
Annotations: model.LabelSet{"foo": "bar"},
StartsAt: now,
EndsAt: now.Add(5 * time.Minute),
GeneratorURL: "http://example.com/prometheus",
Labels: model.LabelSet{
"alertname": alertName,
"a": "b",
},
UpdatedAt: now,
Timeout: false,
Annotations: model.LabelSet{"foo": "bar"},
StartsAt: now,
EndsAt: now.Add(5 * time.Minute),
GeneratorURL: "http://example.com/prometheus",
UpdatedAt: now,
Timeout: false,
},

{
Alert: model.Alert{
Labels: model.LabelSet{
"alertname": alertName,
"z": "y",
},
Annotations: model.LabelSet{"foo": "bar"},
StartsAt: now,
EndsAt: now.Add(5 * time.Minute),
GeneratorURL: "http://example.com/prometheus",
Labels: model.LabelSet{
"alertname": alertName,
"z": "y",
},
UpdatedAt: now,
Timeout: false,
Annotations: model.LabelSet{"foo": "bar"},
StartsAt: now,
EndsAt: now.Add(5 * time.Minute),
GeneratorURL: "http://example.com/prometheus",
UpdatedAt: now,
Timeout: false,
},
}
require.NoError(t, am.alerts.Put(context.Background(), inputAlerts...))
Expand Down
6 changes: 3 additions & 3 deletions pkg/alertmanager/alertmanagerpb/alertmanager.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/alertmanager/alertspb/alerts.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions pkg/alertmanager/merger/v2_alerts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,11 @@ func v2alert(fingerprint, annotation, updatedAt string) *v2_models.GettableAlert
Name: &receiver,
},
},
StartsAt: v2ParseTime("2020-01-01T12:00:00.000Z"),
Status: &v2_models.AlertStatus{},
UpdatedAt: v2ParseTime(updatedAt),
Alert: v2_models.Alert{
GeneratorURL: strfmt.URI("something"),
Labels: v2_models.LabelSet{"label1": "foo"},
},
StartsAt: v2ParseTime("2020-01-01T12:00:00.000Z"),
Status: &v2_models.AlertStatus{},
UpdatedAt: v2ParseTime(updatedAt),
GeneratorURL: strfmt.URI("something"),
Labels: v2_models.LabelSet{"label1": "foo"},
}
}

Expand Down
22 changes: 10 additions & 12 deletions pkg/alertmanager/merger/v2_silences_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,18 @@ func v2silence(id, endsAt, updatedAt string) *v2_models.GettableSilence {
State: &active,
},
UpdatedAt: v2ParseTime(updatedAt),
Silence: v2_models.Silence{
Comment: &comment,
CreatedBy: &createdBy,
EndsAt: v2ParseTime(endsAt),
Matchers: v2_models.Matchers{
&v2_models.Matcher{
IsEqual: &isEqual,
IsRegex: &isRegex,
Name: &name,
Value: &value,
},
Comment: &comment,
CreatedBy: &createdBy,
EndsAt: v2ParseTime(endsAt),
Matchers: v2_models.Matchers{
&v2_models.Matcher{
IsEqual: &isEqual,
IsRegex: &isRegex,
Name: &name,
Value: &value,
},
StartsAt: v2ParseTime("2020-01-01T12:00:00.000Z"),
},
StartsAt: v2ParseTime("2020-01-01T12:00:00.000Z"),
}
}

Expand Down
Loading