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

Pipeline rule simulator: fields with timezone offset are incorrectly serialized/deserialized and lose the timezone information #19497

Open
patrickmann opened this issue May 30, 2024 · 0 comments

Comments

@patrickmann
Copy link
Contributor

Timezone information is lost when simulating a pipeline rule.

Expected Behavior

Timezone information should be preserved

Current Behavior

Create a rule using timezones, e.g.:

rule "x"
when
true
then
set_field(field: "1_Utctimestamp3",
value: parse_unix_milliseconds(
value: 1715673672000,
timezone: "America/Denver")
);
set_field(field: "1_Utctimestamp4",
value: parse_unix_milliseconds(
value: 1715673672000,
timezone: "America/Toronto")
);
end

When this is run in the simulator, the fields show up with the same UTC value in the results pane.
Debugging confirmed that the pipeline interpreter returns the correct values.; however, the JSON data returned from system/pipelines/rule/simulate lacks the timezone offset. It is lost in serializing/deserializing.

This is a known Jackson/Joda issue.

Context

This does not affect the actual pipeline, since the problem only occurs when sending the results back to the frontend.
However, simulator results should match the values from the running pipeline.

Your Environment

  • Graylog Version: 6.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants