-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
promtail: Allow docker_sd_config to handle log lines longer than 64k #6256
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ func Test_TargetManager(t *testing.T) { | |
require.True(t, ta.Ready()) | ||
|
||
require.Eventually(t, func() bool { | ||
return len(entryHandler.Received()) >= 5 | ||
return len(entryHandler.Received()) >= 6 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what caused this value to change? I don't see any changes to the test setup. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I inserted a Very Long Log Line into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got it, and that's a binary file which is why I'm not seeing the diff, thanks! |
||
}, 20*time.Second, 100*time.Millisecond) | ||
|
||
received := entryHandler.Received() | ||
|
@@ -109,4 +109,5 @@ func Test_TargetManager(t *testing.T) { | |
actualLines = append(actualLines, entry.Line) | ||
} | ||
require.ElementsMatch(t, actualLines, expectedLines) | ||
require.Equal(t, 99969, len(received[5].Line)) | ||
} |
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.
Do you mind putting this function into a utility package, e.g.
clients/pkg/promtail/common
? I think it may be used in various places.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 fine either way on that actually, we can also wait until we need it somewhere else to figure out the best package for it to go into, or what the interface should look like, ie. there might be more duplication to reduce if we refactor our the section in
process
for processing a whole file?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'm fine either way, happy to move it if that's the desired approach...