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

support auto-compress of attachments #34

Closed
asarubbo opened this issue Mar 29, 2024 · 1 comment
Closed

support auto-compress of attachments #34

asarubbo opened this issue Mar 29, 2024 · 1 comment
Labels
bugbite issue relating to the core library bugzilla issue relating to bugzilla support cli issue relating to bite (bugbite-cli)

Comments

@asarubbo
Copy link

Atm the gentoo bugzilla supports attachment with a maximum size of 1024kb.

Would be great if when the size of the attachment is greater than 1024kb (e.g. $BUGBITE_MAX_ATTACHMENT_SIZE variable), bite compress it and attachs it as compressed.
That should be done in presence of, for example, --auto-compress-attachment option.

This scenario has two possible way:

  1. the size of the compressed log is less then 1024kb, then suitable for the attachment.
  2. the size of the compressed log is still greater then 1024kb, then NOT suitable for the attachment.
    In such case(2), another option like --cut-compressed-log-lines $N can help where N are the lines you want to attach. This should be a way to post at least the latest $N lines of the log.

Atm, for compress logs I'm using xz, and I verified that it gives the best ratio compression. With the recent changes in xz, I'm using: xz -k -z -9 -T 1 -M 3000000000 "${BUILD_LOG}"
but I suppose that apart -z we can use something like $BUGBITE_XZ_OPTS

@radhermit radhermit added cli issue relating to bite (bugbite-cli) bugbite issue relating to the core library bugzilla issue relating to bugzilla support labels Mar 29, 2024
@radhermit
Copy link
Owner

Compression support could probably be altered via some config settings, e.g. default compression (with an internal default as well), along with wrappers for common types that would be added to the bugbite lib so other frontends could make use of it more easily.

I'd rather push user configuration towards that design (assuming a better config file gets designed as well) than supporting lots of environment variables although some of the settings could still support pulling from both where it makes sense.

radhermit added a commit that referenced this issue Mar 30, 2024
TODO: actual file compression not implemented yet

Fixes #34.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugbite issue relating to the core library bugzilla issue relating to bugzilla support cli issue relating to bite (bugbite-cli)
Projects
None yet
Development

No branches or pull requests

2 participants