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

Add archive bytes limit option to config #145

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Conversation

smarlowucf
Copy link
Collaborator

@smarlowucf smarlowucf commented Jan 10, 2024

This sets the max length of the archive in bytes. If the archive grows larger than this limit the archive is trimmed until it satisfies the limit.

For k8s products this limit is 1MiB or 1048576 bytes. If the limit is set to -1 there is no size limit. The archive can grow as large as the retention period. If the limit is set to 0 the archive feature is disabled.

This sets the max length of the archive in bytes. If the archive
grows larger than this limit the archive is trimmed until it
satisfies the limit.

For k8s products this limit is 1MiB or 1048576 bytes. If the limit
is set to 0 there is no size limit. The archive can grow as large
as the retention period.
Copy link
Contributor

@rtamalin rtamalin left a comment

Choose a reason for hiding this comment

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

LGTM

Drop defaults as these are not functional. The way the config is
written a value must be provided in config.

- Treat a 0 or 1 in bytes limit as "disable archive"
- Treat < 1 in retention period as "disable archive"
- Treat < 0 in bytes limit as no limit
@smarlowucf
Copy link
Collaborator Author

smarlowucf commented Jan 10, 2024

Made changes per comments:

  • Dropped the default values as these are none functional. A value has to be provided in config anyway

Changed how the values are treated to the following:

  • Treat a 0 or 1 in bytes limit as "disable feature" (valid limit values are > 2 because an empty list is 2 bytes)
  • Treat < 1 in retention period as "disable feature"
  • Treat < 0 in bytes limit as no limit

@smarlowucf smarlowucf merged commit 549a18a into data-archive Jan 11, 2024
6 checks passed
@smarlowucf smarlowucf deleted the max-bytes branch January 11, 2024 19:12
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