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

bugfix: add platform value to container image list #2254

Merged

Conversation

kakaZhou719
Copy link
Member

@kakaZhou719 kakaZhou719 commented Jun 26, 2023

Describe what this PR does / why we need it

  1. add platform to container image list;
  2. skip download duplicate container image;
  3. add some debug logs

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

… container image;add some debug logs

Signed-off-by: kakzhou719 <kakazhou719@163.com>
//handle image name
for _, image := range images {
named, err := ParseNormalizedNamed(image, "")
if err != nil {
return fmt.Errorf("failed to parse image name:: %v", err)
}

//check if image exist
//check if image is duplicate
Copy link
Collaborator

Choose a reason for hiding this comment

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

This judgment may be redundant, as the OCI pull process itself checks for the presence of the image layer.

In addition, there is a risk of misjudgment here.

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. i wonder there is not redundant.
    for example: input images["nginx:latest","docker.io/library/nginx:latest"], will be transformed ["docker.io/library/nginx:latest","docker.io/library/nginx:latest"], so we need to do deduplication,nothing to do with pull process logic.

  2. what risks here ? sorry i dont understand?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I thought we were doing the duplicate removal in the step of pulling image. Currently, it seems that only for the image name, which is OK

Copy link
Collaborator

@starnop starnop left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants