-
Notifications
You must be signed in to change notification settings - Fork 23
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
[CERTTF-458] feat: use agent config in reimplemented log truncation #458
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
Log files were truncated to their last 1MB of data. Now the size of the output log can be specified through the `output_bytes` agent configuration field.
471fa53
to
9ddbeaa
Compare
val500
reviewed
Feb 13, 2025
val500
reviewed
Feb 14, 2025
val500
previously approved these changes
Feb 14, 2025
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.
LGTM
9a7eebe
to
5309f3c
Compare
val500
approved these changes
Feb 14, 2025
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.
LGTM
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.
Description
Log files are currently truncated to their last 1MB of data and that limit is hard-coded. This PR introduces a slight re-implementation of the way log files are truncated and allows the size of the truncated output log to be specified through the
output_bytes
agent configuration field.The default for
output_bytes
when not explicitly set in the agent config is now 10MB.Resolved issues
Resolves CERTTF-484. Note that the original task was to remove truncation altogether but making the limit parametric was deemed to be safer and more flexible.
Documentation
A paragraph was added to the section in the tutorial that discussed retrieving results. It is now explicitly stated that the results might be truncated and how the size of the truncated output log is set through the agent configuration.
Tests
Tested locally with different values for
output_bytes
using (variations of) this Testflinger job, which outputs random 100-character lines of output: