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

feat: Update SIF from ImageIndex #62

Merged
merged 1 commit into from
Jul 8, 2024
Merged

feat: Update SIF from ImageIndex #62

merged 1 commit into from
Jul 8, 2024

Conversation

dtrudg
Copy link
Member

@dtrudg dtrudg commented Jun 21, 2024

Add sif.Update which accepts updates a SIF so that its content reflects the ImageIndex passed.

Any blobs in the SIF that are not present in the new ImageIndex will be removed from the SIF.

Any blobs that are present in the new ImageIndex, but not in the SIF, will be added to the SIF.

Blobs that are present in both the SIF and the new ImageIndex are not re-written. They will remain at their current descriptor location in the SIF.

Closes https://github.com/sylabs/oci-tools/issues/48feat: Update SIF from ImageIndex

Add sif.Update which accepts updates a SIF so that its content reflects the ImageIndex passed.

Any blobs in the SIF that are not present in the new ImageIndex will be removed from the SIF.

Any blobs that are present in the new ImageIndex, but not in the SIF, will be added to the SIF.

Blobs that are present in both the SIF and the new ImageIndex are not re-written. They will remain at their current descriptor location in the SIF.

Closes #48

@dtrudg dtrudg self-assigned this Jun 21, 2024
@dtrudg dtrudg force-pushed the issue-48 branch 6 times, most recently from de42d45 to fbf2ea4 Compare June 25, 2024 09:57
@dtrudg dtrudg changed the title WIP - Update SIF from ImageIndex feat: Update SIF from ImageIndex Jun 25, 2024
@dtrudg dtrudg marked this pull request as ready for review July 4, 2024 09:10
@dtrudg dtrudg requested a review from tri-adam July 4, 2024 09:19
Copy link
Member

@tri-adam tri-adam left a comment

Choose a reason for hiding this comment

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

Left a few comments/questions.

My only other thought here is that it's a shame the GGCR Cache interface only supports caching layers (and not manifests/configs.) Otherwise it might be a nice way to hide some of the complexity of that. Oh well!

pkg/sif/update.go Outdated Show resolved Hide resolved
pkg/sif/update.go Outdated Show resolved Hide resolved
pkg/sif/update.go Outdated Show resolved Hide resolved
pkg/sif/update.go Outdated Show resolved Hide resolved
pkg/sif/update.go Outdated Show resolved Hide resolved
@dtrudg dtrudg force-pushed the issue-48 branch 2 times, most recently from 8e2a254 to e6b37ce Compare July 8, 2024 09:35
Add `sif.Update` which accepts updates a SIF so that its content
reflects the ImageIndex passed.

Any blobs in the SIF that are not present in the new ImageIndex will be
removed from the SIF.

Any blobs that are present in the new ImageIndex, but not in the SIF,
will be added to the SIF.

Blobs that are present in both the SIF and the new ImageIndex are not
re-written. They will remain at their current descriptor location in the
SIF.

Closes sylabs#48
@dtrudg dtrudg merged commit d592748 into sylabs:main Jul 8, 2024
12 checks passed
@dtrudg dtrudg deleted the issue-48 branch July 8, 2024 16:03
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.

API(s) to support modification
2 participants