-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: better reporting of airbyte chart errors #112
Conversation
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.
If we dont have tests for the java log parsing stuff, could we add one with some sample logs we pull form somewhere
internal/cmd/local/local/install.go
Outdated
} else { | ||
level = pterm.Debug | ||
} | ||
s := newJavaLogScanner(r) |
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 is true that most of the pods are running Java services, but not all. Just wanna make note of that in case we ever try to use this to pull errors from temporal or something.
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.
Ya, the log parsing stuff is fragile right now. And maybe I should remove the java
part of the name. It's really just a log scanner for a certain format.
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.
Added tests and cleaned up the naming to not mention java
m := javaLogRx.FindSubmatch(j.scanner.Bytes()) | ||
|
||
if m != nil { | ||
j.line.msg = string(m[2]) |
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'm guessing [0]
os the input string or the bytes leading up to the first capture group?
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.
the text of the leftmost match of the regular expression in b
according to https://pkg.go.dev/regexp#Regexp.FindSubmatch
This should give us a better error in the telemetry when, for example, the bootloader fails.
Before:
After: