-
Notifications
You must be signed in to change notification settings - Fork 154
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
Handle errors when waiting for pod status change fails #1922
Handle errors when waiting for pod status change fails #1922
Conversation
Thanks for submitting this pull request 🎉. The team will review it soon and get back to you. If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document. |
fa4e669
to
89f8741
Compare
* Introduce interfaces for extended POD manipulation * Update copyright year Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com> * Fix spelling * Describe purpose of interface --------- Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
* Implement PodController interface * Add `corev1` alias * Fix variable name. * Fix naming * Rename errors and minor rewording. * Update copyright year and spelling. Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com> * Address review note --------- Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
* Implement PodFileWriter interface * Fix naming * Rename `pfwp` property to `fileWriterProcessor` to make it more understandable. * Update copyright year Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com> --------- Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
* Implement PodController interface * Implement PodCommandExecutor interface * Update copyright year Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com> --------- Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
4373b1b
to
fe4ce0a
Compare
* Introduce interfaces for extended POD manipulation * Refactor PodRunner, use PodController under the hood
89f8741
to
21d5442
Compare
pkg/kube/log_tail.go
Outdated
Write(p []byte) (int, error) // Write log line(s) to circular buffer | ||
ToString() string // Join stored log lines to one string separated by newline |
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.
Can we have the comments above the functions so that they build up a proper godoc format.
defer r.Close() | ||
|
||
// Grab last log lines and put them to an error | ||
lt := NewLogTail(10) |
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.
There are chances that the actual error message is not included in the last 10 lines right? Or we are assuming that it will always be?
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.
I suppose that it should be there, but of course there is a chance that after logging an error, some other information will be logged, but frankly, I've never seen such scenario.
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.
yeah, I am not sure what should be done here. How to figure out how many lines to tail.
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.
Discussed offline. Keeping this solution since we don't have better options here.
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Since there are no more objections, merging. |
Change Overview
When executing
kubeTask
it may happen that pod won't get into desired state (ready or succeeded). In such case we might lost information about failure reason. This PR introduces simple pod log tail capturing mechanism.Pull request type
Please check the type of change your PR introduces:
Test Plan