-
Notifications
You must be signed in to change notification settings - Fork 20
test/smoke: assert alma linux image types #380
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
base: main
Are you sure you want to change the base?
Conversation
Bump the `images` dependency to 0.222.0. Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
Assert the required-to-exist Alma Linux (and Kitten) image types for 8, 9, and 10. This will fail until the related `images` PR [1] lands and is in a released version of `images`. [1]: osbuild/images#2029 Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
|
This PR now includes an update to images 0.222.0 which re-instates Alma Linux 8 and 9. We can either merge this now (if acceptable) or wait for osbuild/images#2035 to land as well (and release). My preference is the former to reinstate previous behavior before wednesdays release. |
mvo5
left a comment
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! Just two (potentially silly) questions inline
| "almalinux_kitten-10", | ||
| ] | ||
|
|
||
| expected_to_not_exist = [ |
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.
Given that we do not use it, could we just remove it (YAGNI and all that)?
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.
Yep; I will after we resolve the other comment here to make sure if this is the right place for this to live at all :)
| assert f"{distro} type:{type_} arch:{arch}" in output | ||
|
|
||
|
|
||
| def test_smoke_has_expected_images_almalinux_8(build_container): |
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.
Do we have a similarly comprehensive test for rhel? And if not, should we create one for rhel first maybe?
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 wondering if image-builder-cli is the right place to have this type of test...
We do test this in osbuild/images for other distros, we should just add almalinux there, see https://github.com/osbuild/images/blob/main/pkg/distro/generic/rhel10_test.go#L240
It still makes sense to have at least some smoke tests (the one for centos) in ibcli, but I'm not sure if it makes sense to duplicate the testing that is done in osbuild/images here.
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 had a hard time adding this into images as it doesn't verify that repository files for the listed distribution versions also exist. I also had a hard time figuring out how to processing excluded image types there. For example I don't think we have tests there that azure image types were only included starting from RHEL 8.x and/or that RHEL 8.x actually exists and has all required architectures?
Why do you feel CentOS makes sense and Alma Linux does not (in the smoke tests here?). Is it because the CentOS ones map directly on the types they build in Koji?
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 had a hard time adding this into images as it doesn't verify that repository files for the listed distribution versions also exist. I also had a hard time figuring out how to processing excluded image types there. For example I don't think we have tests there that
azureimage types were only included starting from RHEL 8.x and/or that RHEL 8.x actually exists and has all required architectures?
I'll need to look at what we actually test to be able to answer.
Why do you feel CentOS makes sense and Alma Linux does not (in the smoke tests here?). Is it because the CentOS ones map directly on the types they build in Koji?
No, I didn't mean CentOS specifically. What I meant is that it makes sense to have a smoke test with a single distro. It could be any distro from my PoV.
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 had a hard time adding this into images as it doesn't verify that repository files for the listed distribution versions also exist.
OK, that is a fair point, because we test only distro definitions. ibcli still reuses the DistroFactory, RepoRegistry and the embedded repo definitions from osbuild/images. So we should be definitely able to test all of this at the source of it, meaning osbuild/images.
I also had a hard time figuring out how to processing excluded image types there. For example I don't think we have tests there that
azureimage types were only included starting from RHEL 8.x and/or that RHEL 8.x actually exists and has all required architectures?
We do test for this, see https://github.com/osbuild/images/blob/79b9da6b393fd3ccf30c233362b5a10be5d61eb8/pkg/distro/generic/rhel8_test.go
We almost certainly don't test for all conditionals in our distro definitions, but we have the basis for it.
thozza
left a comment
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 not convinced that the test should live in this repository.
| assert f"{distro} type:{type_} arch:{arch}" in output | ||
|
|
||
|
|
||
| def test_smoke_has_expected_images_almalinux_8(build_container): |
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 wondering if image-builder-cli is the right place to have this type of test...
We do test this in osbuild/images for other distros, we should just add almalinux there, see https://github.com/osbuild/images/blob/main/pkg/distro/generic/rhel10_test.go#L240
It still makes sense to have at least some smoke tests (the one for centos) in ibcli, but I'm not sure if it makes sense to duplicate the testing that is done in osbuild/images here.
|
It would be nice to have manifest checksums for these distros in osbuild/images. We could even do real manifest generation for them in CI, just like we do for ppc64le and s390x where we don't build them, but at least make sure the manifest can be generated (and are valid). What do you all think? |
Assert the required-to-exist Alma Linux (and Kitten) image types for 8, 9, and 10. This will fail until the related
imagesPR 1 lands and is in a released version ofimages.