Caleydo/ordino_product

Cypress nightly builds on CircleCI are broken

Closed this issue · 2 comments

The Cypress nightly builds on CircleCI are broken since 06.08.2022. The last successful build was 2516. All following builds are broken and never got fixed.

I checked the CircleCI logs and saw that a different base image was used:

  • Build 2516: cypress/base:10
  • Following builds (e.g., 2665): cimg/python:3.10.6-node

Looking at the git history the Docker images for the CircleCI job has been changed to executor: node-executor which uses the CircleCI base image with PR https://github.com/Caleydo/ordino_product/pull/74/files.

Previously:

    docker:
      - image: cypress/base:10
        environment:
          ## this enables colors in the output
          TERM: xterm

Now:

    executor: node-executor
    environment:
      CYPRESS_host: "https://ordino-daily.caleydoapp.org/"

I switched the docker image back to the Cypress base image, but upgraded to the image with Node 16.18 (which is our current node version). My changes can be found in branch https://github.com/Caleydo/ordino_product/commits/thinkh/fix-cypress-nightly.

The npm install fails with the error that git cannot be spawned:

#!/bin/bash -eo pipefail
npm install

npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -2
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-10-31T10_12_12_303Z-debug-0.log


Exited with code exit status 254

CircleCI received exit code 254

It looks like git is either not installed in the Cypress Docker image or not accessible from Node.

Logging git --version states that git is not available:

#!/bin/bash -eo pipefail
git --version

/bin/bash: line 1: git: command not found

Exited with code exit status 127

CircleCI received exit code 127

I fixed a couple of other errors by installing git and ssh as additional Debian dependencies. Otherwise the npm install command fails.

The CircleCI build is now running until the build.js command but failing with a missing pip dependency:

node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: spawn pip ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn pip',
  path: 'pip',
  spawnargs: [ 'list' ]
}

I have now two options:

  1. Install pip and python to build the backend workspace (which is not necessary for the Cypress container)
  2. Modify the build.js script to pass / run only the frontend workspace from the phovea_product.json

@anita-steiner Let's have a discussion which option is better and how to proceed here.