-
Notifications
You must be signed in to change notification settings - Fork 80
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
Status tweaks #798
Status tweaks #798
Conversation
Registry is the assumed default; let's be quieter (less output) in this default/expected case. If we're using something else (e.g. `oci`) then put it inline with the image name as that's something one can pass to e.g. `skopeo`. Signed-off-by: Colin Walters <[email protected]>
- Rename variable to `slot_name` as I think it's a bit clearer Signed-off-by: Colin Walters <[email protected]>
Prep for more work; no functional changes. Signed-off-by: Colin Walters <[email protected]>
Just tried to test this locally for a bit and kept running into this error:
Any ideas what's causing that? I don't think I'm setting up the bootc environment wrong, as other commands (like |
see #800 |
Ah, I see. I'll review as much as I can then without being able to test the full thing. My apologies for not staying more on top of my github notifications |
#800 only bites for the upgrade case, which is how it sailed through our primary CI. If you create a fresh image with current bootc git it will work. So e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I need to read about Cow and I left a non-blocking question but it's a certainly a cleaner implementation overall. Agreed that slot_name
is a better var name.
Will double check again locally once #800 is resolved, but I'm ok with merging this before that.
Cow::Borrowed(imagename) | ||
} else { | ||
// But for non-registry we include the transport | ||
Cow::Owned(format!("{transport}:{imagename}")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to read about how Cow works but I like this implementation. It does make a lot more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cow basically abstracts over borrowed/owned data here, it's honestly a pointless micro-optimization but it's not hard to do either.
Ok(()) | ||
} | ||
|
||
fn human_render_ostree(mut out: impl Write, slot_name: &str, _ostree_commit: &str) -> Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this where we'd implement the documentation for additional deployments like rpm-ostree status
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
status: Change transport display
Registry is the assumed default; let's be quieter (less output)
in this default/expected case.
If we're using something else (e.g.
oci
) then put itinline with the image name as that's something one can
pass to e.g.
skopeo
.Signed-off-by: Colin Walters [email protected]
status: Minor code refactorings
slot_name
as I think it's a bit clearerSigned-off-by: Colin Walters [email protected]
status: Factor out helpers for rendering container image
Prep for more work; no functional changes.
Signed-off-by: Colin Walters [email protected]