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

Fix extractor date converters (#11750) (4.2 backport) #11774

Merged
merged 1 commit into from Dec 9, 2021

Conversation

mpfz0r
Copy link
Member

@mpfz0r mpfz0r commented Dec 8, 2021

If the converter fails for a timestamp value,
run the fallback timestamp conversion, to ensure that a Message
always has a valid timestamp.

  • Add tests

  • Improve gl2_processing_error message

Showing only the details is not helpful in some cases.

  • Improve converter code

We don't need to call removeField before addField.
It will just overwrite the value anyway.
This avoids having to recalculate the message size twice.

Only null values don't get set. Those we need to remove explicitly.

  • adjust test to new processing error output

  • improve comments

Co-authored-by: Marco Pfatschbacher marco@graylog.com
(cherry picked from commit d12d846)

* Fix regression when using date converter #11495

* get tests passing

* Run timestamp fallback conversion

If the converter fails for a timestamp value,
run the fallback timestamp conversion, to ensure that a Message
always has a valid timestamp.

* Add tests

* Improve gl2_processing_error message

Showing only the details is not helpful in some cases.

* Improve converter code

We don't need to call removeField before addField.
It will just overwrite the value anyway.
This avoids having to recalculate the message size twice.

Only null values don't get set. Those we need to remove explicitly.

* adjust test to new processing error output

* improve comments

Co-authored-by: Marco Pfatschbacher <marco@graylog.com>
(cherry picked from commit d12d846)
@mpfz0r mpfz0r added backport blocker If not finished by release date, the release will be postponed. bug ready-for-review labels Dec 8, 2021
@mpfz0r mpfz0r added this to the 4.2.3 milestone Dec 8, 2021
@patrickmann patrickmann self-assigned this Dec 8, 2021
Copy link
Contributor

@patrickmann patrickmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - tested locally on 4.2

@patrickmann patrickmann merged commit 01d68e9 into 4.2 Dec 9, 2021
@patrickmann patrickmann deleted the issue-11495-4.2 branch December 9, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport blocker If not finished by release date, the release will be postponed. bug ready-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants