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

Invalid error when pulling a failing build #563

Open
pditommaso opened this issue Jul 11, 2024 · 7 comments
Open

Invalid error when pulling a failing build #563

pditommaso opened this issue Jul 11, 2024 · 7 comments
Assignees

Comments

@pditommaso
Copy link
Contributor

pditommaso commented Jul 11, 2024

When pulling a container for which the build reports an error, the docker pull message should report the build error message.

Instead the generic error message shown below is displayed. For example, consider the following Dockerfile

FROM alpine  
RUX echo Hello

then

» wave -f Dockerfile 
wave.seqera.io/wt/f818a5c57427/wave/build:41ca856abe43de2e

» docker pull wave.seqera.io/wt/f818a5c57427/wave/build:41ca856abe43de2e

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview wave.seqera.io/wt/f818a5c57427/wave/build:41ca856abe43de2e
Error response from daemon: failed to resolve reference "wave.seqera.io/wt/f818a5c57427/wave/build:41ca856abe43de2e": unexpected status from HEAD request to https://wave.seqera.io/v2/wt/f818a5c57427/wave/build/manifests/41ca856abe43de2e: 400 Bad Request

Instead this message should be reported

#1 [internal] load build definition from Containerfile
#1 transferring dockerfile: 69B 0.0s done
#1 DONE 0.1s
Containerfile:2
--------------------
   1 |     FROM alpine  
   2 | >>> RUX echo Hello
   3 |     
--------------------
error: failed to solve: dockerfile parse error on line 2: unknown instruction: RUX (did you mean RUN?)
@munishchouhan
Copy link
Member

in local I am getting the correct error:

(base) munish.chouhan@Munishs-MacBook-Pro wave_testing % wave -f Dockerfile_Invalid --wave-endpoint http://localhost:9090                            
cace-85-136-67-71.ngrok-free.app/wt/XXXXXXXX/wave/build/dev:aaebbebb23dfb16b
(base) munish.chouhan@Munishs-MacBook-Pro wave_testing % docker pull cace-85-136-67-71.ngrok-free.app/wt/XXXXXXX/wave/build/dev:aaebbebb23dfb16b

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview cace-85-136-67-71.ngrok-free.app/wt/XXXXXXXX/wave/build/dev:aaebbebb23dfb16b
Error response from daemon: unknown: #1 [internal] load build definition from Containerfile
#1 transferring dockerfile: 66B done
#1 DONE 0.0s
Containerfile:2
--------------------
   1 |     FROM alpine
   2 | >>> RUX echo Hello
--------------------
error: failed to solve: dockerfile parse error on line 2: unknown instruction: RUX (did you mean RUN?)

@munishchouhan
Copy link
Member

@pditommaso did you already fixed it?
because in prod also I am getting correct error

(base) munish.chouhan@Munishs-MacBook-Pro wave_testing % wave -f Dockerfile_Invalid                                                                  
wave.seqera.io/wt/xxxxxxxx/wave/build:fe0d311df2ef561f
(base) munish.chouhan@Munishs-MacBook-Pro wave_testing % docker pull wave.seqera.io/wt/xxxxxxxxx/wave/build:fe0d311df2ef561f

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview wave.seqera.io/wt/xxxxxxxx/wave/build:fe0d311df2ef561f
Error response from daemon: unknown: #1 [internal] load build definition from Containerfile
#1 transferring dockerfile: 66B 0.0s done
#1 DONE 0.1s
Containerfile:2
--------------------
   1 |     FROM alpine
   2 | >>> RUX echo Hello
--------------------
error: failed to solve: dockerfile parse error on line 2: unknown instruction: RUX (did you mean RUN?)

@pditommaso
Copy link
Contributor Author

No I didn't. Please try stage or prod

@munishchouhan
Copy link
Member

in stage:

(base) munish.chouhan@Munishs-MacBook-Pro wave_testing % wave -f Dockerfile_Invalid --wave-endpoint https://wave.stage-seqera.io           
wave.stage-seqera.io/wt/xxxxxxx/wave/build/stage:a0a7f21f0c6f6ad1
(base) munish.chouhan@Munishs-MacBook-Pro wave_testing % docker pull wave.stage-seqera.io/wt/xxxxxxx/wave/build/stage:a0a7f21f0c6f6ad1

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview wave.stage-seqera.io/wt/xxxxxxxx/wave/build/stage:a0a7f21f0c6f6ad1
Error response from daemon: unknown: #1 [internal] load build definition from Containerfile
#1 transferring dockerfile: 66B 0.0s done
#1 DONE 0.0s
Containerfile:2
--------------------
   1 |     FROM alpine
   2 | >>> RUX echo Hello
--------------------
error: failed to solve: dockerfile parse error on line 2: unknown instruction: RUX (did you mean RUN?)

and this is in prod:
#563 (comment)

@pditommaso
Copy link
Contributor Author

This is still happening, try enabling freeze option

@munishchouhan
Copy link
Member

yes, it happens with freeze

/bin/zsh /Users/munish.chouhan/testing_ground/wave_testing/buiild_images_prod.sh
docker.io/hrma017/dev:04186797ac16c388
(base) munish.chouhan@Munishs-MacBook-Pro wave_testing % docker pull docker.io/hrma017/dev:04186797ac16c388

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview docker.io/hrma017/dev:04186797ac16c388
Error response from daemon: manifest for hrma017/dev:04186797ac16c388 not found: manifest unknown: manifest unknown

@munishchouhan
Copy link
Member

In case of freeze, pull request directly goes to build repository and because the build fails there is no manifest there, so the error is correct in this case too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants