Repository navigation
feat(events)!: advancedFilter becomes a filter expression - #114
Merged
Merged
Conversation
BREAKING CHANGE: `EventFilterForm::set_advanced_filter` takes a string instead
of an `AdvancedEventFilter`, and the `Filter`, `AdvancedEventFilter` and
`RelatedResourceFilter` types are gone. The api replaced the nested
and/or/not JSON with a boolean expression it parses itself:
form.set_advanced_filter("type NOT LIKE 'pump' AND (subType = 'water'
OR subType = 'gas')");
The tree was worth less than it looked. Of the nine `Filter` variants, three
-- Range, ContainsAny, ContainsAll -- had no server-side binding at all and
returned a 500, and `IsSet` reached a code path that could not read the
property it was given. Nothing outside `src/filters.rs` constructed one:
`Filter` was never re-exported at the crate root, `RelatedResourceFilter` had
no public constructor, and the Python bindings never exposed any of it. So the
blast radius is small for something this loud.
The field name and its serde attributes are unchanged, so the wire key is
still `advancedFilter` and an unset filter still omits it rather than sending
`null` -- which matters, because the api rejects unknown and null-typed keys.
`advanced_filter_serializes_as_camel_case` stays as the guard for that and now
also pins the value shape.
Python gains the parameter in the same release rather than being left without
advanced filtering: `advanced_filter=` on both `filter()` methods, through the
shared `event_filter_form` builder, with the two stubs updated.
The expression is validated by the api, not here. An invalid one comes back as
a 400 carrying an offset and, where the fix is unambiguous, the corrected
expression -- so a client can underline the mistake or offer the repair
without knowing the grammar.
Version 0.4.0: removing public types is breaking, and under Cargo's 0.x rules
that is a minor bump. All three manifests move together, as the versions CI
job requires.
Signed-off-by: olav <olav@intellistream.ai>
JosteinGj
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE:
EventFilterForm::set_advanced_filtertakes a string instead of anAdvancedEventFilter, and theFilter,AdvancedEventFilterandRelatedResourceFiltertypes are gone. The api replaced the nested and/or/not JSON with a boolean expression it parses itself:The tree was worth less than it looked. Of the nine
Filtervariants, three -- Range, ContainsAny, ContainsAll -- had no server-side binding at all and returned a 500, andIsSetreached a code path that could not read the property it was given. Nothing outsidesrc/filters.rsconstructed one:Filterwas never re-exported at the crate root,RelatedResourceFilterhad no public constructor, and the Python bindings never exposed any of it. So the blast radius is small for something this loud.The field name and its serde attributes are unchanged, so the wire key is still
advancedFilterand an unset filter still omits it rather than sendingnull-- which matters, because the api rejects unknown and null-typed keys.advanced_filter_serializes_as_camel_casestays as the guard for that and now also pins the value shape.Python gains the parameter in the same release rather than being left without advanced filtering:
advanced_filter=on bothfilter()methods, through the sharedevent_filter_formbuilder, with the two stubs updated.The expression is validated by the api, not here. An invalid one comes back as a 400 carrying an offset and, where the fix is unambiguous, the corrected expression -- so a client can underline the mistake or offer the repair without knowing the grammar.
Version 0.4.0: removing public types is breaking, and under Cargo's 0.x rules that is a minor bump. All three manifests move together, as the versions CI job requires.