Amazon S3: Mismatch when reading HTTP header from GCS - #8791
Conversation
|
Hey @PettitWesley, can we get this PR reviewed and merged? Currently, there is no GCS Output Plugin but this fix could help as a workaround to upload to GCS bucket meanwhile. |
sunhubs
left a comment
There was a problem hiding this comment.
why such a bug fix for function is not merged as soon as possible
|
@PettitWesley @sparrc @singholt @swapneils Bumping up for review |
|
still relevant and needed ! |
|
+1 for this |
4f44e42 to
64b59cb
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe HTTP client now matches selected headers only at CRLF-prefixed line boundaries. ChangesHTTP Client Header Lookup Fix
Estimated code review effort: 2 (Simple) | ~8 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I can confirm that this bug is still present in 5.0.3. I rebased my branch on the commit of the release. |
64b59cb to
b739cb6
Compare
ffff2dc to
b739cb6
Compare
|
Can confirm, the bug is still present in fluentbit 5.0.9. Without this patch, fluentbit writing to a GCS bucket using the S3 output filter doesn't work. This patch needs to be merged. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
I'm no longer working with the Firelens team (for a bit more than a year), and neither is Wesley to my knowledge (@edsiper / @leonardo-albertovich feel free to remove us from the setup, I think I recall it required changes outside the code itself?). The Firelens team would probably find it helpful though to have the Valgrind output and the test-cases where you actually are seeing this error, as well as validation that this doesn't break the Amazon S3 interaction. Last I checked (and this does seem to be older code) the S3 client works well with Amazon S3, so is it possible this is an issue in GCS's implementation of the protocol?
On this topic, we were working on moving our AWS-side integrations to the newest version of Fluent Bit sometime in 2025 (and didn't want to add churn for users before finishing that), and before that we'd focused on critical availability / security bugs in Fluent Bit or our integration with it. No doubt the current team also has their own concerns as well. |
I wouldn't call having a custom HTTP header an issue, the FluentBit HTTP client should support it.
I have included more information about the error and its context in the linked issue, the bug itself is quite self-explanatory I believe. If there is more information to submit I would be happy to provide them, I'm not sure what exactly is needed.
Actually I believe the HTTP client is re-used across the entire codebase ? The impact is not limited to the S3 plugin and is related to the HTTP protocol, not the S3 protocol. |
Ah, got it, I’d misread the description as referencing the S3 plugin’s calls to the shared http client.
Thanks! Will defer to @singholt / @cssparr / whoever they deem appropriate for next steps then. |
This commit includes the HTTP separator when looking for the header values in the response payload, to avoid mismatching header ending with the same name. See the linked issue for more info and example.
Fixes #8790
Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
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.
Summary by CodeRabbit