rhel8: move eapWorkload() into a regular package list#1660
rhel8: move eapWorkload() into a regular package list#1660supakeen merged 3 commits intoosbuild:mainfrom
Conversation
This commit removes the rhel8 workload for azureEap7 and make it a normal part of the package to install. This changes the way we resolve, i.e. workloads are resolved in a separate transaction. But it should not matter in practise but it shows up in the manifest diff.
The workload concept got introduced around rhel8 but its not used outside a single image type (azureEap7 on rhel8). So drop the unused examples for workloads that are not used. If we need them again we can always pull them from the git history.
|
Thanks. I just wanted to comment on the depsolving part. Others can correct me if I'm wrong. The base package set is depsolved with weak dependencies installed by default, while workload packages (effectivelly the same as the "user-requested" packages) are depsolved with weak dependencies not installed by default. The reason is mostly that users don't have any way to exclude packages in the BP (i.e. the weak deps). So by moving the package set from the custom workload to the base package set, we may start installing weak deps that were not installed before. Therefore the excluded packages list in the base package set may need to be adjusted, so that the package set in the depsolved manifest is the same as before. IOW, the depsolved manifest should not change with this change. Note that I didn't review the code, I just wanted to provide more context on what should be done and how depsolving affects this change. |
I agree. It should be possible to add excludes here so that the real manifest doesn't change. We will still see a change in the mock manifest (because the excludes are listed as packages), but let's make sure to verify the depsolved one. |
f2802dc to
cf43894
Compare
|
Thanks for the extra information! I excluded a bunch of packages now and the package list is now identical (and updated the commit message to explain a bit what happend). |
7206e75 to
7bb499d
Compare
achilleas-k
left a comment
There was a problem hiding this comment.
Great work with the excludes. Thank you!
LGTM
pkg/distro/defs/rhel-8/distro.yaml
Outdated
| - "rhui-azure-rhel8" | ||
| exclude: | ||
| - "firewalld" | ||
| # eapWorkload() |
There was a problem hiding this comment.
If we ever drop the concept of the workload, this comment wont make sense. Maybe just # packages for EAP is clearer.
| @@ -1 +1 @@ | |||
| 0ff31f6862f4a0576820c15e843214ff68e77708 | |||
| a4dc4d950c4e6adf6e046004e603172e2f5ab37f | |||
There was a problem hiding this comment.
The most important change is:
- "sha256:981c6e4afa2c6d0f1b450638f3204f63c1c2197e7d581988223fccb1814ab04c": {
- "url": "https://example.com/repo/packages/os:transaction-2-repos:baseos+appstream+rhui-azure+jbeap7"
i.e. the extra transaction with the workload is gone. Now of course a bunch of extra exclude: are also part of the (fake) manifest change
|
Testing manifest generation locally, I'm getting Which I'm also seeing in the gitlab tests. |
Sorry for that, in my ignorance I only tested 8.10 locally and overlooked that 8.8 and 8.6 also need to be done, I am on it. For 8.6 and 8.8 slightly adjust excludes were needed, this should be all good now, I tested manually 8.6, 8.8, 8.10 and ran: |
7bb499d to
12aa401
Compare
12aa401 to
695a9b0
Compare
By removing the eapWorload() from azure-eap7-rhui we can remove the special cases from the rhel8 tests. When eapWorload() was a custom workload no blueprint customizations where supported. With the simplification in the previous commit they now are supported. Technically this is a behavior change but it will not break backward compatibility, just allow more now. Note that the difference between the "workload" handling and package sets is that workloads will not install weak dependencies but package sets do. So this commit also excludes a bunch of packages that are weak dependencies of the eapWorkload(). With these excludes the resulting package list is identical between before and after in my testing. Validated with: ``` $ gen-manifests -distros rhel-8.* -arches x86_64 -types azure-eap7-rhui $ diff -u \ ./test/data/manifests/rhel_8.<ver>-x86_64-azure_eap7_rhui-empty_rhel.json \ ./test/data/manifests/rhel_8.<ver>-x86_64-azure_eap7_rhui-empty_rhel.json.good ```
695a9b0 to
a7362a6
Compare
We no longer support image types that set a workload directly, see osbuild#1660 and also there is no concept (intentionally) for a workload to be YAML. With this we can drop `workload` from the generic distro `imageType` as this is always unset and we always create a `workload.Custom{}` based on the blueprint config. As a further step we might consider removing the `workload` package entirely and just replace it with `ImageConfig` (this ties into the idea of Achilleas to unify most configs into inheritable ImageConfigs). But that is for later :)
We no longer support image types that set a workload directly, see #1660 and also there is no concept (intentionally) for a workload to be YAML. With this we can drop `workload` from the generic distro `imageType` as this is always unset and we always create a `workload.Custom{}` based on the blueprint config. As a further step we might consider removing the `workload` package entirely and just replace it with `ImageConfig` (this ties into the idea of Achilleas to unify most configs into inheritable ImageConfigs). But that is for later :)
We no longer support image types that set a workload directly, see osbuild#1660 and also there is no concept (intentionally) for a workload to be YAML. With this we can drop `workload` from the generic distro `imageType` as this is always unset and we always create a `workload.Custom{}` based on the blueprint config. As a further step we might consider removing the `workload` package entirely and just replace it with `ImageConfig` (this ties into the idea of Achilleas to unify most configs into inheritable ImageConfigs). But that is for later :)
This commit removes the rhel8 workload for azureEap7 and
make it a normal part of the package to install. This
changes the way we resolve, i.e. workloads are resolved
in a separate transaction. But it should not matter in
practise but it shows up in the manifest diff.
internal: drop unused workload examples
The workload concept got introduced around rhel8 but its not
used outside a single image type (azureEap7 on rhel8). So
drop the unused examples for workloads that are not used.
If we need them again we can always pull them from the
git history.