Giter Club home page Giter Club logo

Comments (14)

victorb avatar victorb commented on August 26, 2024 1

Thanks a lot @koresar and @rawgni for digging into this, I can't express how thankful I am for you helping out tracking this down!

So I've just pushed a new change, that should show errors better and give the proper error code. Please try it out and let me know how it goes. (version 0.9.1).

@koresar regarding that, you'll need to put the --verbose flag in the end of the command. In this case:

autochecker --verbose 0.10.41 0.10.42 4.4.2

0.10.41 becomes an argument to --verbose instead of being a thing of it's own. So do

autochecker 0.10.41 0.10.42 4.4.2 --verbose 

instead and it should work fine.

from autochecker.

bahmutov avatar bahmutov commented on August 26, 2024

I get this error a lot when I do multiple versions builds and I think this is due to Docker build process getting overwhelmed, more information about the error / logs would go the long way. I think for me this happens using docker 1.11.0 right now

from autochecker.

koresar avatar koresar commented on August 26, 2024

Our docker daemon is not overwhelmed, in fact it's idle. We are using Docker 1.9 on AWS ECS though.

from autochecker.

victorb avatar victorb commented on August 26, 2024

Hm, this seems bad. Might be something funny with how the tag+image name is being generated and/or passed around. I'll take a look later.

However, whats even worse is that the exit code was 0... I'll try and fix this sooner but if anyone wants to take a look at where this could be, feel free.

Thanks for reporting this!

from autochecker.

victorb avatar victorb commented on August 26, 2024

@koresar the exit code should always be set to something that is not zero, can you check which version you have? Since there is no version command until right now (aef512d)

Regarding the "no such container - No such image", I'm still trying to reproduce it locally, by running all the examples and also running just autochecker with the 32 nodejs versions, but no luck so far...

from autochecker.

koresar avatar koresar commented on August 26, 2024

Previously our Continuous Integration had these lines

npm install
npm test

It was running just fine.
I changed it to be

npm i -g autochecker
autochecker 0.10.41 4.4.2

The new output is
image
Yes, this returned the exit code 0.

As you can see the latest autochecker is installed each time a build happens.

But the good news is that we hit this roadblock now - #10 :)

from autochecker.

rawgni avatar rawgni commented on August 26, 2024

might be because DockerTemplate is not in the current directory ?

from autochecker.

koresar avatar koresar commented on August 26, 2024

There is no DockerTempalte at all. Thus we are using the default one.
But, could it be related to the Dockerfile in the current directory?

from autochecker.

rawgni avatar rawgni commented on August 26, 2024

Might be due to an error in building the image.
Can you try doing just one version? ie. autochecker 0.10.44

from autochecker.

koresar avatar koresar commented on August 26, 2024

Wow! An amazing guess @rawgni!
autochecker 0.10.41 actually worked! The error exit code is returned correctly. E.g. when tests fail the exit code is non zero.
Then I tried autochecker 0.10.41 4.4.2. It resulted with the same error as above.
Then I tried autochecker 4.4.2. It also worked just fine.

from autochecker.

rawgni avatar rawgni commented on August 26, 2024

autochecker --verbose 0.10.41 4.4.2 will show you the right exit code.

The problematic code is found in buildImage inside index.js

      stream.on('data', (chunk) => {
        if (verbose) {
          const parsed = JSON.parse(chunk.toString())
          var to_print = null
          if (parsed.status) {
            to_print = parsed.status
          }
          if (parsed.stream) {
            to_print = parsed.stream
          }
          if (parsed.error) {
            reject(parsed.error)
            return
          }
          ...

Error checking is turned of if there are multiple versions specified and no verbose flag given. Thus, any error in the stream will not be checked.

Should probably change it to:

      stream.on('data', (chunk) => {
          const parsed = JSON.parse(chunk.toString())
          if (parsed.error) {
            reject(parsed.error)
            return
          }
          if (verbose) {
             var to_print = null
             if (parsed.status) {
                to_print = parsed.status
             }
             if (parsed.stream) {
                to_print = parsed.stream
             }
          ...

from autochecker.

koresar avatar koresar commented on August 26, 2024

Another bug. @victorbjelkholm
autochecker --verbose 0.10.41 4.4.2
Prints:
## Running tests in version 4.4.2 only
I expected it to run both.

Although, when I do this:
autochecker --verbose 0.10.41 0.10.42 4.4.2
it prints:
autochecker Running tests in 2 different sessions
(and it fails as in the screenshot above)

from autochecker.

koresar avatar koresar commented on August 26, 2024

Ran autochecker 0.10.42 4.4.2 --verbose using v0.9.1. So far so good. Will continue testing.
Amazing module @victorbjelkholm
Thank you very much for the quick fix :)

from autochecker.

koresar avatar koresar commented on August 26, 2024

Nope. No go.

Command line

npm i -g autochecker@latest
echo running autochecker
autochecker 4 --verbose

Output

## Running tests in version 4 only
4 - copying files
4 - writing dockerfile
4 - pulling image mhart/alpine-node:4
Pulling from mhart/alpine-node
Digest: sha256:82b15570cf58aebd5acc4208e5c3d4dd3fca6b5bcde094377c74516c291ad8b7
Status: Image is up to date for mhart/alpine-node:4
4 - building image
...SNIP...
4 - running container
Error: HTTP code is 404 which indicates error: no such container - No such image: @safetyculture/base-npm-module_4:cf1a36c1d09e8db3e131ac1603f324659fa947b2

Although, the executable always returns correct exit code. Which is good!

I'm trying to test the private npm module. Could the problem be the container name?
@safetyculture/base-npm-module_4:cf1a36c1d09e8db3e131ac1603f324659fa947b2
Docker or autochecker cannot handle the @ or / symbol or something? @victorbjelkholm

from autochecker.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.