Skip to content

fix(report): raise warning when filter type not recognized#38676

Open
alexandrusoare wants to merge 1 commit intoalexandrusoare/fix/key-error-for-reportsfrom
alexandrusoare/fix/handle-filter-for-reports
Open

fix(report): raise warning when filter type not recognized#38676
alexandrusoare wants to merge 1 commit intoalexandrusoare/fix/key-error-for-reportsfrom
alexandrusoare/fix/handle-filter-for-reports

Conversation

@alexandrusoare
Copy link
Contributor

@alexandrusoare alexandrusoare commented Mar 16, 2026

SUMMARY

Changes

  • Modified _generate_native_filter() to return a tuple (filter_config, warning) instead of just filter_config
  • When an unknown filter type is encountered, returns empty dict with a warning message
  • Updated get_native_filters_params() to collect warnings from _generate_native_filter()
  • Added tests for unknown filter type handling

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Mar 16, 2026

Bito Automatic Review Skipped - Branch Excluded

Bito didn't auto-review because the source or target branch is excluded from automatic reviews.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change the branch exclusion settings here, or contact your Bito workspace admin at evan@preset.io.

@alexandrusoare alexandrusoare marked this pull request as ready for review March 16, 2026 13:14
@dosubot dosubot bot added alert-reports Namespace | Anything related to the Alert & Reports feature change:backend Requires changing the backend labels Mar 16, 2026
Copy link
Member

@msyavuz msyavuz left a comment

Choose a reason for hiding this comment

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

LGTM!

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

Labels

alert-reports Namespace | Anything related to the Alert & Reports feature change:backend Requires changing the backend size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants