-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Filebeat] Unescape characters in s3 file names #18370
Merged
kaiyan-sheng
merged 3 commits into
elastic:master
from
kaiyan-sheng:s3_filename_unescape
May 11, 2020
Merged
[Filebeat] Unescape characters in s3 file names #18370
kaiyan-sheng
merged 3 commits into
elastic:master
from
kaiyan-sheng:s3_filename_unescape
May 11, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
botelastic
bot
added
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
May 7, 2020
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
|
kaiyan-sheng
added
review
Team:Platforms
Label for the Integrations - Platforms team
labels
May 8, 2020
Pinging @elastic/integrations-platforms (Team:Platforms) |
kaiyan-sheng
added
bug
needs_backport
PR is waiting to be backported to other branches.
labels
May 9, 2020
andresrc
added
[zube]: Inbox
[zube]: In Review
and removed
needs_team
Indicates that the issue/PR needs a Team:* label
[zube]: Inbox
labels
May 9, 2020
ChrsMark
approved these changes
May 11, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
6 tasks
kaiyan-sheng
added
v7.9.0
and removed
needs_backport
PR is waiting to be backported to other branches.
labels
May 11, 2020
6 tasks
6 tasks
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
…3 file names (elastic#18413) * [Filebeat] Unescape characters in s3 file names (elastic#18370) * upescape characters in s3 file names (cherry picked from commit ebddb94)
zmoog
added a commit
to zmoog/beats
that referenced
this pull request
Feb 23, 2024
We introduced [^1] the `url.QueryUnescape()` function to unescape object keys from S3 notification in SQS messages. However, the object keys in the S3 list object responses do not require [^2] unescape. We must remove the unescape to avoid unintended changes to the S3 object key. [^1]: elastic#18370 [^2]: elastic#38012 (comment)
zmoog
added a commit
to zmoog/beats
that referenced
this pull request
Feb 23, 2024
We introduced [^1] the `url.QueryUnescape()` function to unescape object keys from S3 notification in SQS messages. However, the object keys in the S3 list object responses do not require [^2] unescape. We must remove the unescape to avoid unintended changes to the S3 object key. [^1]: elastic#18370 [^2]: elastic#38012 (comment)
zmoog
added a commit
to zmoog/beats
that referenced
this pull request
Feb 23, 2024
We introduced [^1] the `url.QueryUnescape()` function to unescape object keys from S3 notification in SQS messages. However, the object keys in the S3 list object responses do not require [^2] unescape. We must remove the unescape to avoid unintended changes to the S3 object key. [^1]: elastic#18370 [^2]: elastic#38012 (comment)
6 tasks
zmoog
added a commit
to zmoog/beats
that referenced
this pull request
Mar 4, 2024
We introduced [^1] the `url.QueryUnescape()` function to unescape object keys from S3 notification in SQS messages. However, the object keys in the S3 list object responses do not require [^2] unescape. We must remove the unescape to avoid unintended changes to the S3 object key. [^1]: elastic#18370 [^2]: elastic#38012 (comment)
zmoog
added a commit
that referenced
this pull request
Mar 4, 2024
…de (#38125) * Remove url.QueryUnescape() We introduced [^1] the `url.QueryUnescape()` function to unescape object keys from S3 notification in SQS messages. However, the object keys in the S3 list object responses do not require [^2] unescape. We must remove the unescape to avoid unintended changes to the S3 object key. [^1]: #18370 [^2]: #38012 (comment) --------- Co-authored-by: Andrea Spacca <[email protected]>
mergify bot
pushed a commit
that referenced
this pull request
Mar 4, 2024
…de (#38125) * Remove url.QueryUnescape() We introduced [^1] the `url.QueryUnescape()` function to unescape object keys from S3 notification in SQS messages. However, the object keys in the S3 list object responses do not require [^2] unescape. We must remove the unescape to avoid unintended changes to the S3 object key. [^1]: #18370 [^2]: #38012 (comment) --------- Co-authored-by: Andrea Spacca <[email protected]> (cherry picked from commit 5f1e656)
zmoog
pushed a commit
that referenced
this pull request
Mar 4, 2024
…s-s3 input in polling mode (#38165) * [AWS] [S3] Remove url.QueryUnescape() from aws-s3 input in polling mode (#38125) We introduced [^1] the `url.QueryUnescape()` function to unescape object keys from S3 notification in SQS messages. However, the object keys in the S3 list object responses do not require [^2] unescape. We must remove the unescape to avoid unintended changes to the S3 object key. [^1]: #18370 [^2]: #38012 (comment) --------- Co-authored-by: Andrea Spacca <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR unescape 3-byte encoded substring to regular string. For example: "%3D" to "=".
Why is it important?
When user uses folders in S3 bucket to organize log files, SQS notification actually encode the log file path like below:
File in S3 is
year=2020/month=05/test1.txt
but in SQS is converted toyear%3D2020/month%3D05/test1.txt
.This conversion needs to be undo when Filebeat tries to read the S3 file pointed by SQS message. Otherwise, this file will not be found.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues
https://discuss.elastic.co/t/filebeat-s3-issue/230441