Skip to content

fix(maintenance_windows): handle invalid CEL syntax gracefully - #6679

Open
aaleksandrov-top wants to merge 1 commit into
keephq:mainfrom
aaleksandrov-top:main
Open

fix(maintenance_windows): handle invalid CEL syntax gracefully#6679
aaleksandrov-top wants to merge 1 commit into
keephq:mainfrom
aaleksandrov-top:main

Conversation

@aaleksandrov-top

@aaleksandrov-top aaleksandrov-top commented Aug 7, 2026

Copy link
Copy Markdown

📑 Description

Wrap CEL compilation and evaluation in a single try-except block to catch all exceptions, including invalid CEL syntax errors. Previously, invalid CEL expressions would crash the event processing pipeline.

Example error that is now handled:
maintenance_window.cel_query = "alert.severity = 'high'" # Invalid: = instead of ==
→ CELParseError: syntax error in expression

Now invalid rules are logged and safely skipped, returning False so alerts continue processing instead of being dropped.

✅ Checks

  • ✅ My pull request adheres to the code style of this project
  • ✅ All the tests have passed

Closed #6683

Wrap CEL compilation and evaluation in a single try-except block to catch
all exceptions, including invalid CEL syntax errors. Previously, invalid
CEL expressions would crash the event processing pipeline.

Example error that is now handled:
  maintenance_window.cel_query = "alert.severity = 'high'"  # Invalid: = instead of ==
  → CELParseError: syntax error in expression

Now invalid rules are logged and safely skipped, returning False so alerts
continue processing instead of being dropped.
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. Bug Something isn't working labels Aug 7, 2026
@CLAassistant

CLAassistant commented Aug 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Unhandled CELParseError in maintenance windows crashes event processing and drops alerts

2 participants