Graylog2 / Graylog2/graylog2-server

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

Open
#19,497 0 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

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](https://github.com/FasterXML/jackson-datatype-joda/issues/43).

## 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.