potiuk commented on code in PR #52164:
URL: https://github.com/apache/airflow/pull/52164#discussion_r2194354223
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:
##########
@@ -524,10 +524,10 @@ def consume_logs(*, since_time: DateTime | None = None)
-> tuple[DateTime | None
message_timestamp = line_timestamp
progress_callback_lines.append(line)
else: # previous log line is complete
- for line in progress_callback_lines:
+ for progress_line in progress_callback_lines:
Review Comment:
I see - in this case probably better fix will be to refactor and extract
what is in the if to a separate method and name it better to show the logic -
from the logic now it's not clear if line should be used from the for loop or
from the first read - but when you refactor it, it might be clearer and we will
avoid scoping issue.
--
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]