ashb commented on code in PR #48491:
URL: https://github.com/apache/airflow/pull/48491#discussion_r2022363102


##########
task-sdk/src/airflow/sdk/log.py:
##########
@@ -508,18 +514,8 @@ def upload_to_remote(logger: FilteringBoundLogger):
     relative_path = Path(fname).relative_to(base_log_folder)
 
     handler = load_remote_log_handler()
-    if not isinstance(handler, FileTaskHandler):
-        logger.warning(
-            "Airflow core logging is not using a FileTaskHandler, can't upload 
logs to remote",
-            handler=type(handler),
-        )
+    if not handler:
         return
 
-    # This is a _monstrosity_, and super fragile, but we don't want to do the 
base FileTaskHandler
-    # set_context() which opens a real FH again. (And worse, in some cases it 
_truncates_ the file too). This
-    # is just for the first Airflow 3 betas, but we will re-write a better 
remote log interface that isn't
-    # tied to being a logging Handler.
-    handler.log_relative_path = relative_path.as_posix()  # type: 
ignore[attr-defined]
-    handler.upload_on_close = True  # type: ignore[attr-defined]
-
-    handler.close()
+    log_relative_path = relative_path.as_posix()
+    handler.upload(log_relative_path)

Review Comment:
   No, `close()` doesn't exist on the new RemoteLogIO interface, just upload



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