You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dstandish (via GitHub)" <gi...@apache.org> on 2023/05/30 22:14:21 UTC

[GitHub] [airflow] dstandish opened a new pull request, #31623: Add docstring and signature for _read_remote_logs

dstandish opened a new pull request, #31623:
URL: https://github.com/apache/airflow/pull/31623

   It's not obvious that the "logs" list returned should be have for each element the content of a single log file (it's easy to make the mistake of thinking it should be a list of individual log lines but this is not correct).
   


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #31623: Add docstring and signature for _read_remote_logs

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on code in PR #31623:
URL: https://github.com/apache/airflow/pull/31623#discussion_r1211039750


##########
airflow/utils/log/file_task_handler.py:
##########
@@ -522,6 +522,13 @@ def _read_from_logs_server(self, ti, worker_log_rel_path) -> tuple[list[str], li
             logger.exception("Could not read served logs")
         return messages, logs
 
-    def _read_remote_logs(self, ti, try_number, metadata=None):
-        """Implement in subclasses to read from the remote service."""
+    def _read_remote_logs(self, ti, try_number, metadata=None) -> tuple[list[str], list[str]]:
+        """
+        Implement in subclasses to read from the remote service.
+
+        This method should return two lists, messages and logs.
+            * Each element in the messages list should be a single message,
+                such as, "reading from x file".
+            * Each element in the logs list should be the content of one file.

Review Comment:
   ```suggestion
           This method should return two lists, messages and logs.
   
           * Each element in the messages list should be a single message,
             such as, "reading from x file".
           * Each element in the logs list should be the content of one file.
   ```



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr merged pull request #31623: Add docstring and signature for _read_remote_logs

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr merged PR #31623:
URL: https://github.com/apache/airflow/pull/31623


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org