Skip to content

Commit 1ead7d2

Browse files
authored
add fuzz test for compatibility with latest Cortex and Prometheus release (#6298)
1 parent 4063773 commit 1ead7d2

File tree

9 files changed

+441
-105
lines changed

9 files changed

+441
-105
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ jobs:
189189
docker pull quay.io/cortexproject/cortex:v1.17.0
190190
docker pull quay.io/cortexproject/cortex:v1.17.1
191191
docker pull quay.io/cortexproject/cortex:v1.18.0
192+
docker pull quay.io/cortexproject/cortex:v1.18.1
193+
elif [ "$TEST_TAGS" = "integration_query_fuzz" ]; then
194+
docker pull quay.io/cortexproject/cortex:v1.18.1
195+
docker pull quay.io/prometheus/prometheus:v2.51.0
196+
docker pull quay.io/prometheus/prometheus:v2.55.0
192197
fi
193198
docker pull memcached:1.6.1
194199
docker pull redis:7.0.4-alpine

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/aws/aws-sdk-go v1.55.5
1111
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874
1212
github.com/cespare/xxhash v1.1.0
13-
github.com/cortexproject/promqlsmith v0.0.0-20240506042652-6cfdd9739a5e
13+
github.com/cortexproject/promqlsmith v0.0.0-20241101182713-3eec5725bc3f
1414
github.com/dustin/go-humanize v1.0.1
1515
github.com/efficientgo/core v1.0.0-rc.3
1616
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,8 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
944944
github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
945945
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
946946
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
947-
github.com/cortexproject/promqlsmith v0.0.0-20240506042652-6cfdd9739a5e h1:nOWmgQD3L/Z0bmm29iDxB7nlqjMnh7yD/PNOx9rnZmA=
948-
github.com/cortexproject/promqlsmith v0.0.0-20240506042652-6cfdd9739a5e/go.mod h1:+bSqRETXJ1uk2S93m//htzTVqu8DJPvlGEb3bSE9PzI=
947+
github.com/cortexproject/promqlsmith v0.0.0-20241101182713-3eec5725bc3f h1:5C8PGy3GN+qqQatdDMU5bXFIspoIngMuyD7UCWkMiRA=
948+
github.com/cortexproject/promqlsmith v0.0.0-20241101182713-3eec5725bc3f/go.mod h1:ypUb6BfnDVr7QrBgAxtzRqZ573swvka0BdCkPqa2A5g=
949949
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
950950
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
951951
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

integration/e2e/db/db.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,17 @@ func NewETCD() *e2e.HTTPService {
6969
9000, // Metrics
7070
)
7171
}
72-
func NewPrometheus(flags map[string]string) *e2e.HTTPService {
73-
return NewPrometheusWithName("prometheus", flags)
72+
func NewPrometheus(image string, flags map[string]string) *e2e.HTTPService {
73+
return NewPrometheusWithName("prometheus", image, flags)
7474
}
7575

76-
func NewPrometheusWithName(name string, flags map[string]string) *e2e.HTTPService {
76+
func NewPrometheusWithName(name string, image string, flags map[string]string) *e2e.HTTPService {
77+
if image == "" {
78+
image = images.Prometheus
79+
}
7780
prom := e2e.NewHTTPService(
7881
name,
79-
images.Prometheus,
82+
image,
8083
e2e.NewCommandWithoutEntrypoint("prometheus", e2e.BuildArgs(e2e.MergeFlags(map[string]string{
8184
"--storage.tsdb.path": filepath.Join(e2e.ContainerSharedDir, "data"),
8285
"--storage.tsdb.max-block-duration": "2h",

0 commit comments

Comments
 (0)