-
Notifications
You must be signed in to change notification settings - Fork 125
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
tracker for generic tmt+bootc issues #3000
Comments
As far as the current tmt goes it is up to 3rd party to create the "testable bits" and make them available for tmt to install them. In the case of Packit: COPR builds rpms, Testing farm installs them on "guest" (or makes copr repo available) and only after that comes tmt to prepare the guest and execute the tests. So in the Github/gitlab pipeline the "build" part will be on pipeline (somehow, tmt doesn't care) and only the "run the test" part will be for tmt. If "testcloud" gets the ability to provision 'bootc' container (as you mentioned, instead of qcow2 it will get the container image + options to force pulling new image), would it be OK if the responsibility on building the image will remain on other party (pipeline, etc...) I kind of like the idea for building the artefacts as well but it would take some time discuss the details (e.g. cross arch? mock for rpms? how to make all reasonably safe for host?) |
Anyway, building and testing the build artifacts is kinda possible, but you are mainly on your own right:
I thought this is actually something bootc already uses btw |
@cgwalters reboots handling is described here: https://tmt.readthedocs.io/en/stable/stories/features.html#reboot-during-test It is similar to how test harness works for RHEL - i.e. reboot causes the test calling the reboot to be restarted, with an environment variable available helping to decide if the reboot happened, so you can handle the after reboot case. |
I found references to this but I didn't quite understand how to use it. What I'm wondering right now is if there's any support for variables in tmt; basically I am trying to create a flow that:
But I am not seeing any variable/templating support for stuff like this? |
@cgwalters in the example I was trying to show, you would not use We currently do not support a flow you are looking for with Workarounds doing a similar flow with solely 1. two plansFirst one builds the container image and the VM image.
This will need different approach for automation, but RHIVOS does something similar for their testing. 2. tmt executing tmt
This will need some workarounds to make the results nicely available, but should not be maybe such a pain ... I know about nobody who would be doing this. Maybe others have some other ideas. |
I was trying to avoid creating a new testing framework. I know how to do that, but I think this is something we really want to streamline so that it can be easily done from many different components and repositories.
The first part is what I did just directly; not sure I see significant value of wrapping that part in tmt. But, that's a minor point. Hmmm...what if we made a new flow like:
There's a complication here in how Now that said something I'd still like to support here is being able to conveniently override the input to that image:
Feels a bit like a workaround? But, eh, we can roll with that for now. |
OK yeah this is totally unrelated really but am I right that the tmt "prepare" phase does a full rsync of the source to the remote vm? This is...pretty expensive in my case of a Rust project, there's 27G of cache data underneath It'd be nice if tmt defaulted to using e.g. |
I'm trying to look at tmt+bootc in: containers/bootc#543
There's a lot of things going on in this, but basically this is a generic issue about improving the tmt integration story with https://docs.fedoraproject.org/en-US/bootc/
First, what I find just very missing from the tmt docs is recommendations for the what to me seems like a key aspect of injecting code built from the current git repository into the test environment. I understand there's not one approach to this...some people will want to build rpms, others won't (and actually in the case of bootc, we really want to start in many cases from a container image which may become a disk image).
But, let's use a common forge-integrated flow like Github Actions or Gitlab CI as a reference point. From the common case of:
All the tmt docs I can find just assume you somehow have done these steps as far as I can tell; I was looking for more real-world examples that cover some of these.
Other notes:
I got bit by:
apparently caching a copy of that qcow2 in
/var/tmp/tmt/testcloud/images/
but not invalidating that cache when the image changed.Note that in the bootc world, a neat thing we emphasize is a whole flow of building a container image, and then optionally creating a disk image from it.
It might be nice to add tmt provisioning support that directly handled a case of going container -> disk, like:
And this would use e.g. https://github.com/osbuild/bootc-image-builder underneath (or we could streamline here the flow of bootc install to-existing-root); both are valid.
In a scenario like this, tmt could even create its own derived container image to inject infrastructure code, instead of live-mutating the system via cloud-init and shell.
Different topic: I wrote the coreos-assembler kola external tests which operate on a fundamentally different philosophy for the starting point: the test code is injected into the target as a systemd unit, and runs autonomously on its own, and the harness just monitors it. One special thing we added there is support for rebooting the system which reuses the APIs from the Debian autopkgtest framework. Is there such a thing in tmt? I found stuff like this but I don't know if/how it's mapped to test code.
The text was updated successfully, but these errors were encountered: