-
Notifications
You must be signed in to change notification settings - Fork 198
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
rust/rpmostree-client: parse OCI deployment manifest #5266
base: main
Are you sure you want to change the base?
Conversation
When the deployment is an OCI image, the base_commit_meta field contains nested escaped JSON. Add a method to get the base oci manifest deserialized into an ImageManifest from the oci-spec rust crate. Fixes coreos#5196
@jbtrystram: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Hmm, did you mean to also update But anyway, I think I'd rather just have that code in Zincati and parse |
|
||
let manifest = self.base_commit_meta.get("ostree.manifest"); | ||
if let Some(inner) = manifest { | ||
let deser = String::deserialize(inner)?; |
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 think it'd be cleaner to do something like:
if let Some(serde_json::Value::String(inner))) {
let manifest: oci_spec::image::ImageManifest = serde_json::from_str(&inner)?;
return Ok(Some(manifest));
}
or so, this String::deserialize
is duplicating the value unnecessarily.
In theory that'd be a compatibility break right?
Yes we still have the practical issue that zincati isn't using this code ref coreos/zincati#491 |
Yes, that's my plan. I simply thought i'd share the patch in this repo as well in case that can help someone :)
I'll try to pick up this one at some point ! |
When the deployment is an OCI image, the base_commit_meta field contains nested escaped JSON.
Add a method to get the base oci manifest deserialized into an ImageManifest from the oci-spec rust crate.
Fixes #5196
Re-openning a new PR after #5208 was closed, given coreos/zincati#1241 (comment)