Skip to content

promtool: support missing promql syntax features#17926

Merged
bwplotka merged 1 commit intoprometheus:mainfrom
isker:promtool-feature-flags
Feb 9, 2026
Merged

promtool: support missing promql syntax features#17926
bwplotka merged 1 commit intoprometheus:mainfrom
isker:promtool-feature-flags

Conversation

@isker
Copy link
Contributor

@isker isker commented Jan 23, 2026

Namely promql-duration-expr and promql-extended-range-selectors. This allows promtool to e.g. check rules files using syntax gated by these features.

Which issue(s) does the PR fix:

Fixes #17922.

Does this PR introduce a user-facing change?

[ENHANCEMENT] promtool: support promql syntax features `promql-duration-expr` and `promql-extended-range-selectors`

Namely promql-duration-expr and promql-extended-range-selectors. This
allows promtool to e.g. check rules files using syntax gated by these
features.

Signed-off-by: Ian Kerins <git@isk.haus>
@isker isker requested a review from dgl as a code owner January 23, 2026 17:53
@isker isker force-pushed the promtool-feature-flags branch from adcd17a to 96e8e89 Compare January 23, 2026 17:53
@isker
Copy link
Contributor Author

isker commented Jan 23, 2026

Windows test failures do not look related to me:

2026-01-23T17:57:05.5674885Z panic: runtime error: invalid memory address or nil pointer dereference
2026-01-23T17:57:05.5675127Z [signal 0xc0000005 code=0x0 addr=0x18 pc=0x7ff735f4dbcc]
2026-01-23T17:57:05.5675138Z 
2026-01-23T17:57:05.5675268Z goroutine 231319 [running]:
2026-01-23T17:57:05.5675660Z github.com/prometheus/prometheus/scrape.(*scrapeLoop).appender(0xc010601080)
2026-01-23T17:57:05.5675947Z 	D:/a/prometheus/prometheus/scrape/scrape.go:1314 +0xac
2026-01-23T17:57:05.5677117Z github.com/prometheus/prometheus/scrape.(*scrapeLoop).scrapeAndReport(0xc010601080, {0xee105ad71?, 0x7ff736c31c60?, 0x0?}, {0xee105ad71?, 0x7ff736c31c60?, 0x7ff736c31c60?}, 0x0)
2026-01-23T17:57:05.5677427Z 	D:/a/prometheus/prometheus/scrape/scrape.go:1338 +0x385
2026-01-23T17:57:05.5677805Z github.com/prometheus/prometheus/scrape.(*scrapeLoop).run(0xc010601080, 0x0)
2026-01-23T17:57:05.5678068Z 	D:/a/prometheus/prometheus/scrape/scrape.go:1291 +0x34b
2026-01-23T17:57:05.5678844Z github.com/prometheus/prometheus/scrape.(*scrapePool).restartLoops.func1({0x7ff736442678?, 0xc010600d80?}, {0x7ff736442678, 0xc010601080})
2026-01-23T17:57:05.5679086Z 	D:/a/prometheus/prometheus/scrape/scrape.go:368 +0xbd
2026-01-23T17:57:05.5679596Z created by github.com/prometheus/prometheus/scrape.(*scrapePool).restartLoops in goroutine 231318
2026-01-23T17:57:05.5679967Z 	D:/a/prometheus/prometheus/scrape/scrape.go:362 +0x653
2026-01-23T17:57:05.5680193Z FAIL	github.com/prometheus/prometheus/scrape	31.961s

@beorn7 beorn7 requested a review from roidelapluie January 27, 2026 11:12
@beorn7
Copy link
Member

beorn7 commented Jan 27, 2026

Hello from the bug scrub!

THis sounds fair at first glance. @dgl and @roidelapluie could you have a look?

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks

@bwplotka bwplotka merged commit 4383499 into prometheus:main Feb 9, 2026
53 of 54 checks passed
@isker
Copy link
Contributor Author

isker commented Feb 9, 2026

Thanks!

bwplotka added a commit that referenced this pull request Feb 11, 2026
* Update npm dependencies for v3.10

Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>

* Fix critical npm vulnerabilities with npm audit fix

Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>

* UI: Move HistoryCompleteStrategy into its own file and fix lint

Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>

* [REFACTOR] Relabel: Remove unnecessary Process() function

All uses can be replaced by ProcessBuilder, which is more efficient.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* promql: use Kahan summation for Native Histograms (#15687)

As for float samples, Kahan summation is used for the `sum` and `avg` aggregation and for the respective `_over_time` functions.

Kahan summation is not perfect. This commit also adds tests that even Kahan summation cannot reliably pass.
These tests are commented out.

Note that the behavior might be different on other hardware platforms. We have to keep an eye on test failing on other hardware platforms and adjust them accordingly.

Signed-off-by: Aleksandr Smirnov <5targazer@mail.ru>

* fix(docs): typo in prometheus_agent.md doc

Signed-off-by: Mohammad Abbasi <mohammad.v184@gmail.com>

* AWS SD: ECS Standalone Tasks

The current ECS role in AWS SD assumes that a task is part of a service.
This means that tasks that are started as part of AWS Batch will get
missed and not be discovered. This changed fixes this so that standalone
tasks can be discovered as well.

Signed-off-by: matt-gp <small_minority@hotmail.com>

* AWS SD: Optmise MSK Role

Signed-off-by: matt-gp <small_minority@hotmail.com>

* promtool: support missing promql syntax features (#17926)

Namely promql-duration-expr and promql-extended-range-selectors. This
allows promtool to e.g. check rules files using syntax gated by these
features.

Signed-off-by: Ian Kerins <git@isk.haus>

* Also run CI on release tags

Make sure we also run the main CI workflow `v*` release tags
so `publish_release` job is run.

Signed-off-by: SuperQ <superq@gmail.com>

* chore(deps): bump github.com/hashicorp/consul/api from 1.32.0 to 1.33.2 (#17449)

Bumps [github.com/hashicorp/consul/api](https://github.com/hashicorp/consul) from 1.32.0 to 1.33.2.
- [Release notes](https://github.com/hashicorp/consul/releases)
- [Changelog](https://github.com/hashicorp/consul/blob/main/CHANGELOG.md)
- [Commits](hashicorp/consul@api/v1.32.0...api/v1.33.2)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/consul/api
  dependency-version: 1.33.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* AWS SD: Load Region Fallback (#18019)

* AWS SD: Load Region Fallback

---------

Signed-off-by: matt-gp <small_minority@hotmail.com>

* Build riscv64 docker image by default (#17508)

* Allow building riscv64 docker  image

Co-authored by: nijincheng@iscas.ac.cn;

Signed-off-by: ffgan <sudoemt@gmail.com>

* Update Makefile

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: ffgan <sudoemt@gmail.com>

---------

Signed-off-by: ffgan <sudoemt@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>

* Increase Renovate speed (#18052)

* Allow Renovate to run all day on the monthly day.
* Increase the max PRs from 10 to 20.
* Incresae the PR open rate from 2 to 5.

Signed-off-by: SuperQ <superq@gmail.com>

* docs(api): clarify metadata vs remote protocols (#17481)

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

* tsdb/index: export sentinel error for symbol table size exceeded

Signed-off-by: Patryk Prus <p@trykpr.us>

* Update Go dependencies for v3.10 release

Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>

* Kubernetes SD: Disable WatchListClient in tests

Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>

* Replace deprecated google.CredentialsFromJSON with option.WithAuthCredentialsFile

Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>

* chore(deps): update actions/checkout action to v4.3.1 (#18054)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/cache action to v5.0.3 (#18053)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/setup-go action to v6.2.0 (#18055)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

---------

Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Signed-off-by: Aleksandr Smirnov <5targazer@mail.ru>
Signed-off-by: Mohammad Abbasi <mohammad.v184@gmail.com>
Signed-off-by: matt-gp <small_minority@hotmail.com>
Signed-off-by: Ian Kerins <git@isk.haus>
Signed-off-by: SuperQ <superq@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: ffgan <sudoemt@gmail.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: Patryk Prus <p@trykpr.us>
Co-authored-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
Co-authored-by: Bryan Boreham <bjboreham@gmail.com>
Co-authored-by: Sasha <103973965+crush-on-anechka@users.noreply.github.com>
Co-authored-by: Mohammad Abbasi <mohammad.v184@gmail.com>
Co-authored-by: matt-gp <small_minority@hotmail.com>
Co-authored-by: Ian Kerins <git@isk.haus>
Co-authored-by: SuperQ <superq@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Co-authored-by: ffgan <sudoemt@gmail.com>
Co-authored-by: Patryk Prus <p@trykpr.us>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Joe Adams <github@joeadams.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

promtool: parse extended range selectors

3 participants