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

manifest: ListUpdate add imgspecv1.Platform field #2029

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

flouthoc
Copy link
Contributor

@flouthoc flouthoc commented Jul 6, 2023

c/image uses Instance( API to get the required details of an instance while performing replication, Platform of instance is needed so it can use it again while adding an instance hence adding Platform to ListUpdate

Needed by: #1987
See prior comment here: #1875 (comment)

@flouthoc
Copy link
Contributor Author

flouthoc commented Jul 6, 2023

@mtrmac @vrothberg @giuseppe PTAL Just a small PR to include Platform field as well.

internal/manifest/list.go Outdated Show resolved Hide resolved
@flouthoc flouthoc force-pushed the listupdate-add-platform branch 3 times, most recently from 7494bfa to 98aaf70 Compare July 7, 2023 04:37
@flouthoc flouthoc requested a review from mtrmac July 7, 2023 04:38
internal/manifest/list.go Outdated Show resolved Hide resolved
internal/manifest/oci_index.go Outdated Show resolved Hide resolved
@flouthoc flouthoc force-pushed the listupdate-add-platform branch from 98aaf70 to e7c50e2 Compare July 7, 2023 04:48
@flouthoc flouthoc requested a review from mtrmac July 7, 2023 04:49
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM.

@@ -57,6 +57,7 @@ func (index *OCI1IndexPublic) Instance(instanceDigest digest.Digest) (ListUpdate
Digest: manifest.Digest,
Size: manifest.Size,
MediaType: manifest.MediaType,
Platform: manifest.Platform,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a bit safer to make a clone instead of providing a pointer to our data, but, meh, we can deal with that if it breaks I guess.

`c/image` uses `Instance(` API to get the required details of an
instance while performing replication `Platform` of instance is needed
hence `ListUpdate` must include platform.

Needed by: containers#1987

Signed-off-by: Aditya R <arajan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants