Skip to content

Use default platform in convert#1557

Merged
Kern-- merged 1 commit into
awslabs:mainfrom
Kern--:convert-platforms
May 29, 2025
Merged

Use default platform in convert#1557
Kern-- merged 1 commit into
awslabs:mainfrom
Kern--:convert-platforms

Conversation

@Kern--
Copy link
Copy Markdown

@Kern-- Kern-- commented May 9, 2025

Issue #, if available:

Description of changes:
Before this change, the SOCI cli defaulted to converting all platforms. This is inconsistent with nerdctl's pull, push, and convert functions. It also leads to weird issues like this not working:

nerdctl pull docker.io/library/busybox:latest
soci convert docker.io/library/busybox:latest other:latest-soci

the solution is either to pull with --all-platforms or convert with --platform. The latter had an additional bug that convert touched all manifests, even if you didn't convert them.

This change makes SOCI default to single platform conversions and fixes the manifests bug. SOCI convert now behaves like nerdctl pull/convert/push.

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-- requested a review from a team as a code owner May 9, 2025 17:39
@github-actions github-actions Bot added go Pull requests that update Go code testing Unit and/or integration tests labels May 9, 2025
@Kern-- Kern-- force-pushed the convert-platforms branch 4 times, most recently from 6e9c920 to bc2b799 Compare May 12, 2025 18:49
Comment thread soci/soci_convert.go Outdated
Comment thread integration/convert_test.go Outdated
Comment thread integration/convert_test.go Outdated
Shubhranshu153
Shubhranshu153 previously approved these changes May 21, 2025
Comment thread integration/convert_test.go Outdated
Shubhranshu153
Shubhranshu153 previously approved these changes May 22, 2025
Before this change, the SOCI cli defaulted to converting all platforms.
This is inconsistent with nerdctl's pull, push, and convert functions.
It also leads to weird issues like this not working:

```
nerdctl pull docker.io/library/busybox:latest
soci convert docker.io/library/busybox:latest other:latest-soci
```

the solution is either to pull with `--all-platforms` or convert with
`--platform`. The latter had an additional bug that convert touched all
manifests, even if you didn't convert them.

This change makes SOCI default to single platform conversions and fixes
the manifests bug. SOCI convert now behaves like nerdctl
pull/convert/push.

Signed-off-by: Kern Walster <walster@amazon.com>
@Kern-- Kern-- merged commit fa7d4ca into awslabs:main May 29, 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.

3 participants