jason810496 commented on code in PR #45914:
URL: https://github.com/apache/airflow/pull/45914#discussion_r1963633877
##########
airflow/api_connexion/endpoints/log_endpoint.py:
##########
@@ -115,11 +115,14 @@ def get_log(
# return_type would be either the above two or None
logs: Any
if return_type == "application/json" or return_type is None: # default
- logs, metadata = task_log_reader.read_log_chunks(ti, task_try_number,
metadata)
- logs = logs[0] if task_try_number is not None else logs
+ hosts, log_streams, metadata = task_log_reader.read_log_chunks(ti,
task_try_number, metadata)
+ host = f"{hosts[0] or ''}\n"
Review Comment:
This is actually the original logic before the refactor. The reason behind
it is that `hosts` is a list containing `len(try_number)` instances of `host`,
so they should all be the same.
`hosts` is from `airflow/utils/log/file_task_handler.py` ( should click
`Load Diff` to show reference )
https://github.com/apache/airflow/pull/45914/files#diff-e7f34f73940eb52d92bb991abedc1c963431c5373c12dff739c8fb7d03e93d3aL507-L519
--
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]