Skip to content

"cache add" command: improve error message for not existing image. #9217

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

Closed
medyagh opened this issue Sep 10, 2020 · 9 comments · Fixed by #10811
Closed

"cache add" command: improve error message for not existing image. #9217

medyagh opened this issue Sep 10, 2020 · 9 comments · Fixed by #10811
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@medyagh
Copy link
Member

medyagh commented Sep 10, 2020

PS C:\Users\jenkins> minikube cache add doesnt_exist_thing:haha
E0910 18:30:13.540553    3980 cache.go:63] save image to file "doesnt_exist_thing:haha" -> "C:\\Users\\jenkins\\.minikube\\cache\\images\\doesnt_exist_thing_haha" failed: nil image for doesnt_exist_thing:haha: GET https://index.docker.io/v2/library/doesnt_exist_thing/manifests/haha: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/doesnt_exist_thing Type:repository]]

X Exiting due to MK_CACHE_LOAD: save to dir: caching images: caching image "C:\\Users\\jenkins\\.minikube\\cache\\images\\doesnt_exist_thing_haha": nil image for doesnt_exist_thing:haha: GET https://index.docker.io/v2/library/doesnt_exist_thing/manifests/haha: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/doesnt_exist_thing Type:repository]]
*
* If the above advice does not help, please let us know:
  - https://github.com/kubernetes/minikube/issues/new/choose

@medyagh medyagh added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Sep 10, 2020
@medyagh medyagh changed the title improve error message: when cache add none existing image "cache add" command: improve error message for not existing image. Sep 10, 2020
@medyagh medyagh added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 10, 2020
@Evalle
Copy link
Contributor

Evalle commented Sep 18, 2020

I can try to help with that
/assign

@Evalle
Copy link
Contributor

Evalle commented Sep 22, 2020

Hey @medyagh what about something like that:

Before:

PS C:\Users\jenkins> minikube cache add doesnt_exist_thing:haha
E0910 18:30:13.540553    3980 cache.go:63] save image to file "doesnt_exist_thing:haha" -> "C:\\Users\\jenkins\\.minikube\\cache\\images\\doesnt_exist_thing_haha" failed: nil image for doesnt_exist_thing:haha: GET https://index.docker.io/v2/library/doesnt_exist_thing/manifests/haha: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/doesnt_exist_thing Type:repository]]

X Exiting due to MK_CACHE_LOAD: save to dir: caching images: caching image "C:\\Users\\jenkins\\.minikube\\cache\\images\\doesnt_exist_thing_haha": nil image for doesnt_exist_thing:haha: GET https://index.docker.io/v2/library/doesnt_exist_thing/manifests/haha: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/doesnt_exist_thing Type:repository]]
*
* If the above advice does not help, please let us know:
  - https://github.com/kubernetes/minikube/issues/new/choose

After:

❯ ./out/minikube  cache add doesnt_exist_thing:haha
E0922 15:42:36.984485   75391 cache.go:63] save image to file "doesnt_exist_thing:haha" -> "/Users/i356129/.minikube/cache/images/doesnt_exist_thing_haha" failed:
The image you're trying to add to the cache doesn't exist locally on your machine: try to build or to pull it first.

❌  Exiting due to MK_CACHE_LOAD: save to dir: caching images: caching image "/Users/i356129/.minikube/cache/images/doesnt_exist_thing_haha": nil image for doesnt_exist_thing:haha: GET https://index.docker.io/v2/library/doesnt_exist_thing/manifests/haha: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/doesnt_exist_thing Type:repository]]

😿  If the above advice does not help, please let us know:
👉  https://github.com/kubernetes/minikube/issues/new/choose

@tstromberg
Copy link
Contributor

@Evalle - sounds good to me.

@medyagh
Copy link
Member Author

medyagh commented Feb 13, 2021

@Evalle I have not heared from you, are u still doing this ?

@tripolkaandrey
Copy link
Contributor

@medyagh do you mind if assigned myself and tried it?

@Evalle Evalle removed their assignment Mar 13, 2021
@Evalle
Copy link
Contributor

Evalle commented Mar 13, 2021

@tripolkaandrey feel free to work on it!
/assign @tripolkaandrey

@tripolkaandrey
Copy link
Contributor

@Evalle okay. Thank you for assigning me

@spowelljr
Copy link
Member

Thanks for taking the issue @tripolkaandrey!

@tripolkaandrey
Copy link
Contributor

@spowelljr I am glad to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
5 participants