Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background:
In #31101, I added logic to check for served logs when we did not find either local or remote logs.
In #32561, contributor @Khrol observed that for a task with multiple tries, if the user was looking at the logs for a non-running try, the UI would show an erroneous and potentially confusing 404 error. @Khrol attempted a fix that would suppress this error message.
In #39177, contributor @kahlstrm reported a bug introduced by #32562 and attempted to fix it.
The bug was reportedly that “non-running task try logs weren’t shown in the UI for running tasks”. This I think refers to when you are looking at the logs for a failed attempt. The contributor added, “This is due to us storing the logs on the worker with a Persistent Volume”. I assume this means that we did not check served logs in that case.
One question: why couldn’t the webserver access the PV? In #39496 same user added more conditions.
Problem:
We can't see logs served from triggerer when task deferred.
This PR:
This PR essentially restores the behavior to what it was prior to #32561. So we undo the enhancement in #32561, the first attempted fix #39177, and the second attempted fix #39496.
This means that while a task is in running state, if you look at logs for prior failed attempts, you may see a "checked served logs and did not find any" message. This can be mildly confusing but it's more important to restore access to logs.