Skip to content

Conversation

pwhelan
Copy link
Contributor

@pwhelan pwhelan commented May 14, 2025

Summary

Add Parsers at the top level with some measure of validation.

What is validated

All the keys are validated and the value of the format field is also validated.

What is not validated

  • that regex is set if format is set to regex
  • the actual format of the regex
  • the value for time_format
  • the format of types
  • the format for time_offset

@pwhelan
Copy link
Contributor Author

pwhelan commented May 14, 2025

The unit tests will fail until #139 is merged.

TimeStrict ConfigBool `json:"time_strict,omitempty" yaml:"time_strict,omitempty"`
}

type Pipeline struct {

Choose a reason for hiding this comment

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

Should we remove parsers from this section while we're here? If parsers are set, it generates an invalid YAML file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, we should. They were never supported under pipeline to begin with: https://github.com/fluent/fluent-bit/blob/master/src/config_format/flb_cf_yaml.c#L1503.

No idea where that came from. 🤷

pwhelan added 3 commits May 14, 2025 16:28
Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>
Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>
@pwhelan pwhelan force-pushed the pwhelan-config-parsers-toplevel branch from 949e6ef to bf150c9 Compare May 14, 2025 20:29
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