ferruzzi commented on code in PR #67144:
URL: https://github.com/apache/airflow/pull/67144#discussion_r3284069684


##########
providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:
##########
@@ -62,6 +62,8 @@ def upload(self, path: os.PathLike | str, ti: RuntimeTI):
             has_uploaded = self.write(log, remote_loc)
             if has_uploaded and self.delete_local_copy:
                 shutil.rmtree(os.path.dirname(local_loc))
+            elif has_uploaded:
+                local_loc.write_text("")

Review Comment:
   I'm going to resolve this convo and merge, we're just talking.   Maybe I'm 
looking at it wrong.   I think right now if the S3 upload fails, then the local 
log doesn't get cleaned up.  Which means if there is a hiccup and it works the 
next pass, it will upload duplicate logs.  But that's whats already happening 
right now, so it's not a big deal.



-- 
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]

Reply via email to