Skip to content

aleph: handle missing or null version field - #1178

Merged
Johan-Liebert1 merged 1 commit into
coreos:mainfrom
Rolv-Apneseth:optional_aleph_version
Oct 28, 2026
Merged

Johan-Liebert1 merged 1 commit into
coreos:mainfrom
Rolv-Apneseth:optional_aleph_version

Conversation

@Rolv-Apneseth

Copy link
Copy Markdown
Member

In bootc https://github.com/bootc-dev/bootc/blob/main/crates/lib/src/install/aleph.rs already defines the version field as Option, so we should do the same. This handles the field being unset, or set to null as observed in #1166. This change is the "reader" side fix mentioned in that issue.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between df13ef5 and 3a51894.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between cf3da8c and df13ef5.

Files selected for processing: 3
  • src/aleph.rs
  • src/bootupd.rs
  • src/component.rs

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Recent review details
Context from checks skipped due to timeout: 18
  • GitHub Check: testing-farm:fedora-rawhide-x86_64
  • GitHub Check: testing-farm:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: CodeRabbit
  • GitHub Check: bootc-e2e (ubuntu-24.04-arm, 0, 10)
  • GitHub Check: bootc-e2e (ubuntu-24.04-arm, 0, 9)
  • GitHub Check: bootc-e2e (ubuntu-24.04, 1)
  • GitHub Check: bootc-e2e (ubuntu-24.04, 0, 9)
  • GitHub Check: bootc-e2e (ubuntu-24.04, 0, 10)
  • GitHub Check: Tests, unstable toolchain (nightly)
  • GitHub Check: Tests (release), stable toolchain
  • GitHub Check: Tests, unstable toolchain (beta)
  • GitHub Check: bootc-e2e (ubuntu-24.04-arm, 1)
  • GitHub Check: Tests (release), minimum supported toolchain
  • GitHub Check: Build on ppc64le
  • GitHub Check: tmt-tests
  • GitHub Check: Build on s390x
Walkthrough

Aleph.version is now optional, and deserialization accepts missing or null values. Status handling flattens absent version data to None. Adoption-state handling records "unknown" when the Aleph version is absent.

Changes: Aleph version handling

Layer / File(s) Summary
Optional version parsing
src/aleph.rs
Aleph.version changes to Option<String>. Parsing tests cover present versions, the legacy build alias, and missing or null versions.
Consumers of optional versions
src/bootupd.rs, src/component.rs
Status returns None when Aleph metadata or its version is absent. Adoption state records "unknown" when the version is absent.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: jbtrystram, dustymabe

Merge Risk: Minimal · previous review df13e

No merge-blocking issue is identified in the supplied evidence.

Pre-merge checks: Passed 5 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 5 passed
Check name Status Explanation
Title check Passed The title "aleph: handle missing or null version field" describes the main change: making the Aleph version field optional so that missing or null values are accepted. It uses the subsystem prefix, lo…
Description check Passed The description states that bootc's Aleph implementation defines the version field as Option, so this change does the same. It explains that the change handles the field being unset or set to …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Commit Message Convention Passed The PR contains one non-merge commit. Its subject is aleph: handle missing or null version field, which uses a valid component prefix, starts the description with the lowercase imperative handle, …
Full details: Title check

Explanation

The title "aleph: handle missing or null version field" describes the main change: making the Aleph version field optional so that missing or null values are accepted. It uses the subsystem prefix, lowercase text after the colon, and imperative mood, and has no trailing period, so it meets the stated format. The title does not fully match the example subsystem style (e.g., src/aleph.rs), but 'aleph:' is a clear subsystem name.

Full details: Description check

Explanation

The description states that bootc's Aleph implementation defines the version field as Option<String>, so this change does the same. It explains that the change handles the field being unset or set to null, as seen in issue #1166, and calls it the reader-side fix for that issue. This relates directly to the changeset in src/aleph.rs, src/bootupd.rs, and src/component.rs.

Full details: Commit Message Convention

Explanation

The PR contains one non-merge commit. Its subject is aleph: handle missing or null version field, which uses a valid component prefix, starts the description with the lowercase imperative handle, and has no trailing period.

Full details: Docstring Coverage

Explanation

Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 11 functions across 3 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@Rolv-Apneseth

Copy link
Copy Markdown
Member Author

tmt-tests failure seems like an infra issue:

Cause number 1:

    Command 'podman container stop --time 1 tmt-001-NTReEiEU' returned 125.

    # stderr (3 lines)
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    time="2026-10-27T09:41:46Z" level=warning msg="StopSignal SIGTERM failed to stop container tmt-001-NTReEiEU in 1 seconds, resorting to SIGKILL"
    Error: removing container 949a16057d11069af4ddc2263b66017307796456d95fa938132523a8c59d6b8b network: 1 error occurred:
    	* rootless netns: kill network process: permission denied
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@Johan-Liebert1 Johan-Liebert1 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.

LGTM. We don't require bootc-dev/bootc#2591 with this in place right?

@Rolv-Apneseth

Copy link
Copy Markdown
Member Author

LGTM. We don't require bootc-dev/bootc#2591 with this in place right?

Thanks. Replied there

@Rolv-Apneseth

Copy link
Copy Markdown
Member Author

CI should be fixed by #1179

In bootc [1] already defines the version field as Option<String>, so we
should do the same. This handles the field being unset, or set to null
as observed in [2]. This change is the "reader" side fix mentioned in
that issue.

[1]: https://github.com/bootc-dev/bootc/blob/main/crates/lib/src/install/aleph.rs
[2]: coreos#1166
@Rolv-Apneseth
Rolv-Apneseth force-pushed the optional_aleph_version branch from df13ef5 to 3a51894 Compare October 27, 2026 16:40
@Johan-Liebert1
Johan-Liebert1 merged commit a100a09 into coreos:main Oct 28, 2026
22 checks passed
@Rolv-Apneseth
Rolv-Apneseth deleted the optional_aleph_version branch October 28, 2026 08:51
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