You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jessicaschueler (via GitHub)" <gi...@apache.org> on 2025/08/07 21:04:32 UTC
[I] `context["ti"].log_url` returns unuseable value [airflow]
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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `context["ti"].log_url` returns unuseable value [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed issue #54247: `context["ti"].log_url` returns unuseable value
URL: https://github.com/apache/airflow/issues/54247
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `context["ti"].log_url` returns unuseable value [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #54247:
URL: https://github.com/apache/airflow/issues/54247#issuecomment-3165698544
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `context["ti"].log_url` returns unuseable value [airflow]
Posted by "anasatzemoso (via GitHub)" <gi...@apache.org>.
anasatzemoso commented on issue #54247:
URL: https://github.com/apache/airflow/issues/54247#issuecomment-3182457540
Can you assign this issue to me.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `context["ti"].log_url` returns unuseable value [airflow]
Posted by "arjunanan6 (via GitHub)" <gi...@apache.org>.
arjunanan6 commented on issue #54247:
URL: https://github.com/apache/airflow/issues/54247#issuecomment-3206707553
Just ran into the same issue today, and was about to raise a PR to fix this. Good thing you already did! :)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org