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

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

Open
RamyaRaghuveera opened this issue Sep 22, 2020 · 1 comment

Comments

@RamyaRaghuveera
Copy link
Member

RamyaRaghuveera commented Sep 22, 2020

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 .

@RamyaRaghuveera
Copy link
Member Author

PR corresponding to the issue:
#11

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

No branches or pull requests

1 participant