Skip to content

fix(logql): Handle nil entry in blocked queries slice#21735

Open
chaudum wants to merge 1 commit intomainfrom
chaudum/fix-blocked-query-edgecase
Open

fix(logql): Handle nil entry in blocked queries slice#21735
chaudum wants to merge 1 commit intomainfrom
chaudum/fix-blocked-query-edgecase

Conversation

@chaudum
Copy link
Copy Markdown
Contributor

@chaudum chaudum commented Apr 30, 2026

Summary

This PR fixes an edge case where a nil entry in the blocked queries slice leads to a nil-pointer dereference during execution.

When the blocked queries slice is generated through the tenant limits, this should never be the case.


Note

Low Risk
Low risk: adds a defensive nil check in the blocked-query loop and a regression test; no behavior changes for valid policies.

Overview
Prevents a nil-pointer panic when the BlockedQueries slice contains nil by skipping nil entries during evaluation.

Adds a unit test covering this edge case to ensure queries execute normally when a nil policy is present.

Reviewed by Cursor Bugbot for commit 95c1c78. Bugbot is set up for automated code reviews on this repo. Configure here.

@chaudum chaudum requested a review from a team as a code owner April 30, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant