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

native_json codec is not serializing/deserializing EventMetadata. #18570

Open
neuronull opened this issue Sep 14, 2023 · 1 comment
Open

native_json codec is not serializing/deserializing EventMetadata. #18570

neuronull opened this issue Sep 14, 2023 · 1 comment
Assignees
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) domain: tests Anything related to Vector's internal tests meta: regression This issue represents a regression type: bug A code related bug.

Comments

@neuronull
Copy link
Contributor

Discovered while adding to the Vector protobuf definition for the native codec, as part of #18405.

Doing so necessitated regenerating the fixture files used in the native codec unit tests.
This led to a test failure in current_native_decoding_matches , which compares the Event that is created by deserializng a json fixture file with a proto fixture file, that should have been encoded with the same Event when the files were generated.

The offending bits are that the EventMetadata.value is not being handled by the native_json codec, but it is being handled by the native (protobuf) codec. This boils down to the fact that the EventMetadata is being skipped by the serde deserialize/serialize for the Event structs. This could largely be due to the fact that not skipping that field means that the EventMetadata must satisfy the trait requirements of configurable_component.

There are basically three problems here:

  1. the native_json codec it seems should be handling the value field of EventMetadata.
  2. the unit test current_native_decoding_matches fails on master due to 1
  3. methodology we are using to perform the unit tests around the native codecs, is clearly currently prone to errors, as it involves applying a patch file, which inherently gets out of date over time and if we don't regenerate the data files often enough, we can get into a situation such as this, where we've had multiple releases containing this inconsistency.
@neuronull neuronull added type: bug A code related bug. domain: tests Anything related to Vector's internal tests meta: regression This issue represents a regression domain: codecs Anything related to Vector's codecs (encoding/decoding) labels Sep 14, 2023
@dsmith3197
Copy link
Contributor

This would be fixed by #18779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) domain: tests Anything related to Vector's internal tests meta: regression This issue represents a regression type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

2 participants