Skip to content
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

Merged
merged 6 commits into from
Sep 12, 2024

Conversation

abuchanan-airbyte
Copy link
Collaborator

This should give us a better error in the telemetry when, for example, the bootloader fails.

Before:

unable to install airbyte chart: unable to install helm: failed pre-install: 1 error occurred:
         * pod airbyte-abctl-airbyte-bootloader failed

After:

 unable to install airbyte chart:
          pod airbyte-abctl-airbyte-bootloader: Caused by: io.airbyte.db.check.DatabaseCheckException: Unable to connect to the database.

@abuchanan-airbyte abuchanan-airbyte requested a review from a team as a code owner September 11, 2024 16:08
@perangel perangel self-requested a review September 12, 2024 15:34
Copy link
Collaborator

@perangel perangel left a 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

} else {
level = pterm.Debug
}
s := newJavaLogScanner(r)
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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])
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

@abuchanan-airbyte abuchanan-airbyte merged commit 1927aa3 into main Sep 12, 2024
2 checks passed
@abuchanan-airbyte abuchanan-airbyte deleted the abuch/diagnose-chart-error-2 branch September 12, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants