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

Only skip downloading kic if --download-only=false #13910

Merged
merged 1 commit into from
Apr 5, 2022

Conversation

spowelljr
Copy link
Member

@spowelljr spowelljr commented Apr 4, 2022

Fixes #13452

Problem:
If the kic image already exists in Docker we skip downloading the kic image to cache. However, this causes issues if --download-only is specified as you can have the kic image loaded in Docker but not in the cache, resulting in the cache directory not containing the kic and confusing users why their offline usage isn't working.

Solution:
Only skip downloading the kic image if --download-only=false to prevent the above from happening. Also, the download checks for the existence of the file before downloading, so it will skip the download if the file is already in the cache, so this PR does not result in more unnecessary downloading.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 4, 2022
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 4, 2022
Copy link
Contributor

@klaases klaases left a comment

Choose a reason for hiding this comment

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

LGTM

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: klaases, spowelljr

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

@spowelljr spowelljr merged commit b870d92 into kubernetes:master Apr 5, 2022
@spowelljr spowelljr deleted the downloadKicOffline branch April 5, 2022 23:34
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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kicbase image not being cached when using --download-only
3 participants