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

   ### 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.
   
   <img width="300" height="112" alt="Image" 
src="https://github.com/user-attachments/assets/7bac53b5-c947-405e-9cf1-215f0b615dd7";
 />
   
   ### 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
   
   1. 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`
   2. In the Web UI, switch to another task that has only one try.
   3. The UI requests the same try_number=2 for the new task, which doesn’t 
exist.
   4. The request returns 404 Not Found.
   5. 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?
   
   - [ ] 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