Apache Airflow version
main (development)
If "Other Airflow 2 version" selected, which one?
No response
What happened?
Airflow 2 has email_on_failure and other actions that generate links to Airflow 2 UI. This will result in 404 in Airflow 3 once old UI is removed and should be updated. Some of the links I found
|
@property |
|
def log_url(self) -> str: |
|
"""Log URL for TaskInstance.""" |
|
run_id = quote(self.run_id) |
|
base_url = conf.get_mandatory_value("webserver", "BASE_URL") |
|
map_index = f"&map_index={self.map_index}" if self.map_index >= 0 else "" |
|
_log_uri = ( |
|
f"{base_url}" |
|
f"/dags" |
|
f"/{self.dag_id}" |
|
f"/grid" |
|
f"?dag_run_id={run_id}" |
|
f"&task_id={self.task_id}" |
|
f"{map_index}" |
|
"&tab=logs" |
|
) |
|
if self.logical_date: |
|
base_date = quote(self.logical_date.strftime("%Y-%m-%dT%H:%M:%S%z")) |
|
_log_uri = f"{_log_uri}&base_date={base_date}" |
|
return _log_uri |
|
@property |
|
def mark_success_url(self) -> str: |
|
"""URL to mark TI success.""" |
|
base_url = conf.get_mandatory_value("webserver", "BASE_URL") |
|
return ( |
|
f"{base_url}" |
|
"/confirm" |
|
f"?task_id={self.task_id}" |
|
f"&dag_id={self.dag_id}" |
|
f"&dag_run_id={quote(self.run_id)}" |
|
"&upstream=false" |
|
"&downstream=false" |
|
"&state=success" |
|
) |
What you think should happen instead?
No response
How to reproduce
- Create a dag with
email_on_failure = True .
- Check failure email link to have log url to Airflow 3 UI.
Operating System
Ubuntu 20.04
Versions of Apache Airflow Providers
No response
Deployment
Virtualenv installation
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
main (development)
If "Other Airflow 2 version" selected, which one?
No response
What happened?
Airflow 2 has email_on_failure and other actions that generate links to Airflow 2 UI. This will result in 404 in Airflow 3 once old UI is removed and should be updated. Some of the links I found
airflow/airflow/models/taskinstance.py
Lines 2035 to 2054 in bb56052
airflow/airflow/models/taskinstance.py
Lines 2056 to 2069 in bb56052
What you think should happen instead?
No response
How to reproduce
email_on_failure = True.Operating System
Ubuntu 20.04
Versions of Apache Airflow Providers
No response
Deployment
Virtualenv installation
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct