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

Handle multiple artifacts correctly #1847

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

nalind
Copy link
Member

@nalind nalind commented Feb 6, 2024

When saving artifacts to OCI layout directories to use as supplemental references, use a different directory for each artifact(!)

When supplementing a reference in CopySpecificImages mode, only mark a supplemental reference as the source for a specified instance if it actually corresponds to the instance's digest.

If an artifact manifest doesn't have any file layers, remember to catalog the empty descriptor that we add to its layer list to keep it from being empty, as recommended.

Extend libimage/manifests.TestReference() to ensure that we're able to copy everything that we should be able to copy.

@baude
Copy link
Member

baude commented Feb 6, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Feb 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: baude, nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Feb 6, 2024
@baude
Copy link
Member

baude commented Feb 6, 2024

code LGTM, legit lint failures

@Luap99 @rhatdan ptal

When saving artifacts to OCI layout directories to use as supplemental
refernces, use a different directory for each artifact(!)

When supplementing a reference in CopySpecificImages mode, only mark a
supplemental reference as the source for a specified instance if it
actually corresponds to the instance's digest.

If an artifact manifest doesn't have any file layers, remember to
catalog the empty descriptor that we add to its layer list to keep it
from being empty, as recommended.

Extend libimage/manifests.TestReference() to ensure that we're able to
copy everything that we should be able to copy.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@nalind
Copy link
Member Author

nalind commented Feb 7, 2024

Oof, took a while to find a flake in the unit test that this extends.

@rhatdan
Copy link
Member

rhatdan commented Feb 7, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Feb 7, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 2e565c6 into containers:main Feb 7, 2024
7 checks passed
@nalind nalind deleted the multiple-artifacts branch February 7, 2024 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants