-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Hi, I'm seeing the following issue since v0.74.4 today (link):
EDIT: Maybe related to the Prometheus 0.305.0 update?
panic: runtime error: slice bounds out of range [255:189]
goroutine 53 [running]:
github.com/cloudflare/pint/internal/parser/utils.GetQueryFragment(...)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:399
github.com/cloudflare/pint/internal/parser/utils.FindPosition({0xc0000486e0, 0x159}, {0xc0002d8d78?, 0x1?}, {0x11f7792?, 0x0?})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:1266 +0x10d
github.com/cloudflare/pint/internal/parser/utils.parseAggregation({0xc0000486e0, 0x159}, 0xc000099860)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:592 +0x29d
github.com/cloudflare/pint/internal/parser/utils.walkAggregation({0xc0000486e0, 0x159}, 0xc000099860)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:428 +0x1a5
make: *** [Makefile:80: pint-lint] Error 1
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385640, 0xc000099860})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:287 +0x68a
github.com/cloudflare/pint/internal/parser/utils.walkAggregation({0xc0000486e0, 0x159}, 0xc000099800)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:522 +0x2e5
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385640, 0xc000099800})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:287 +0x68a
github.com/cloudflare/pint/internal/parser/utils.parseBinOps({0xc0000486e0, 0x159}, 0xc000344e80)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:988 +0x1857
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385670, 0xc000344e80})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:290 +0xe9
github.com/cloudflare/pint/internal/parser/utils.parseAggregation({0xc0000486e0, 0x159}, 0xc000099740)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:562 +0xd4
github.com/cloudflare/pint/internal/parser/utils.walkAggregation({0xc0000486e0, 0x159}, 0xc000099740)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:406 +0x27a
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385640, 0xc000099740})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:287 +0x68a
github.com/cloudflare/pint/internal/parser/utils.parseBinOps({0xc0000486e0, 0x159}, 0xc000344fc0)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:861 +0x145
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385670, 0xc000344fc0})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:290 +0xe9
github.com/cloudflare/pint/internal/parser/utils.LabelsSource(...)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:280
github.com/cloudflare/pint/internal/checks.ComparisonCheck.Check({}, {0x0?, _}, {{0x0, 0x0}, 0xc000226380, 0xc0003e8380, {{0x7fffa3cc7d74, 0x16}, {0x7fffa3cc7d74, ...}}, ...}, ...)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/checks/alerts_comparison.go:57 +0x91
main.scanWorker({0x1387698, 0xc0004ea420}, 0xc000390540, 0xc0003905b0)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/cmd/pint/scan.go:168 +0x4d1
main.checkRules.func2()
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/cmd/pint/scan.go:55 +0x56
created by main.checkRules in goroutine 1
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/cmd/pint/scan.go:53 +0x7e5
panic: runtime error: slice bounds out of range [255:189]
goroutine 52 [running]:
github.com/cloudflare/pint/internal/parser/utils.GetQueryFragment(...)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:399
github.com/cloudflare/pint/internal/parser/utils.FindPosition({0xc0000486e0, 0x159}, {0xc0002d4df0?, 0x1?}, {0x11f7792?, 0x0?})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:1266 +0x10d
github.com/cloudflare/pint/internal/parser/utils.parseAggregation({0xc0000486e0, 0x159}, 0xc000099860)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:592 +0x29d
github.com/cloudflare/pint/internal/parser/utils.walkAggregation({0xc0000486e0, 0x159}, 0xc000099860)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:428 +0x1a5
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385640, 0xc000099860})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:287 +0x68a
github.com/cloudflare/pint/internal/parser/utils.walkAggregation({0xc0000486e0, 0x159}, 0xc000099800)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:522 +0x2e5
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385640, 0xc000099800})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:287 +0x68a
github.com/cloudflare/pint/internal/parser/utils.parseBinOps({0xc0000486e0, 0x159}, 0xc000344e80)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:988 +0x1857
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385670, 0xc000344e80})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:290 +0xe9
github.com/cloudflare/pint/internal/parser/utils.parseAggregation({0xc0000486e0, 0x159}, 0xc000099740)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:562 +0xd4
github.com/cloudflare/pint/internal/parser/utils.walkAggregation({0xc0000486e0, 0x159}, 0xc000099740)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:406 +0x27a
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385640, 0xc000099740})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:287 +0x68a
github.com/cloudflare/pint/internal/parser/utils.parseBinOps({0xc0000486e0, 0x159}, 0xc000344fc0)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:861 +0x145
github.com/cloudflare/pint/internal/parser/utils.walkNode({0xc0000486e0, 0x159}, {0x1385670, 0xc000344fc0})
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:290 +0xe9
github.com/cloudflare/pint/internal/parser/utils.LabelsSource(...)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/parser/utils/source.go:280
github.com/cloudflare/pint/internal/checks.FragileCheck.Check({}, {0x0?, _}, {{0x0, 0x0}, 0xc000226380, 0xc0003e8380, {{0x7fffa3cc7d74, 0x16}, {0x7fffa3cc7d74, ...}}, ...}, ...)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/internal/checks/promql_fragile.go:65 +0xd1
main.scanWorker({0x1387698, 0xc0004ea420}, 0xc000390540, 0xc0003905b0)
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/cmd/pint/scan.go:168 +0x4d1
main.checkRules.func2()
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/cmd/pint/scan.go:55 +0x56
created by main.checkRules in goroutine 1
/home/runner/go/pkg/mod/github.com/cloudflare/[email protected]/cmd/pint/scan.go:53 +0x7e5
Error: Process completed with exit code 2.
Metadata
Metadata
Assignees
Labels
No labels