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

in_http: respond accordingly to requests that produce errors. #8794

Merged
merged 2 commits into from
May 29, 2024

Conversation

pwhelan
Copy link
Contributor

@pwhelan pwhelan commented May 3, 2024

Summary

This request attempts to respond with error codes to requests that run into them for whatever reason, this includes:

  • invalid formatting.
  • write errors when persisting to disk.
  • others scenarios that do not occur to me at the moment...

Any other error scenarios should also have tests added for them as both of the first ones have them.

Description

Currently the in_http plugin makes no attempt to signal to the client if an error occurs while trying to ingest their records. This PR attempts to address that.

At the moment there is no attempt to actually report the error back to the client, or even to hint at its nature. A 400 error response is sent under any and all circumstances. This is in part to avoid leaking information the client as much as it is the lack of faculties to do so in fluent-bit.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

return a 400 error when the incoming message is invalid, unable to be
processed or cannot be appended as a log entry.

at the moment only the logs themselves can distinguish these different
error cases but at least clients will be alerted to problems.

Signed-off-by: Phillip Whelan <phil@calyptia.com>
… errors.

Signed-off-by: Phillip Whelan <phil@calyptia.com>
@edsiper
Copy link
Member

edsiper commented May 15, 2024

for the commits that targets the tests interface, the prefix commit should be:

tests: runtime: in_http: ...

ref:

image

Copy link
Member

@edsiper edsiper left a comment

Choose a reason for hiding this comment

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

changes requested in the commit prefix for the tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants