Ankurdeewan commented on issue #58417:
URL: https://github.com/apache/airflow/issues/58417#issuecomment-3545847673

   I checked this and the broken URL seems to come from `TaskInstance.hostname` 
being an empty string.
   
   `FileTaskHandler._get_log_retrieval_url()` builds the served-log link with:
   
       f"http://{hostname}:{port}/log/";
   
   So if hostname is `""`, the UI gets:
   
       http://:8793/log/...
   
   I reproduced the same behavior with a quick Python test:
   
   ```python
   hostname = ""
   port = 8793
   from urllib.parse import urljoin
   urljoin(f"http://{hostname}:{port}/log/";, "test.log")
   # -> http://:8793/log/test.log
   ```
   The chart looks fine and the hostname is already empty before that point.
   What’s the preferred fix?
   Add a guard in `_get_log_retrieval_url()`or handle it earlier when hostname 
is set?
   
   I can open a PR once there’s a direction


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