Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filterx unmarshal does not cause variables to be dirty #446

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

bazsi
Copy link
Member

@bazsi bazsi commented Jan 7, 2025

This branch improves "changed" detection of variables, by not considering variables to be changed if all we do is unmarshal them.

It comes with a set of preparatory steps/refactors. Some of these can be considered unrelated, but I didn't want to open PRs separately.

bazsi added 6 commits January 7, 2025 20:04
…in addition to is_floating

Signed-off-by: Balazs Scheidler <[email protected]>
…instances

We do not really support message contexts (as does the original filter
language and templates), so remove that support.

This makes it simpler to initialize FilterXEvalContext as well as we do
not have to manage the LogMessage array separately.

Signed-off-by: Balazs Scheidler <[email protected]>
It does not really free @self, so it only clears up allocations
within an existing instance, these are usually called *_clear() functions.

Signed-off-by: Balazs Scheidler <[email protected]>
…ayer

Previously the type enum was only used during the initialization of
FilterXExprVariable which was then translated to a set of booleans
at the variable layer. Also clean up naming a bit.

Signed-off-by: Balazs Scheidler <[email protected]>
@bazsi bazsi force-pushed the filterx-unmarshal-does-not-cause-variables-to-be-dirty branch from 2f4a91f to e2c6b41 Compare January 7, 2025 19:26
If we pull in a variable from the message and we need to unmarshal it
(e.g. turn FilterXMessageValue to a more specific type like FilterXString or
FilterXJSON), do not consider that a change of that variable.

Changing it in-place, or assignment of a new value should be remain to
be a change.

Signed-off-by: Balazs Scheidler <[email protected]>
@bazsi bazsi force-pushed the filterx-unmarshal-does-not-cause-variables-to-be-dirty branch from e2c6b41 to fd3ecd3 Compare January 7, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant