jessicaschueler opened a new issue, #54247:
URL: https://github.com/apache/airflow/issues/54247

   ### Apache Airflow version
   
   3.0.3
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   The method `get_log_url_from_ti` of RuntimeTaskInstance [contains a 
typo](https://github.com/ayush3singh/airflow/blob/d58a8c6422e12db9526d0cdbdf5cd874fe8e99e9/task-sdk/src/airflow/sdk/execution_time/task_runner.py#L564)
 that returns an inaccessible URL.
   
   The string is currently formatted;
   `_log_uri = 
f"{base_url}dags/{ti.dag_id}/runs/{run_id}/tasks/{ti.task_id}{map_index}{try_number}"`
   
   
   
   
   
   ### What you think should happen instead?
   
   To correct this, a forward slash should be added 
   `_log_uri = 
f"{base_url}/dags/{ti.dag_id}/runs/{run_id}/tasks/{ti.task_id}{map_index}{try_number}"`
   
   ### How to reproduce
   
   The following dag code will print the url
   
   ```
   from airflow.decorators import dag, task
   from pendulum import datetime
   
   @dag(
       start_date=datetime(2024, 1, 1),
       schedule="@daily",
       catchup=False,
       doc_md=__doc__,
       default_args={"retries": 3},
       tags=["example"],
   )
   def example_url():
       # Define tasks
       @task
       def print_log_url(**context) -> None:
           url = context["ti"].log_url
           print(f"log_url is {url}")
   
       print_log_url()
   example_url()
   ```
   
   <img width="1663" height="830" alt="Image" 
src="https://github.com/user-attachments/assets/c83fc244-1fc3-4da3-a4f3-16d440b3cabb";
 />
   
   The address produced returns an error
   
   
   ### Operating System
   
   mac 15.5 (24F74)
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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