-
Notifications
You must be signed in to change notification settings - Fork 146
Bump to newer ocidir and containers-image-proxy #1377
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
Conversation
Mostly just keeping up with things, but this is also prep for us using `GetRawBlob`. Signed-off-by: Colin Walters <[email protected]>
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.
Code Review
The pull request bumps the versions of ocidir and containers-image-proxy. There are several instances where error handling could be improved by explicitly handling the result of functions like read_index and new_empty_manifest instead of unwrapping them. Additionally, adding comments to explain the use of try_clone() would improve code clarity.
| )?; | ||
|
|
||
| let mut manifest = ocidir::new_empty_manifest().build().unwrap(); | ||
| let mut manifest = writer.new_empty_manifest()?.build().unwrap(); |
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.
| let idx = tempsrc | ||
| .read_index()? | ||
| .ok_or(anyhow!("Reading image index from source"))?; | ||
| let idx = tempsrc.read_index()?; |
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.
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.
Gemini is apparently just confused by us dropping a ?, clearly the error is still handled
|
|
||
| let mut config = ImageConfigurationBuilder::default().build().unwrap(); | ||
| let mut manifest = ocidir::new_empty_manifest().build().unwrap(); | ||
| let mut manifest = self.src_oci.new_empty_manifest()?.build().unwrap(); |
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.
| self.src_oci | ||
| .replace_with_single_manifest(manifest, oci_image::Platform::default())?; | ||
| let idx = self.src_oci.read_index()?.unwrap(); | ||
| let idx = self.src_oci.read_index()?; |
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.
Mostly just keeping up with things, but this is also prep for us using
GetRawBlob.