-
Notifications
You must be signed in to change notification settings - Fork 107
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
cloudapi download #4590
base: main
Are you sure you want to change the base?
cloudapi download #4590
Conversation
ec40673
to
64244a3
Compare
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.
So I wonder if we even need this. Currently we implemented downloading / copying etc… the artefact just by using cockpit-files (osbuild/image-builder-frontend#2820).
I think it might make more sense to expand the local target to accept a target artefact location / output directory instead (like ~/.cache/cockpit-image-builder/artefacts) or something.
I think we should have both. The cloudapi is incomplete without this, and may be accessed by things that can't use the local filesystem or cockpit plugins. And doing it that way feels like a hack -- it is breaking the separation between the internals and the client needing to know details like file paths. |
Hm I think the separation is maintained as long as the path to the artefacts are resolved by composer, it's in the upload status, part of the osbuild job result. So it's not like the user is aware of where exactly the artefacts are saved, and if the artefact directory would change, the cockpit plugin wouldn't have to be updated. I'm not sure if it's a hack to have composer output an artefact somewhere on your system. And in the case of the cockpit plugin, we have to pipe it through the cockpit api anyway, as the cockpit server might be remote. Might as well let cockpit-files handle all that. Though I agree it would be nicer to save it somewhere else, so that we don't have to point the user to /var/lib/osbuild-composer, which is an internal directory. |
I'm not sure what you mean by it being in the upload status. But either way I need this in order to finish the move from weldr api to cloud api, and for composer-cli. The cloudapi is incomplete without this. |
0b42382
to
f574976
Compare
LOL. I figured it out :) |
f574976
to
ec82717
Compare
@croissanne we'll also want this for composer-cli as part of our work towards deprecating the weldr api, won't we? |
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.
Thanks this look good to me, maybe @croissanne can have another look first
This will download the build artifact from a locally saved osbuild compose. It will set the filename to the the UUID of the build with the artifact filename appended. eg. 1dbcc86e-745b-4061-812f-e50f06fa7cbe-disk.qcow2 Related: RHEL-60142
Resolves: RHEL-60142
Even though the file isn't there it can be useful to have the full path that it was checking for. Related: RHEL-60142
It can include useful extra details, whether or not the artifacts directory is setup, whether the file is missing, etc. Related: RHEL-60142
This enables the artifact directory during the tests, it mocks up a download artifact, and tests that it can be downloaded. The file contains JSON because the TestRoute helper expects that as the response. Related: RHEL-60142
ec82717
to
b968fab
Compare
This pull request includes: