Skip to content

Commit

Permalink
Fix proper joining of the path for logs retrieved from celery workers (
Browse files Browse the repository at this point in the history
…apache#26493)

The change apache#26377 "fixed" the way how logs were retrieved from
Celery, but it - unfortunately broke the retrieval eventually.

This PR should fix it.

Fixes: apache#26492
(cherry picked from commit 52560b8)
  • Loading branch information
potiuk authored and jedcunningham committed Sep 19, 2022
1 parent 49a60ef commit af01ddf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion airflow/utils/log/file_task_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ def _read(self, ti, try_number, metadata=None):
import httpx

url = urljoin(
f"http://{ti.hostname}:{conf.get('logging', 'WORKER_LOG_SERVER_PORT')}/log", log_relative_path
f"http://{ti.hostname}:{conf.get('logging', 'WORKER_LOG_SERVER_PORT')}/log/",
log_relative_path,
)
log += f"*** Log file does not exist: {location}\n"
log += f"*** Fetching from: {url}\n"
Expand Down

0 comments on commit af01ddf

Please sign in to comment.