-
Notifications
You must be signed in to change notification settings - Fork 448
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
[UI] Fix Trial Logs when Kubernetes Job Fails #2164
Merged
google-oss-prow
merged 2 commits into
kubeflow:master
from
andreyvelich:fix-ui-trial-log
Jun 20, 2023
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this included in Pending Pods too, right?
So, should we return a failed pod if there are pending pods and failed pods in podList?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's right. In case of Pending pod, UI shows the similar error with my change:
@tenzen-y Do you think we should process only Failed pod after we processed Succeeded and Running (like you mentioned above:
So, should we return a failed pod if there are pending pods and failed pods in podList
?And then, if there are no more Failed pods, just return
podList.Items[0].Name
(Pending Pod) and UI should show the above error ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I do. I think users may prefer that show logs for a failed pod rather than a pending pod. wdyt?
Also in the current implementation, If there are pending pods and failed pods, maybe, the selected pods will differ each time we run
clientset.CoreV1().Pods(trial.ObjectMeta.Namespace).List...
.Hence, for either a pending or failed pod, we should guarantee which phase this function returns.
Uhm. I'm not sure the above message is appropriate. However, I don't think that pending means
ContainerCreating
. For example, when using a custom scheduler to enforce pending pods based on priority or requested resources, it will take a bit much time until is scheduled into a Node and starts.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense.
From my testing however, the [0] element is always the last created Pod (despite that list in
client-go
doesn't guarantee ordering).I guess, that is how caching works behind list operation.
That is right, it can be different message I just added this as an example. We can always log this message to the user (when Pod is the Pending state):
Failed to get logs for this Trial. Pod is in the Pending state
. WDYT @tenzen-y ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's interesting. Thanks for sharing the result of the investigation!
FYI: I guess the informer cache might affect the result. And the informer cache generally is rotated in intervals. IIRC, an interval is 10 hours as a default.
Looks great :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tenzen-y @johnugeorge I've changed it.