Repository navigation
coreos: generalize to any aleph created by bootc - #1124
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the CoreOS-specific coreos.rs module with a more generic aleph.rs module to support both CoreOS (.coreos-aleph-version.json) and bootc (.bootc-aleph.json) aleph version files. The feedback suggests improving robustness by falling back to file modification time if creation time is unsupported by the filesystem, and adding error context when parsing the JSON files.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| log::debug!("Found aleph version in {aleph_path}"); | ||
| return Ok(Some(AlephWithTimestamp { | ||
| aleph, | ||
| ts: meta.created()?.into(), |
There was a problem hiding this comment.
Using metadata.created() can fail on filesystems or operating systems that do not support or expose creation times (returning std::io::ErrorKind::Unsupported or similar). Since this error is propagated with ?, it will cause get_aleph_version to fail entirely, which in turn breaks bootupd status and updates on those systems.
Falling back to metadata.modified() when created() fails makes this much more robust.
| ts: meta.created()?.into(), | |
| ts: meta.created().or_else(|_| meta.modified())?.into(), |
Pure rename of coreos.rs -> aleph.rs and update of all import paths. No functional changes, done as a separate commit so git tracks the rename and subsequent changes show as a diff. Authored-by: Opencode.ai claude-opus-4-6@default
Disk images created by `bootc install` are shipping an aleph file at a different path than what existed historically. Update our tests to look for both locations. See coreos/fedora-coreos-tracker#2187 And coreos/bootupd#1124
Disk images created by `bootc install` are shipping an aleph file at a different path than what existed historically. Update our tests to look for both locations. See coreos/fedora-coreos-tracker#2187 And coreos/bootupd#1124
| let bufr = std::io::BufReader::new(statusf); | ||
| let aleph: Aleph = serde_json::from_reader(bufr)?; | ||
| log::debug!("Found aleph version in {aleph_path}"); | ||
| return Ok(Some(AlephWithTimestamp { |
There was a problem hiding this comment.
We're returning as soon as we find a file. Are we sure we won't have one in both the paths?
There was a problem hiding this comment.
If both exists, the second will be a symlink to the bootc one anyway.
When this ships, we will drop the compat symlink
|
Also needs |
The aleph module was previously specific to CoreOS (.coreos-aleph-version.json). bootc install to-filesystem also writes an aleph file at /sysroot/.bootc-aleph.json. Support both paths, checking the CoreOS path first for backward compatibility. Also generalize comments, log messages, and variable names to no longer be CoreOS-specific, and add tests for the bootc aleph format including a realistic sample from bootc-dev/bootc@c6112d2. Authored-by: Opencode.ai claude-opus-4-6@default
722ed77 to
e7a2e0a
Compare
|
The jenkins test here will be fixed with coreos/fedora-coreos-config#4261 |
|
I think this is fine, but...probably something got missed here in that the aleph stuff was only added to bootupd precisely because before bootupd existed, the aleph data had some (indirect) information about the bootloader state. No system installed that has a bootc aleph will be missing bootupd data (except those using systemd-boot directly, but those don't have bootupd installed either!). |
Disk images created by `bootc install` are shipping an aleph file at a different path than what existed historically. Update our tests to look for both locations. See coreos/fedora-coreos-tracker#2187 And coreos/bootupd#1124
Disk images created by `bootc install` are shipping an aleph file at a different path than what existed historically. Update our tests to look for both locations. See coreos/fedora-coreos-tracker#2187 And coreos/bootupd#1124
The aleph version wording upstream was changed slightly in [1] so let's adjust our tests here to just search for 'aleph version' and ignoring case to accomodate the new output: ``` [core@cosa-devsh ~]$ sudo bootupctl status Running as unit: bootupd.service Component BIOS Installed: grub2-tools-1:2.12-78.fc46.x86_64 Update: At latest version Component EFI Installed: grub2-1:2.12-78.fc46,shim-16.1-7 Update: At latest version No components are adoptable. Aleph version: 46.20260825.91.dev1 Boot method: BIOS ``` [1] coreos/bootupd#1124
The aleph version wording upstream was changed slightly in [1] so let's adjust our tests here to just search for 'aleph version' and ignoring case to accomodate the new output: ``` [core@cosa-devsh ~]$ sudo bootupctl status Running as unit: bootupd.service Component BIOS Installed: grub2-tools-1:2.12-78.fc46.x86_64 Update: At latest version Component EFI Installed: grub2-1:2.12-78.fc46,shim-16.1-7 Update: At latest version No components are adoptable. Aleph version: 46.20260825.91.dev1 Boot method: BIOS ``` [1] coreos/bootupd#1124
Disk images created by `bootc install` are shipping an aleph file at a different path than what existed historically. Update our tests to look for both locations. See coreos/fedora-coreos-tracker#2187 And coreos/bootupd#1124 Co-authored-by: Rolv Apneseth <[email protected]>
Disk images created by `bootc install` are shipping an aleph file at a different path than what existed historically. Update our tests to look for both locations. Also make use of the new bootupd status `--json` flag to make the parsing more determinstic. See coreos/fedora-coreos-tracker#2187 And coreos/bootupd#1124 Co-authored-by: Rolv Apneseth <[email protected]>
Disk images created by `bootc install` are shipping an aleph file at a different path than what existed historically. Update our tests to look for both locations. Also make use of the new bootupd status `--json` flag to make the parsing more determinstic. See coreos/fedora-coreos-tracker#2187 And coreos/bootupd#1124 Co-authored-by: Rolv Apneseth <[email protected]>
Rename the
coreosmodule toalephasbootc installwill create an aleph file in all cases except the composefs path.There is nothing specific to coreOS anymore in this path.
See bootc-dev/bootc@c6112d2 And coreos/fedora-coreos-tracker#2187