Skip to content

Commit

Permalink
add fuzz test for compatibility with latest Cortex and Prometheus rel…
Browse files Browse the repository at this point in the history
…ease (#6298)
  • Loading branch information
yeya24 authored Nov 1, 2024
1 parent 4063773 commit 1ead7d2
Show file tree
Hide file tree
Showing 9 changed files with 441 additions and 105 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ jobs:
docker pull quay.io/cortexproject/cortex:v1.17.0
docker pull quay.io/cortexproject/cortex:v1.17.1
docker pull quay.io/cortexproject/cortex:v1.18.0
docker pull quay.io/cortexproject/cortex:v1.18.1
elif [ "$TEST_TAGS" = "integration_query_fuzz" ]; then
docker pull quay.io/cortexproject/cortex:v1.18.1
docker pull quay.io/prometheus/prometheus:v2.51.0
docker pull quay.io/prometheus/prometheus:v2.55.0
fi
docker pull memcached:1.6.1
docker pull redis:7.0.4-alpine
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/aws/aws-sdk-go v1.55.5
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874
github.com/cespare/xxhash v1.1.0
github.com/cortexproject/promqlsmith v0.0.0-20240506042652-6cfdd9739a5e
github.com/cortexproject/promqlsmith v0.0.0-20241101182713-3eec5725bc3f
github.com/dustin/go-humanize v1.0.1
github.com/efficientgo/core v1.0.0-rc.3
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,8 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cortexproject/promqlsmith v0.0.0-20240506042652-6cfdd9739a5e h1:nOWmgQD3L/Z0bmm29iDxB7nlqjMnh7yD/PNOx9rnZmA=
github.com/cortexproject/promqlsmith v0.0.0-20240506042652-6cfdd9739a5e/go.mod h1:+bSqRETXJ1uk2S93m//htzTVqu8DJPvlGEb3bSE9PzI=
github.com/cortexproject/promqlsmith v0.0.0-20241101182713-3eec5725bc3f h1:5C8PGy3GN+qqQatdDMU5bXFIspoIngMuyD7UCWkMiRA=
github.com/cortexproject/promqlsmith v0.0.0-20241101182713-3eec5725bc3f/go.mod h1:ypUb6BfnDVr7QrBgAxtzRqZ573swvka0BdCkPqa2A5g=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
11 changes: 7 additions & 4 deletions integration/e2e/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,17 @@ func NewETCD() *e2e.HTTPService {
9000, // Metrics
)
}
func NewPrometheus(flags map[string]string) *e2e.HTTPService {
return NewPrometheusWithName("prometheus", flags)
func NewPrometheus(image string, flags map[string]string) *e2e.HTTPService {
return NewPrometheusWithName("prometheus", image, flags)
}

func NewPrometheusWithName(name string, flags map[string]string) *e2e.HTTPService {
func NewPrometheusWithName(name string, image string, flags map[string]string) *e2e.HTTPService {
if image == "" {
image = images.Prometheus
}
prom := e2e.NewHTTPService(
name,
images.Prometheus,
image,
e2e.NewCommandWithoutEntrypoint("prometheus", e2e.BuildArgs(e2e.MergeFlags(map[string]string{
"--storage.tsdb.path": filepath.Join(e2e.ContainerSharedDir, "data"),
"--storage.tsdb.max-block-duration": "2h",
Expand Down
Loading

0 comments on commit 1ead7d2

Please sign in to comment.