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

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 bazsi force-pushed the filterx-unmarshal-does-not-cause-variables-to-be-dirty branch 2 times, most recently from e2c6b41 to fd3ecd3 Compare January 7, 2025 19:43
@bazsi bazsi force-pushed the filterx-unmarshal-does-not-cause-variables-to-be-dirty branch from fd3ecd3 to 368b81f Compare January 17, 2025 09:22
bazsi added 7 commits January 18, 2025 08:30
…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]>
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 368b81f to 795ba18 Compare January 18, 2025 07:30
@alltilla alltilla requested a review from OverOrion January 21, 2025 10:01
@OverOrion OverOrion self-assigned this Jan 21, 2025
@OverOrion OverOrion merged commit ca7e054 into axoflow:main Jan 22, 2025
22 checks passed
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.

2 participants