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

[Bug] No useful error message is presented when Docker registry doesn't exist #1

Open
vitorfhc opened this issue Mar 18, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@vitorfhc
Copy link
Owner

When running bob push and the image has an inexistent registry Docker retries it several times:

docker push inexistent-repo/image:tag
The push refers to repository [inexistent-repo/image:tag]
64ed87b762b2: Retrying in 1 second 
2c0fb72ca8a6: Retrying in 1 second 
2177fb7bef02: Retrying in 1 second 
3759e3bc07e3: Retrying in 1 second 
81b311630260: Retrying in 1 second 
c85c09c7fd7c: Waiting 
27f852d51452: Waiting 
bb6f8ace7cb4: Waiting 
36ffdceb4c77: Waiting 
EOF

As you can see, at the end it just prints an EOF. Since our build considers only what's returned in the last line, we should improve the log when this happens.

Maybe something like

if lastLine == "EOF" {
  log(better message)
}
@vitorfhc vitorfhc added enhancement New feature or request good first issue Good for newcomers labels Mar 28, 2022
@michaelc0n
Copy link

I would like to take this one 👍🏽

@vitorfhc
Copy link
Owner Author

Hey @michaelc0n, sorry for the late reply but feel free to do it! I'll assign you

@michaelc0n
Copy link

@vitorfhc no problem, having a bit of trouble reproducing locally, when tested I get the below:

bob push                             
INFO[0000] Running push command                         
INFO[0000] Pushing image docker.io/inexistent-repo/alpine:3.10  image=docker.io/inexistent-repo/alpine
PANI[0001] Error pushing image                           error="denied: requested access to the resource is denied"
panic: (*logrus.Entry) 0xc000359960

goroutine 1 [running]:

@vitorfhc
Copy link
Owner Author

vitorfhc commented Nov 1, 2022

@michaelc0n it's a Docker error because you're trying to push the image to a repository to which you don't have access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants