-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix log for skipped tasks #53024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix log for skipped tasks #53024
Conversation
(cherry picked from commit 0d6e417) Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
(cherry picked from commit 0d6e417) Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
|
@pierrejeambrun Besides the implementation in case of "skip" just realized that the same yields for "upstream failed" (and are there more states which will not execute a task?). Also in "upstream failed" no logs are produced and showing them presents an error: Cases where logs are also missing:
|
|
Yes it would be cool to improve that and take all other states into consideration. At least it's not crashing the UI anymore, that could be a nice follow up indeed. |
|
I'll create an issue for that for tracking purpose |
|
Issue there #53633 |

closes: #53002
Following: #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. Before that related PR, we would find the TI, and request to fetch logs with try_number 1 for a Skipped tasks, that would end up in an invalid url, without hostname, which wasn't great either something like this:

Only the

Empty Operatorhad a special case handling: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 take0as a value. The TI will be found and thelog_readerwill then try to read log and return early with a validation check: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." (google 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)