-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add check for nil timestamp #1187
Merged
Merged
Conversation
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
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## devel #1187 +/- ##
==========================================
+ Coverage 44.14% 44.54% +0.39%
==========================================
Files 33 36 +3
Lines 8089 8670 +581
==========================================
+ Hits 3571 3862 +291
- Misses 4249 4543 +294
+ Partials 269 265 -4
... and 6 files with indirect coverage changes
|
matoval
approved these changes
Oct 23, 2024
TheRealHaoLiu
added a commit
to TheRealHaoLiu/receptor
that referenced
this pull request
Nov 19, 2024
PR ansible#1187 introduced a situation that causes ``` panic: runtime error: index out of range [1] with length 1 goroutine 534519 [running]: github.com/ansible/receptor/pkg/workceptor.(*KubeUnit).kubeLoggingWithReconnect(0xc001506b00, 0xc004a97400?, 0xc009cb9fd0?, 0xc00cd1d510, 0xc00cd1d520) /Users/haoli/projects/src/github.com/TheRealHaoLiu/receptor/pkg/workceptor/kubernetes.go:395 +0x108b created by github.com/ansible/receptor/pkg/workceptor.(*KubeUnit).runWorkUsingLogger /Users/haoli/projects/src/github.com/TheRealHaoLiu/receptor/pkg/workceptor/kubernetes.go:834 +0xc5e ``` This PR will write the whole line into stdout if first word in the log is not an timestamp This can both prevent the index out of range error and allow us to record the line in stdout to aid further debugging of this issue. Co-Authored-By: Matthew Sandoval <[email protected]>
TheRealHaoLiu
added a commit
to TheRealHaoLiu/receptor
that referenced
this pull request
Nov 19, 2024
PR ansible#1187 introduced a situation that causes ``` panic: runtime error: index out of range [1] with length 1 goroutine 534519 [running]: github.com/ansible/receptor/pkg/workceptor.(*KubeUnit).kubeLoggingWithReconnect(0xc001506b00, 0xc004a97400?, 0xc009cb9fd0?, 0xc00cd1d510, 0xc00cd1d520) /Users/haoli/projects/src/github.com/TheRealHaoLiu/receptor/pkg/workceptor/kubernetes.go:395 +0x108b created by github.com/ansible/receptor/pkg/workceptor.(*KubeUnit).runWorkUsingLogger /Users/haoli/projects/src/github.com/TheRealHaoLiu/receptor/pkg/workceptor/kubernetes.go:834 +0xc5e ``` This PR will write the whole line into stdout if first word in the log is not an timestamp This can both prevent the index out of range error and allow us to record the line in stdout to aid further debugging of this issue. Co-Authored-By: Matthew Sandoval <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ref: #1186
Ensure the timestamp returned by K8 api has been correctly parsed.