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 upgrade --dry-run or so #3

Closed
cgwalters opened this issue Dec 1, 2022 · 4 comments · Fixed by #105
Closed

Add upgrade --dry-run or so #3

cgwalters opened this issue Dec 1, 2022 · 4 comments · Fixed by #105
Labels
good first issue Good for newcomers

Comments

@cgwalters
Copy link
Collaborator

So that client-side automation tooling can poll for updates before downloading. xref coreos/rpm-ostree#4176 etc.

@cgwalters cgwalters added the good first issue Good for newcomers label Apr 5, 2023
@jbtrystram
Copy link
Contributor

jbtrystram commented Jun 30, 2023

I started to work on this as a first contribution but I am unsure how to wire things up.
Determining if a new update is available without pulling the whole image requires to run skopeo inspect and look at the digest of the remote image.
This quite easy to implement but I see that skopeo and podman utils are gated behind the install feature, and given #81 , I suppose adding a requirement on skopeo for the upgrade subcommand is not something we want.

Given this comment https://github.com/coreos/rpm-ostree/pull/4486/files#r1246174405 it appears there is the necessary bits in ostree-rs-ext ?
I'll keep looking around but I wanted to make sure I am on the correct path, as I am just discovering all this ecosystem :)

@cgwalters
Copy link
Collaborator Author

This quite easy to implement but I see that skopeo and podman utils are gated behind the install feature, and given #81 , I suppose adding a requirement on skopeo for the upgrade subcommand is not something we want.

No; bootc hard requires https://github.com/ostreedev/ostree-rs-ext/ which hard requires skopeo (indirectly via https://github.com/containers/containers-image-proxy-rs )

That's how upgrades work (which is related to but distinct from installs).

Given this comment https://github.com/coreos/rpm-ostree/pull/4486/files#r1246174405 it appears there is the necessary bits in ostree-rs-ext ?

Yes, just see the code implementing bootc upgrade - the key bit is https://docs.rs/ostree-ext/0.11.1/ostree_ext/container/store/struct.ImageImporter.html#method.prepare which is exactly the "fetch manifest without fetching layers".

@cgwalters
Copy link
Collaborator Author

Also, welcome and thanks for your interest!

@jbtrystram
Copy link
Contributor

@cgwalters awesome ! Thanks for the clarification !

jbtrystram added a commit to jbtrystram/bootc that referenced this issue Jul 4, 2023
This simply pull the manifest of the iamge to see if any update and
available. It could be named `--dry-run` but I wanted to be consistent
with `rpm-ostree`.
Fixes containers#3

Signed-off-by: jbtrystram <[email protected]>
jbtrystram added a commit to jbtrystram/bootc that referenced this issue Jul 5, 2023
This simply pull the manifest of the image to see if any update and
available. It could be named `--dry-run` but I wanted to be consistent
with `rpm-ostree`
Fixes containers#3

Signed-off-by: jbtrystram <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants