From c81dcb4934bbd4f5ca86cafb769c9f65fd782f2f Mon Sep 17 00:00:00 2001 From: Natchapol Laowiwatkasem <136488592+NatchapolLaow@users.noreply.github.com> Date: Thu, 26 Dec 2024 19:57:46 +0700 Subject: [PATCH] fix GCSToGCSOperator bug when copy single object with replace to False (#45181) --- .../src/airflow/providers/google/cloud/transfers/gcs_to_gcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/src/airflow/providers/google/cloud/transfers/gcs_to_gcs.py b/providers/src/airflow/providers/google/cloud/transfers/gcs_to_gcs.py index 49225a4e5e629..54a8269709a9b 100644 --- a/providers/src/airflow/providers/google/cloud/transfers/gcs_to_gcs.py +++ b/providers/src/airflow/providers/google/cloud/transfers/gcs_to_gcs.py @@ -304,7 +304,7 @@ def _ignore_existing_files(self, hook, prefix, **kwargs): dest_object.replace(self.destination_object, prefix, 1) for dest_object in destination_objects ] - objects = set(objects) - set(existing_objects) + objects = list(set(objects) - set(existing_objects)) if objects: self.log.info("%s files are going to be synced: %s.", len(objects), objects) else: