-
Notifications
You must be signed in to change notification settings - Fork 70
feat(logging/s3): add --file-max-bytes flag
#952
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
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 |
|---|---|---|
|
|
@@ -97,6 +97,7 @@ func (c *DescribeCommand) Exec(_ io.Reader, out io.Writer) error { | |
| lines := text.Lines{ | ||
| "Bucket": o.BucketName, | ||
| "Compression codec": o.CompressionCodec, | ||
| "File max bytes": o.FileMaxBytes, | ||
|
Collaborator
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. Does the API always return the If no, then I'm wondering if the go-fastly implementation will cause a zero value (i.e. So in that case I think we should only print the values here (and in the list file below) if the value is > 0. This value could be
Collaborator
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. Ignore my comment. Based on your feedback in the associated Terraform PR it seems the API understands |
||
| "Format version": o.FormatVersion, | ||
| "Format": o.Format, | ||
| "GZip level": o.GzipLevel, | ||
|
|
||
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.
As mentioned in the related Terraform PR: is this safe to send
0to the API?If yes, then nothing more to do here.
If no, then we could either add
&& c.FileMaxBytes.Value > 0to the condition, or check the value is == 0 within the if block and return an error notifying the user that the input was unexpected.