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 yaml empty node validation #5490

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kralicky
Copy link
Contributor

What this PR does:
This PR improves the yaml empty node validation for the cortex config by inspecting the yaml ast directly instead of checking the struct after unmarshaling.

Which issue(s) this PR fixes:
Fixes #5488

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@kralicky kralicky marked this pull request as ready for review August 22, 2023 22:54
Comment on lines +93 to +94
yaml: "flusher: { exit_after_flush: false }",
stderrExcluded: "empty YAML node",
Copy link
Member

Choose a reason for hiding this comment

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

Hum.. why this should be invalid?

Copy link
Contributor Author

@kralicky kralicky Aug 22, 2023

Choose a reason for hiding this comment

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

This is a test case that fails under the old validation logic, but should not fail with the updated code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are some more details in the linked issue.

Copy link
Member

Choose a reason for hiding this comment

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

oh ok..
that make sense i guess...

@alanprot
Copy link
Member

Can i sign the DCO?

@kralicky
Copy link
Contributor Author

Sure, do you want me to update the changelog as well? or is that automated?

…tead of checking the struct after unmarshaling

Signed-off-by: Joe Kralicky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config validation failure when setting flusher.exit_after_flush=false
2 participants