pierrejeambrun opened a new pull request, #53024:
URL: https://github.com/apache/airflow/pull/53024

   closes: https://github.com/apache/airflow/issues/53002
   
   Following: https://github.com/apache/airflow/pull/51592/ we are now 
filtering on the `try_number`.
   
   Skipped task have a try number of 0 and UI was defaulting to 1, the skipped 
task couldn't be found and this cause the 404. 
   
   Now the UI tries to fetch the `TaskInstance.try_number`, even if this means 
that try_number is 0 because the TaskInstance.state is 'skipped'. Allow the 
backend to take `0` as a value. The TI will be found and the `log_reader`will 
then try to read log and return early with a validation check:
   ![Screenshot 2025-07-08 at 13 40 
39](https://github.com/user-attachments/assets/ff91cb41-ff30-448f-af2b-144c3efc76b7)
   
   
   This is enough to not make the UI not crash. And display a useful message. 
That's for core log reader. Other log reader will fail with a simple "Error 
fetching the logs. Try number {try_number} is invalid." (cloud logs) or any 
other check implemented in the provider.
   
   We could probably also do this in the google provider, to give a better 
message. (Separate PR because it's provider related)
   


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