Skip to content
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

Add container upgrade --check function #4486

Merged
merged 2 commits into from
Sep 21, 2023

Commits on Sep 20, 2023

  1. Update to ostree-ext 0.12.1

    This has a few fixes, including a new update check API.
    cgwalters committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    2b9e911 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Add container upgrade --check function

    Previously, OS based on native containers could not retrieve the
    manifest difference between the current system container image and its
    corresponding remote container image without performing an actual
    upgrade. This PR solves this issue by allowing the manifest difference
    to be outputted when using the `rpm-ostree upgrade --check` command.
    
    A `ManifestDiff` struct needed to be retrieved using `ostree-rs-ext`,
    requring several new functions in both Rust and C that were bridged
    through CXX Bridge.
    
    The `cached_update` object also needed to be modifed and updated with
    the `ManifestDiff` in order to extend compatibility with other products
    using rpm-ostree. However, a notable difference between how the
    `--upgrade --check` function works for ostree based system and a native
    container based system is that native containers skip over the use of
    `checksums`. This is because rebasing to locally stored container images
    (as opposed to a remote repository) does not create a valid ostree
    refspec.
    
    A Rust unit test was implemented to confirm that a difference between
    two manifests (stored locally in the rust/test folder) can be
    successfully retrieved. A `kola` test was also implemented to confirm
    that running `rpm-ostree upgrade --check` returns the correct manifest
    difference for a potential upgrade.
    lukewarmtemp authored and cgwalters committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    c2b3110 View commit details
    Browse the repository at this point in the history