Skip to content

feat: oci-sif overlay digest sync #3120

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

Merged
merged 1 commit into from
Jul 17, 2024
Merged

feat: oci-sif overlay digest sync #3120

merged 1 commit into from
Jul 17, 2024

Conversation

dtrudg
Copy link
Member

@dtrudg dtrudg commented Jul 15, 2024

Description of the Pull Request (PR):

When a writable overlay is added to an OCI-SIF image, the digests for the ext3 layer in the OCI structures are correct.

When the overlay is written to, its true digest no long matches those listed in the OCI structures, and recorded against the descriptor in the OCI-SIF.

The new singularity overlay sync command will update the digests for an overlay, in an OCI-SIF file, that has been modified. It does this by:

  • Modifying the OCI.Blob digest recorded for the SIF descriptor.
  • Updating and re-writing the OCI image and index structures in the OCI-SIF.

At this time, this sync task is only invoked by running singularity overlay sync manually. Future PRs may invoke the sync automatically prior to pushing the image to a remote destination.

This fixes or addresses the following GitHub issues:

Before submitting a PR, make sure you have done the following:

@dtrudg dtrudg self-assigned this Jul 15, 2024
@dtrudg dtrudg force-pushed the overlay-sync branch 5 times, most recently from 07b90ca to f56c10d Compare July 15, 2024 16:51
@dtrudg dtrudg changed the title WIP - sync OCI-SIF overlay digest feat: oci-sif overlay digest sync Jul 15, 2024
@dtrudg dtrudg force-pushed the overlay-sync branch 3 times, most recently from 8c96ca6 to 1711a52 Compare July 15, 2024 18:04
@dtrudg dtrudg requested review from cstangeyanez and tri-adam July 15, 2024 18:34
@dtrudg dtrudg marked this pull request as ready for review July 15, 2024 18:34
When a writable overlay is added to an OCI-SIF image, the digests for
the ext3 layer in the OCI structures are correct.

When the overlay is written to, its true digest no long matches those
listed in the OCI structures, and recorded against the descriptor in the
OCI-SIF.

The new `singularity overlay sync` command will update the digests for
an overlay, in an OCI-SIF file, that has been modified. It does this by:

* Modifying the OCI.Blob digest recorded for the SIF descriptor.
* Updating and re-writing the OCI image and index structures in the
  OCI-SIF.

At this time, this sync task is only invoked by running `singularity
overlay sync` manually. Future PRs may invoke the sync automatically
prior to pushing the image to a remote destination.

Closes sylabs#3119
Copy link
Contributor

@wobito wobito left a comment

Choose a reason for hiding this comment

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

LGTM

@dtrudg dtrudg merged commit 33b9eb3 into sylabs:main Jul 17, 2024
1 check passed
@dtrudg dtrudg deleted the overlay-sync branch July 17, 2024 16:17
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.

Update manifest / config for correct overlay digest after changes
2 participants