Skip to content

Conversation

@jedevc
Copy link
Contributor

@jedevc jedevc commented Mar 6, 2023

🛠️ Fixes moby/buildkit#1949.

It was possible to still export the docker-compatible manifest.json file, if a single platform image (as a standalone manifest) was exported, even if the WithSkipDockerManifest option was explicitly set.

To resolve this, we remove all references to skipDockerManifest to, adding it instead to the point-of-writing, simplifying the earlier logic and making it clear exactly when this manifest file should be written.

cc @tonistiigi @AkihiroSuda

It was possible to still export the docker-compatible manifest.json
file, if a single platform image (as a standalone manifest) was
exported, even if the WithSkipDockerManifest option was explicitly set.

To resolve this, we remove all references to skipDockerManifest to,
adding it instead to the point-of-writing, simplifying the earlier logic
and making it clear exactly when this manifest file should be written.

Signed-off-by: Justin Chadwell <[email protected]>
@k8s-ci-robot
Copy link

Hi @jedevc. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

just confirming we are leaving the WithSkipDockerManifest() call from the export command intact setting skipDockerManifest to true.. when "skip-manifest-json" is set ...(and not putting out a warning or error) then ignoring whether or not it is set here in in exporter for the manifest cases..

@AkihiroSuda
Copy link
Member

Can we have a test?

@jedevc
Copy link
Contributor Author

jedevc commented Mar 6, 2023

just confirming we are leaving the WithSkipDockerManifest() call from the export command intact setting skipDockerManifest to true.. when "skip-manifest-json" is set ...(and not putting out a warning or error) then ignoring whether or not it is set here in in exporter for the manifest cases..

Yup, that is the previous behaviour, exactly. This patch updates to always respect the value, for manifest and for index.

We don't ignore entirely, we just leave the value of RepoTags empty, instead of not outputting the file at all - I think this is accidental, based on the index code branch, and the doc strings in the code.

Copy link
Member

@kzys kzys left a comment

Choose a reason for hiding this comment

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

Restarting the failed Windows tests.

I agree with @AkihiroSuda. We should have some tests to prevent regression.

@jedevc
Copy link
Contributor Author

jedevc commented Mar 13, 2023

Added a test, confirmed it fails for the single-platform case before this patch, and succeeds after.

I'm not sure if there's an easier way of getting the single-platform manifest descriptor from the index descriptor? images.Manifest seems to be the way to go, but since it directly returns the manifest object, it doesn't seem to be useful for this case.

@estesp
Copy link
Member

estesp commented Mar 14, 2023

/retest

@kzys kzys merged commit a570c81 into containerd:main Mar 14, 2023
@thaJeztah thaJeztah added the cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch label Mar 14, 2023
@thaJeztah thaJeztah added cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch and removed cherry-pick/1.6.x cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch labels Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch ok-to-test

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

In the OCI tarball, the RepoTags list is null, is that expected?

8 participants