-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
wip: Exit out when failed to download kic image and fallback images. #11589
wip: Exit out when failed to download kic image and fallback images. #11589
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vishjain The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @vishjain. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Can one of the admins verify this patch? |
@@ -173,7 +173,9 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down | |||
return nil | |||
} | |||
} | |||
klog.Infof("failed to download %s, will try fallback image if available: %v", img, err) | |||
infoStr := fmt.Sprintf("failed to download %s, will try fallback image if available: %v", img, err) | |||
image.ErrFailedDownloadKICImages = errors.New(infoStr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually, global Err*
variables are supposed to be read-only, excluding maybe init functions. The idea is to be able to have checks like if err == image.ErrFailedDownloadKICImages { ...
. Changing value of Err*
makes such checks undetermined and hard to debug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add PR description attaching minikube logs before and after the changes?
@@ -21,3 +21,6 @@ var ErrNeedsLogin error | |||
|
|||
// ErrGithubNeedsLogin is thrown when user needs to login specifically to github packages) | |||
var ErrGithubNeedsLogin error | |||
|
|||
// ErrFailedDownloadKICImages is thrown when user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you finish this comment?
@@ -193,6 +195,8 @@ func waitDownloadKicBaseImage(g *errgroup.Group) { | |||
} | |||
if errors.Is(err, image.ErrGithubNeedsLogin) || errors.Is(err, image.ErrNeedsLogin) { | |||
exit.Message(reason.Usage, `Please either authenticate to the registry or use --base-image flag to use a different registry.`) | |||
} else if errors.Is(err, image.ErrFailedDownloadKICImages) { | |||
exit.Message(reason.Usage, "Failed to download KIC base image or any fallback image.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a "Usage" problem !
@vishjain still working on this ? |
@medyagh Making changes, Thanks! |
fixes #8997