Skip to content

Disable local cache lookup, favor parallel download #139

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

Merged
merged 7 commits into from
Jul 18, 2022

Conversation

puerco
Copy link
Member

@puerco puerco commented Jul 15, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

This PR disables the local daemon lookup of container images to fix #134.

When passing a reference to a multiarch image to the local docker daemon, the reference gets transalated to the local arch image, generating an SBOM only for the image corresponding to the local architecture.

This PR reverts the local daemon change as apparently there is no way to get the docker daemon to return the correct reference (to the image index ) to GGCR.

In order to improve image download times the blob downloads to local tarballs are now parallelized which should at least provide some speed gains.

Which issue(s) this PR fixes:

Fixes #134

Special notes for your reviewer:

/cc @kubernetes-sigs/release-engineering

Does this PR introduce a user-facing change?

- Looking for precached images in the local daemon is now removed as it broke multiarch image SBOMs
- Image downloading is now done in parallel. This should provide some speed gains in some high bandwidth settings

puerco added 5 commits July 14, 2022 19:25
Container image referencess are no longer resolved using the local
daemon. This caused a bug where references pointing to indices were
resolveds as single arch images.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
Aparently, there is no way to access the local arch blobs behind
a multiarch index using GGCR when they have been cached by pulling
the index ref. Therefore, this commit completely removes the local
daemon checks from the download code.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
This commit parallelizes arch image downloads to download
them 4 at a time. It also abstracts the image reference
data into a type of its own to simplify the code and interfaces.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 15, 2022
Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Just two nits, otherwise LGTM 👍

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 18, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: puerco, saschagrunert

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:
  • OWNERS [puerco,saschagrunert]

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

@k8s-ci-robot k8s-ci-robot merged commit 40f48de into kubernetes-sigs:main Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiarch images broken when generating sbom from local docker cache
3 participants