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

[rhcos-4.2] src/cmd-koji-upload: introduce file mutators #703

Merged
merged 1 commit into from Aug 13, 2019

Conversation

@darkmuggle
Copy link
Contributor

commented Aug 12, 2019

This is a rework of the file upload logic. One of the problems with Koji
Content Generators (cmd-koji-upload is such a thing) is that unless Koji
know about the content type being uploaded and the content type matches
a specific pattern than an upload will be rejected.

In the past we have uploaded uncompressed artifacts and renamed some
files to raw. A problem was hit when we tried to upload vhd.gz files.
We could have done the rename approach or come up with a more dynamic
solution.

This also addresses some wonky code. This refactor allow us to do the Koji
uploads, with out mucking with the rest of COSA by doing an upload
conversion for renaming true "raw" object like the kernel, and when a
supported format is not allowed to be uploaded in compressed fashion, do
a run-time decompress into a temporary directory.

This should allow almost all uploads to be compressed while we purse
PR's like https://pagure.io/koji/pull-request/1608 to percolate.

(cherry picked from commit eb7a61f)

src/cmd-koji-upload: introduce file mutators
This is a rework of the file upload logic. One of the problems with Koji
Content Generators (cmd-koji-upload is such a thing) is that unless Koji
know about the content type being uploaded and the content type matches
a specific pattern than an upload will be rejected.

In the past we have uploaded uncompressed artifacts and renamed some
files to raw. A problem was hit when we tried to upload `vhd.gz` files.
We could have done the rename approach or come up with a more dynamic
solution.

This also addresses some wonky code. This refactor allow us to do the Koji
uploads, with out mucking with the rest of COSA by doing an upload
conversion for renaming true "raw" object like the kernel, and when a
supported format is not allowed to be uploaded in compressed fashion, do
a run-time decompress into a temporary directory.

This should allow almost _all_ uploads to be compressed while we purse
PR's like https://pagure.io/koji/pull-request/1608 to percolate.

(cherry picked from commit eb7a61f)
@darkmuggle

This comment has been minimized.

Copy link
Contributor Author

commented Aug 12, 2019

This is a back-port of 699.

@darkmuggle darkmuggle changed the title src/cmd-koji-upload: introduce file mutators src/cmd-koji-upload: introduce file mutators [backport] Aug 12, 2019

@ashcrow
Copy link
Collaborator

left a comment

Also LGTM ... should merge after the master merge is done.

@ashcrow

This comment has been minimized.

Copy link
Collaborator

commented Aug 13, 2019

master PR merged. Merging.

@ashcrow ashcrow merged commit eaf57dd into coreos:rhcos-4.2 Aug 13, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dustymabe dustymabe changed the title src/cmd-koji-upload: introduce file mutators [backport] [rhcos-4.2] src/cmd-koji-upload: introduce file mutators Aug 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.