Skip to content

Handling NotFound when file has already been deleted from GCS - #72275

Merged
eladkal merged 5 commits into
apache:mainfrom
jroachgolf84:fix/issue-72264
Sep 12, 2026
Merged

eladkal merged 5 commits into
apache:mainfrom
jroachgolf84:fix/issue-72264

Conversation

@jroachgolf84

Copy link
Copy Markdown
Collaborator

Description

Per the original issue:

When running GCSToGCSOperator with move_object=True, if a task fails after the file has been successfully copied and deleted from the source bucket (e.g., not acknowledge due to network issue), a task retry will attempt to delete the source object again.

This PR adds error-handling to properly catch and only warn on a NotFound exception. All other exceptions are still raised.

closes: #72264

Testing

These changes were tested using the following command:

breeze testing providers-tests providers/google/tests/unit/google/cloud/transfers/test_gcs_to_gcs.py

@eladkal
eladkal merged commit f87240f into apache:main Sep 12, 2026
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GCSToGCSOperator: move_object=True raises NotFound (404) exception on task retry when source object was already deleted

3 participants