jason810496 commented on code in PR #64285:
URL: https://github.com/apache/airflow/pull/64285#discussion_r3091658686
##########
airflow-core/src/airflow/utils/log/file_task_handler.py:
##########
@@ -882,6 +886,13 @@ def _read_from_logs_server(
try:
log_type = LogType.TRIGGER if getattr(ti, "triggerer_job", False)
else LogType.WORKER
url, rel_path = self._get_log_retrieval_url(ti,
worker_log_rel_path, log_type=log_type)
+ if not url or not rel_path:
+ sources.append(
+ f"Could not read served logs: Hostname not available for "
+ f"{log_type.value if log_type else LogType.WORKER.value}. "
Review Comment:
We already handled `log_type = LogType.TRIGGER if getattr(ti,
"triggerer_job", False) else LogType.WORKER` at line 887.
```suggestion
f"{log_type.value}. "
```
--
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]