-
Notifications
You must be signed in to change notification settings - Fork 36
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 extract_as_repo for SLM pxe tar file #278
Merged
andrii-suse
merged 1 commit into
os-autoinst:master
from
alice-suse:alice/support-extract_as_repo-for-slm-pxe-tar
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@andrii-suse looking at your comment should this be
and deleted afterwards?
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.
That's the original default logic, putting it to
other
(default option set on previous line), but it brings problem elsewhere. Originally the code only supports extract iso into repo, so for anywhere related with such action, it assumes the image is put iniso/...
. If changing it, it means a lot of work to dig into other code parts and fix problems... Given that there is already[[ ! $dest =~ \.spdx\.json$ ]] || asset_folder=iso
, I think it will be easier to just putting tar into iso folder.I also thought about another way to implement this, like completely support any other format that needs to be extracted as repo, just like iso, but it will require too much effort from top(parsing settings) to down(generating scripts), which is not proper for me who is just freshman to this tool. So I chose the lower effort solution, like pretending to be "iso"...
If you guys think this is acceptable, I am happy to see it merged. Otherwise, I am fine to close the PR and maybe let other expert guys on the tool to implement the function in a more comprehensive way.
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.
Makes sense
by now I consider you an expert xD - I barely understand how this all works 📦
@andrii-suse do you know if its possible to delete an asset or could you provide proposal on to of Alice's change, so that the .tar file is removed after extraction?
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.
ISO files are kept in iso folder after extraction. I think the same is better to be applied to tar files -- just to be synced in behaviors. HDYT?
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.
Yeah, the questions are whether it will work as planned and whether it can bring any problems.
That is nobody's goal here. You have already made decent work here, let's focus on make it through if that is really needed.
I will investigate a bit more and get back to this.
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.
I'm fine :)
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.
Good point!
I believe you can get some useful information from this MR :
You will see how it works for SLM tar image. And after full script re-generation, it does not affect other project directories' *.before. However, for the areas which are not touched in xml/bs/, we have to rely on you experts to tell :).
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.
I was asked about how well openQA handles
.tar
assets asISO
:my $assets = $tree->map('to_string')->grep(qr/\.(?:img|qcow2|iso|vhd|vhdx)$/);
).ISO
variable is also problematic because os-autoinst backends will handle it like a cd/dvd image. That will probably not work and might lead to errors.I'd say you can try it nevertheless but don't be surprised if it doesn't work on some level.
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.
Thank you for the input. I can imagine these...
Good thing is that, in our test(SLM baremetal pxe based installation test), we will only need the REPO_0/ MIRROR_HTTP which refers to the repo http link and we do not need ISO at all.
See the expected openqa cli in https://gitlab.suse.de/openqa/openqa-trigger-from-ibs-plugin/-/merge_requests/213/diffs#0dc642f7285a06067e3783580e994758e243f934: