Apache Airflow version
3.1.0
If "Other Airflow 2/3 version" selected, which one?
No response
What happened?
There is a bug in the Airflow Web UI when switching between task logs of different tasks within the same DAG run.
If you open the log of a task that has multiple tries(e.g. second try) and then switch to another task that has fewer tries, the Web UI tries to load the same try_number as before - resulting in a 404 error.
What you think should happen instead?
When switching between tasks, the Web UI should automatically reset the try_number to 1(or to the latest available try for that task), rather than reusing the previous try number.
How to reproduce
- Open the log for a task that has more than one try, e.g.
/dags/some_dag_name/runs/scheduled__2025-10-21T16:03:00+00:00/tasks/task_name?try_number=2
- In the Web UI, switch to another task that has only one try.
- The UI requests the same try_number=2 for the new task, which doesn’t exist.
- The request returns 404 Not Found.
- If you remove
?try_number=2 from the URL, the log loads correctly.
Operating System
Debian
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else?
This issue makes it confusing when browsing logs for tasks with different retry counts - the page fails instead of gracefully showing the available log.
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
3.1.0
If "Other Airflow 2/3 version" selected, which one?
No response
What happened?
There is a bug in the Airflow Web UI when switching between task logs of different tasks within the same DAG run.
If you open the log of a task that has multiple tries(e.g. second try) and then switch to another task that has fewer tries, the Web UI tries to load the same try_number as before - resulting in a 404 error.
What you think should happen instead?
When switching between tasks, the Web UI should automatically reset the try_number to 1(or to the latest available try for that task), rather than reusing the previous try number.
How to reproduce
/dags/some_dag_name/runs/scheduled__2025-10-21T16:03:00+00:00/tasks/task_name?try_number=2?try_number=2from the URL, the log loads correctly.Operating System
Debian
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else?
This issue makes it confusing when browsing logs for tasks with different retry counts - the page fails instead of gracefully showing the available log.
Are you willing to submit PR?
Code of Conduct