Skip to content

Tekton Pipeline fails at build stage for the new toolkit version and new igc version on a vpc cluster #10

@RamyaRaghuveera

Description

@RamyaRaghuveera

Describe the bug
Tekton Pipeline fails at build stage for the new toolkit version and new igc version on a vpc cluster with the following error:
src/server.ts(81,48): error TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type '(err: any) => void' is not assignable to parameter of type '() => void'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! template-node-typescript@1.0.0 build: tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the template-node-typescript@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /opt/app-root/src/.npm/_logs/2020-09-16T11_28_04_439Z-debug.log

This error is caused as app.listen fails. As app.listen fails, the callback function tries to capture the error. app.listen doesnot return error(https://stackoverflow.com/questions/56291321/how-to-handle-errors-with-express-listen-in-typescript) which results in above error.

To Reproduce
Steps to reproduce the behavior:

  1. Use the template-node-typescript and clone it to your machine.
  2. Install latest version igc
  3. Login to vpc openshift cluster with new toolkit
  4. Run "oc pipeline"
  5. Select Tekton pipeline , master branch, ibm-nodejs and no for pipeline run.
  6. Pipeline will fail at build stage
    Expected behavior
    Pipeline should run successfully end-to-end.
    Screenshots

Node-ts_error

Details:
igc version- 0.5.10-beta.6
Openshift version: 4.4.17_1515

Additional context
Error can be captured by using .on method with app.listen. Fixing the app.listen and adding .on method to capture errors is causing errors in test stage as some of the test cases in server.spec.ts are not getting passed. Can anyone please have a look at my codebase (https://github.com/RamyaRaghuveera/temp-node-ts) and suggest how can we fix the test errors and get the pipeline working end-to-end .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions