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: json logs from the bootloader #155

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

abuchanan-airbyte
Copy link
Collaborator

This configures the bootloader to emit JSON formatted logs, and changes the log scanner in abctl to read JSON. This improves abctl's ability to recognize error logs from the bootloader and show them to the user.

image

The existing log scanner wasn't working anymore, and barely worked to begin with, so I removed it rather than keep it around to try to parse non-json logs.

@abuchanan-airbyte abuchanan-airbyte requested a review from a team as a code owner December 20, 2024 22:56
Comment on lines -10 to -17
// 2024-09-10 20:16:24 WARN i.m.s.r.u.Loggers$Slf4JLogger(warn):299 - [273....
var logRx = regexp.MustCompile(`^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} \x1b\[(?:1;)?\d+m(?P<level>[A-Z]+)\x1b\[m (?P<msg>\S+ - .*)`)

type logLine struct {
msg string
level string
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we actually remove all of this? Isn't the PLATFORM_LOG_FORMAT envvar only going to work with certain newer versions of airbyte? Do we need to detect which version is running to know if the PLATFORM_LOG_FORMAT envvar is supported?

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 logRx wasn't really working already. I think shortly after I added that code, the platform tweaked the log format and the regexp stopped working.

@abuchanan-airbyte abuchanan-airbyte merged commit 0414536 into main Jan 6, 2025
2 checks passed
@abuchanan-airbyte abuchanan-airbyte deleted the abuch/bootloader-json-logs branch January 6, 2025 18: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.

2 participants