Skip to content

Add SOCI conversion#1522

Merged
Kern-- merged 3 commits into
awslabs:mainfrom
Kern--:conversion
Apr 30, 2025
Merged

Add SOCI conversion#1522
Kern-- merged 3 commits into
awslabs:mainfrom
Kern--:conversion

Conversation

@Kern--
Copy link
Copy Markdown

@Kern-- Kern-- commented Apr 18, 2025

Issue #, if available:

Description of changes:
This change adds a command to convert an image to a SOCI-enabled image which contains strong references to both the image and SOCI index in a logically single, deployable artifact.

Testing performed:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Kern-- Kern-- force-pushed the conversion branch 3 times, most recently from 3df8c4c to affaafb Compare April 23, 2025 16:44
@Kern-- Kern-- marked this pull request as ready for review April 23, 2025 16:44
@Kern-- Kern-- requested a review from a team as a code owner April 23, 2025 16:44
@github-actions github-actions Bot added go Pull requests that update Go code testing Unit and/or integration tests labels Apr 23, 2025
Comment thread cmd/soci/commands/convert.go Outdated
Comment thread cmd/soci/commands/convert.go Outdated
Comment thread cmd/soci/commands/convert.go Outdated
Comment thread cmd/soci/commands/convert.go Outdated
Comment thread cmd/soci/commands/convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_convert_test.go
Comment thread soci/soci_index.go Outdated
This chnage uses the containerd content store for the SOCI CLI. SOCI
indexes will be tied to the image lifecycle and will get automtaically
garbage collected when the image is removed.

The snapshotter still uses the local soci content store by default until
we're confident that the circular reference back to contaienrd is safe.

Signed-off-by: Kern Walster <walster@amazon.com>
@Kern-- Kern-- force-pushed the conversion branch 3 times, most recently from a8de399 to bbd4825 Compare April 25, 2025 20:34
Comment thread cmd/soci/commands/convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread cmd/soci/commands/convert.go Outdated
Comment thread cmd/soci/commands/convert.go Outdated
Comment thread cmd/soci/commands/create.go Outdated
Comment thread integration/convert_test.go Outdated
Comment thread soci/soci_index.go Outdated
Comment thread soci/soci_index.go Outdated
Comment thread util/ociutil/ociutil.go Outdated
Comment thread util/ociutil/ociutil.go Outdated
sondavidb
sondavidb previously approved these changes Apr 30, 2025
Copy link
Copy Markdown
Contributor

@sondavidb sondavidb left a comment

Choose a reason for hiding this comment

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

Generally LGTM, all my comments are OK to address in a followup PR.

Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_index.go Outdated
Comment thread soci/soci_convert.go Outdated
Comment thread soci/soci_index.go Outdated
Comment thread util/ociutil/ociutil.go Outdated
Before this change, tests that verify invalid ztocs ingested the ztoc
into the containerd content store, then applied a root gc label. This
introduced a race condition where the content could be gc'd after
ingestion, but before labelling leading to flakey tests and missing
content.

This change makes ingestion require a parent content object which will
get a gc label before ingestion. This guarantees that the newly ingested
content will not be gc'd because there it already has a path to a gc
root befor the ingestion happens.

Signed-off-by: Kern Walster <walster@amazon.com>
This change adds a command to convert an image to a SOCI-enabled image which
contains strong references to both the image and SOCI index in a
logically single, deployable artifact.

Signed-off-by: Kern Walster <walster@amazon.com>
Copy link
Copy Markdown
Contributor

@swagatbora90 swagatbora90 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Kern-- Kern-- merged commit 963edca into awslabs:main Apr 30, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code testing Unit and/or integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants