ashb commented on code in PR #54813: URL: https://github.com/apache/airflow/pull/54813#discussion_r2321856768
########## providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py: ########## @@ -176,6 +176,9 @@ def read(self, relative_path, ti: RuntimeTI) -> tuple[LogSourceInfo, LogMessages return messages, logs + def stream(self, relative_path: str, ti: RuntimeTI) -> LogResponse: + raise NotImplementedError + Review Comment: Ditto here. Remove this etc. ########## providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py: ########## @@ -95,6 +95,9 @@ def read(self, relative_path, ti: RuntimeTI) -> tuple[LogSourceInfo, LogMessages return messages, logs return messages, None + def stream(self, relative_path: str, ti: RuntimeTI) -> LogResponse: + raise NotImplementedError Review Comment: Given we now do `getattr(remote_io, "stream")` we don't want this method here anymore do we, as we don't want this to be called. ########## airflow-core/src/airflow/logging/remote.py: ########## @@ -44,6 +44,15 @@ def upload(self, path: os.PathLike | str, ti: RuntimeTI) -> None: """Upload the given log path to the remote storage.""" ... - def read(self, relative_path: str, ti: RuntimeTI) -> tuple[LogSourceInfo, LogMessages | None]: + def read(self, relative_path: str, ti: RuntimeTI) -> LegacyLogResponse: """Read logs from the given remote log path.""" ... + + +@runtime_checkable +class RemoteLogStreamIO(Protocol): Review Comment: I think this protocol should be a extension to the non-streaming interface, so: ```suggestion class RemoteLogStreamIO(RemoteLogIO): ``` -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org