screwdriver icon indicating copy to clipboard operation
screwdriver copied to clipboard

"Cannot read properties of undefined (reading 'getUploadCoverageCmd')" on triggering pipeline

Open QubitPi opened this issue 1 year ago • 1 comments

What happened:

Starting a pipeline job manually results in:

page

The Screwdriver API server running inside Docker logged following error trace:

2023-12-27 11:57:37 231227/035737.214, (1703649451369:c2a5be332e4b:19:lqn8uha2:10039) [request,server,error] data: TypeError: Cannot read properties of undefined (reading 'getUploadCoverageCmd')
2023-12-27 11:57:37     at CoverageBookend.getTeardownCommand (/usr/src/app/node_modules/screwdriver-coverage-bookend/index.js:56:36)
2023-12-27 11:57:37     at /usr/src/app/node_modules/screwdriver-build-bookend/index.js:234:23
2023-12-27 11:57:37     at Array.map (<anonymous>)
2023-12-27 11:57:37     at Bookend.getTeardownCommands (/usr/src/app/node_modules/screwdriver-build-bookend/index.js:233:35)
2023-12-27 11:57:37     at /usr/src/app/node_modules/screwdriver-models/lib/buildFactory.js:259:38
2023-12-27 11:57:37     at async Promise.all (index 0)
2023-12-27 11:57:37     at async handler (/usr/src/app/node_modules/screwdriver-api/plugins/events/create.js:228:27)
2023-12-27 11:57:37     at async exports.Manager.execute (/usr/src/app/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
2023-12-27 11:57:37     at async internals.handler (/usr/src/app/node_modules/@hapi/hapi/lib/handler.js:46:20)
2023-12-27 11:57:37     at async exports.execute (/usr/src/app/node_modules/@hapi/hapi/lib/handler.js:31:20)
2023-12-27 11:57:37     at async Request._lifecycle (/usr/src/app/node_modules/@hapi/hapi/lib/request.js:370:32)
2023-12-27 11:57:37     at async Request._execute (/usr/src/app/node_modules/@hapi/hapi/lib/request.js:280:9)

What you expected to happen:

I should not see the error above

How to reproduce it:

  1. Fork screwdriver example app
  2. Spin up a Docker Compose instance (by the way I opened a bug fix PR in order for it to work)
  3. Create a pipeline using the example app
  4. Hit "Start" in the screenshot

QubitPi avatar Dec 26 '23 09:12 QubitPi

Answering by myself after looking at source code:

I'm guessing this PR breaks the thing. Thanks to this hint, I modified the Docker Compose by overriding its config file to turn the coverage off and the error disappears (although an next issue pops up)

QubitPi avatar Dec 27 '23 08:12 QubitPi