andyjianzhou commented on code in PR #40447:
URL: https://github.com/apache/airflow/pull/40447#discussion_r1675313942


##########
airflow/utils/log/log_reader.py:
##########
@@ -40,7 +40,7 @@ class TaskLogReader:
     """Time to sleep between loops while waiting for more logs"""
 
     def read_log_chunks(
-        self, ti: TaskInstance, try_number: int | None, metadata
+        self, ti: TaskInstance, try_number: int | None, metadata, page_number: 
int | None = None

Review Comment:
   I have found these two key variables in the metadata, `log_pos`, and 
`offset` that can help with pagination. I agree that switching to `log_pos` and 
`offset` for pagination would simplify the approach. I'll proceed with updating 
the `read_log_chunks` method to support `log_pos` and modify the `get_log` 
endpoint to use these for pagination instead. Currently, we are using the 
page_number parameter to read log chunks, but I'll create tests to ensure that 
the changes I'm making isn't breaking any other functionality 



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