Skip to content

fedora: image type names follow variants - #1233

Merged
achilleas-k merged 2 commits into
osbuild:mainfrom
supakeen:type-names-follow-variant-names
Apr 24, 2025
Merged

achilleas-k merged 2 commits into
osbuild:mainfrom
supakeen:type-names-follow-variant-names

Conversation

@supakeen

@supakeen supakeen commented Feb 18, 2025 •

Copy link
Copy Markdown
Member

Fedora consists of many variants. Historically we haven't really based our own definitions on anything. Let's introduce variant name prefixes to all Fedora image types to indicate what variant they are based on.

The next PR will then make these variants similar to (or equal to) the Fedora variants as they are supposed to be.

We keep the old image type names around as aliases since changing them is a breaking change. We should however consider deprecating them and emitting a warning for some time. Perhaps a followup.

@supakeen
supakeen requested a review from a team as a code owner February 18, 2025 10:58
@supakeen

Copy link
Copy Markdown
Member Author

I'll assume this needs discussion and followups :)

@supakeen
supakeen marked this pull request as draft February 18, 2025 11:02
@supakeen

Copy link
Copy Markdown
Member Author

The config map commit needs more changes as the image types are now different between various distros they need to be split out; which means duplicating the files since those are the paths.

@achilleas-k

achilleas-k commented Feb 18, 2025 •

Copy link
Copy Markdown
Member

which means duplicating the files since those are the paths.

Not necessary. The image type names don't need to all be valid for each distro, so for example you can have

diff --git a/test/config-map.json b/test/config-map.json
index e8add2b20..4d548d7b0 100644
--- a/test/config-map.json
+++ b/test/config-map.json
@@ -135,6 +135,7 @@
       "gce",
       "gce-rhui",
       "image-installer",
+      "minimal-installer",
       "iot-bootable-container",
       "iot-container",
       "live-installer",
@@ -264,7 +265,8 @@
       "x86_64"
     ],
     "image-types": [
-      "image-installer"
+      "image-installer",
+      "minimal-installer"
     ]
   },
   "./configs/unattended-iso.json": {

and it will work. Just add the new names in the same lists where the old names were.

@supakeen

Copy link
Copy Markdown
Member Author

and it will work. Just add the new names in the same lists where the old names were.

Ah that's good, I'll do that :)

@schutzbot

Copy link
Copy Markdown
Collaborator

This PR changes the images API or behaviour causing integration failures with osbuild-composer. The next update of the images dependency in osbuild-composer will need work to adapt to these changes.

This is simply a notice. It will not block this PR from being merged.

@supakeen supakeen mentioned this pull request Feb 24, 2025
@supakeen

Copy link
Copy Markdown
Member Author

This PR changes the images API or behaviour causing integration failures with osbuild-composer. The next update of the images dependency in osbuild-composer will need work to adapt to these changes.

This is simply a notice. It will not block this PR from being merged.

Names will need to be updated in osbuild-composer after this merges as well. It can probably request the old names but it reports back the new names.

@supakeen

Copy link
Copy Markdown
Member Author

@achilleas-k I might be missing something but the Schutzbot CI fails on:

❌ 2 distro/arch/image combinations have no builds in the cache
   1: fedora-41/x86_64/server-wsl
   2: fedora-40/x86_64/server-wsl

I think I have server-wsl listed under ./configs/empty.json?

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Apr 23, 2025
@supakeen supakeen mentioned this pull request Apr 23, 2025
@supakeen supakeen removed the Stale label Apr 23, 2025
@supakeen

supakeen commented Apr 23, 2025 •

Copy link
Copy Markdown
Member Author

Still open awaiting review, and the previous comment still applies:

@achilleas-k I might be missing something but the Schutzbot CI fails on:

❌ 2 distro/arch/image combinations have no builds in the cache
   1: fedora-41/x86_64/server-wsl
   2: fedora-40/x86_64/server-wsl

I think I have server-wsl listed under ./configs/empty.json?

I'll rebase the conflicts.

@supakeen

Copy link
Copy Markdown
Member Author

Let's start with just the name changes; package sets and other parity work can be done as followups.

@supakeen
supakeen marked this pull request as ready for review April 23, 2025 05:35
@supakeen

supakeen commented Apr 23, 2025 •

Copy link
Copy Markdown
Member Author

This now fails only on minimal-installer (the previous image-installer) with:

⏱  Duration: 0s
org.osbuild.lorax-script: 8791972f76103c310d2e946e16dfe07472e54536dac1e550ba423c8f52a8a6e5 {
  "path": "99-generic/runtime-postinstall.tmpl",
  "basearch": "x86_64",
  "product": {
    "name": "",
    "version": ""
  }
}
Failed to open file "/sys/fs/selinux/checkreqprot": Read-only file system
running script: 99-generic
move '/run/osbuild/tree/usr/share/anaconda/list-harddrives-stub' -> '/run/osbuild/tree/usr/bin/list-harddrives'
Error on line: 0 ['move', 'usr/share/anaconda/list-harddrives-stub', 'usr/bin/list-harddrives']
Traceback (most recent call last):
  File "/run/osbuild/bin/org.osbuild.lorax-script", line 45, in <module>
    r = main(stage_args["tree"],
             stage_args["options"])
  File "/run/osbuild/bin/org.osbuild.lorax-script", line 40, in main
    script()
    ~~~~~~^^
  File "/run/osbuild/lib/osbuild/util/lorax.py", line 80, in __call__
    method(self, *args)
    ~~~~~~^^^^^^^^^^^^^
  File "/run/osbuild/lib/osbuild/util/lorax.py", line 116, in move
    os.rename(src, dst)
    ~~~~~~~~~^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/run/osbuild/tree/usr/share/anaconda/list-harddrives-stub' -> '/run/osbuild/tree/usr/bin/list-harddrives'
⏱  Duration: 0s

Seems like a file doesn't exist, are we missing a package? The file is owned by anaconda-core so somewhere in this PR it seems to have dropped (or perhaps a package dependency or weakdep changed?).

@supakeen

Copy link
Copy Markdown
Member Author

This now fails only on minimal-installer (the previous image-installer) with:

⏱  Duration: 0s
org.osbuild.lorax-script: 8791972f76103c310d2e946e16dfe07472e54536dac1e550ba423c8f52a8a6e5 {
  "path": "99-generic/runtime-postinstall.tmpl",
  "basearch": "x86_64",
  "product": {
    "name": "",
    "version": ""
  }
}
Failed to open file "/sys/fs/selinux/checkreqprot": Read-only file system
running script: 99-generic
move '/run/osbuild/tree/usr/share/anaconda/list-harddrives-stub' -> '/run/osbuild/tree/usr/bin/list-harddrives'
Error on line: 0 ['move', 'usr/share/anaconda/list-harddrives-stub', 'usr/bin/list-harddrives']
Traceback (most recent call last):
  File "/run/osbuild/bin/org.osbuild.lorax-script", line 45, in <module>
    r = main(stage_args["tree"],
             stage_args["options"])
  File "/run/osbuild/bin/org.osbuild.lorax-script", line 40, in main
    script()
    ~~~~~~^^
  File "/run/osbuild/lib/osbuild/util/lorax.py", line 80, in __call__
    method(self, *args)
    ~~~~~~^^^^^^^^^^^^^
  File "/run/osbuild/lib/osbuild/util/lorax.py", line 116, in move
    os.rename(src, dst)
    ~~~~~~~~~^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/run/osbuild/tree/usr/share/anaconda/list-harddrives-stub' -> '/run/osbuild/tree/usr/bin/list-harddrives'
⏱  Duration: 0s

Seems like a file doesn't exist, are we missing a package? The file is owned by anaconda-core so somewhere in this PR it seems to have dropped (or perhaps a package dependency or weakdep changed?).

Figured this out; it was my mistake :)

@supakeen

supakeen commented Apr 23, 2025 •

Copy link
Copy Markdown
Member Author

Seems like a lot of checksums change that I didn't expect, I'll take a look.


Also seems to kinda not work if the image type names change?

@achilleas-k

Copy link
Copy Markdown
Member

Rebased to run builds. If no other build is running, this should rebuild the Fedora WSL images and pass the coverage check.

achilleas-k
achilleas-k previously approved these changes Apr 23, 2025
@supakeen

Copy link
Copy Markdown
Member Author

Rebased to run builds. If no other build is running, this should rebuild the Fedora WSL images and pass the coverage check.

The manual removal of wsl images still lead to a no-build server-wsl. Since this is causing such a ruckus in this PR we've chatted and will drop the rename of wsl to server-wsl instead so it can be submitted as a separate PR where we can also tackle the coverage testing.

The reason is that there is already a manifest with the same checksum, hence the server-wsl image isn't built, which then causes the coverage test to fail as it sees no manifest built for it.

Fedora consists of many variants. Historically we haven't really based
our own definitions on anything. Let's introduce variant name prefixes
to all Fedora image types to indicate what variant they are based on.

The next commit will then make these variants similar to (or equal to)
the Fedora variants as they are supposed to be.

We keep the old image type names around as aliases since changing them
is a breaking change. We should however consider deprecating them and
emitting a warning for some time.

Signed-off-by: Simon de Vlieger <[email protected]>
Due to some issues in testing the manifests it is problematic to have
this image type be named `server-wsl`. Since this keeps blocking the
entire PR I'd prefer to rename it back to `wsl`, and then reintroduce
the change/revert in a separate PR where the CI issue(s) can also be
tackled.

Signed-off-by: Simon de Vlieger <[email protected]>

@achilleas-k achilleas-k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this and sorry for the messiness. I hope we can figure out a nicer way to deal with aliases and renames soon.

@achilleas-k
achilleas-k added this pull request to the merge queue Apr 24, 2025
Merged via the queue into osbuild:main with commit 0b8f276 Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants