Skip to content

[BUGFIX] PromQL: fix slice indexing bug in info function#17135

Merged
aknuds1 merged 4 commits intoprometheus:mainfrom
linasm:fix-info-function-bug
Sep 5, 2025
Merged

[BUGFIX] PromQL: fix slice indexing bug in info function#17135
aknuds1 merged 4 commits intoprometheus:mainfrom
linasm:fix-info-function-bug

Conversation

@linasm
Copy link
Contributor

@linasm linasm commented Sep 3, 2025

Which issue(s) does the PR fix:

Fixes #17134.
Slice indices were being used for matching between data and info series, but those indices are not stable - they may change from step to step in the presence of time series churn. Replaced indices with hashes for robust matching instead.
Also added more details to the error message to make diagnosing issues like this easier when using the function at scale.

Does this PR introduce a user-facing change?

[BUGFIX] PromQL: Fix info function on churning series

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

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

Nice fix! Would you mind applying my suggestions?

Also: Not a blocker, but I think a bugfix changelog entry would be nice.

linasm and others added 2 commits September 5, 2025 15:05
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Linas Medžiūnas <linasm@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Linas Medžiūnas <linasm@users.noreply.github.com>
@linasm
Copy link
Contributor Author

linasm commented Sep 5, 2025

Nice fix! Would you mind applying my suggestions?

Also: Not a blocker, but I think a bugfix changelog entry would be nice.

Thanks for a quick review! Accepted both suggestions and added a changelog item.

@linasm linasm requested a review from aknuds1 September 5, 2025 12:07
@aknuds1
Copy link
Contributor

aknuds1 commented Sep 5, 2025

Thanks for a quick review! Accepted both suggestions and added a changelog item.

Thanks! Did you forget to push the changelog change though?

Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
@linasm linasm force-pushed the fix-info-function-bug branch from 4751693 to ef051c3 Compare September 5, 2025 12:29
@linasm
Copy link
Contributor Author

linasm commented Sep 5, 2025

Thanks! Did you forget to push the changelog change though?

My bad, I though this was about the entry in PR description. Pushed CHANGELOG.md change now.

@aknuds1 aknuds1 merged commit 5c2e43f into prometheus:main Sep 5, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

info(...) function fails on time series churn

2 participants