Repository navigation
Fix prefix handling in Amazon transfer operators - #73269
Merged
Merged
Conversation
yuseok89
marked this pull request as ready for review
September 17, 2026 14:18
Contributor
Contributor
|
Looks good, pending merge conflicts |
yuseok89
force-pushed
the
fix-s3-transfer-prefix-handling
branch
from
September 22, 2026 00:27
858ff23 to
4b67f7a
Compare
seanghaeli
approved these changes
Sep 22, 2026
Contributor
There was a problem hiding this comment.
Happy to merge this @o-nikolas @vincbeck @ferruzzi
edit: pending Ramit's below comments are addressed
vincbeck
approved these changes
Sep 23, 2026
Contributor
|
Note for the next release manager, this a bug fix. It is a breaking change but considered as bug fix because the doc and code was not matching |
This was referenced Sep 24, 2026
This file contains hidden or 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
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.
This PR aligns filename prefix handling with the documented behavior of the Amazon FTP and SFTP transfer operators.
Previously, string prefixes were matched anywhere in a filename. This could select unintended files. Renaming also replaced every occurrence of the prefix, including occurrences later in the filename.
Documented behavior. Each operator's docstring already describes prefix semantics, not substring semantics:
The old implementation didn't match this. This PR makes the code match the docs, not the other way around.
The updated behavior:
nlstentries with the listed directory.s3_keykeep their directory at the destination.Example, with
ftp_filenames="pre_"/s3_filenames="new_":pre_one.txtnew_one.txtnew_one.txtxpre_two.txtpre_again_pre_.txtnew_again_new_.txt(corrupted mid-filename)new_again_pre_.txtUsers relying on the undocumented substring-matching behavior may observe different file selection after this change.
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.