pranjal9091 opened a new pull request, #76887: URL: https://github.com/apache/airflow/pull/76887
closes: #76880 ### Description In `S3ToAzureBlobStorageOperator.get_files_to_move()`, source keys are formatted as relative paths stripped of `s3_prefix` (e.g. `file.txt`), while `WasbHook.get_blobs_list_recursive()` returns full blob paths including the prefix (e.g. `out/file.txt`). When `replace=False`, the set difference `set(files_to_move) - set(existing_files)` failed to match existing blobs under `blob_prefix`, resulting in existing files remaining in `files_to_move` and being re-transferred. This change strips the `blob_prefix` from the listed Azure blobs before performing the set difference, ensuring existing destination blobs are properly identified and skipped when `replace=False`. ### Testing - Added unit test cases to `test_get_files_to_move__both_prefix` and `test_get_files_to_move__s3_key_wasb_prefix` in `test_s3_to_wasb.py` where Azure returns full prefixed blob paths. - Verified behavior with both `replace=False` and `replace=True`, as well as prefixes with and without a trailing slash. - All 29 unit tests in `test_s3_to_wasb.py` pass cleanly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
