adobe / aio-cli-plugin-app

Create, Build and Deploy Cloud Native Applications
Apache License 2.0
19 stars 35 forks source link

Log most recent error when OpenWhisk readiness times out #783

Closed hparra closed 3 months ago

hparra commented 3 months ago

Description

waitForOpenWhiskReadiness timeout now include most recent error in throw, e.g. FetchError: request to http://localhost:3233/api/v1 failed, reason: connect ECONNREFUSED ::1:3233

Motivation and Context

Subsequent OpenWhisk local runs keep timing out after initial runs were working. I had to debug in this way to understand why.

OT: createFetch cannot access local port suggesting OW is not running, but it is and my browser can access. Definitely some unrelated bug.

How Has This Been Tested?

Error: local openwhisk stack startup timed out after 60000ms due to FetchError: request to http://localhost:3233/api/v1 failed, reason: connect ECONNREFUSED ::1:3233
    at Object.error (/Users/hgpa/hgpa/git/git.corp.adobe.com/wcms/seotech/node_modules/@adobe/aio-cli-plugin-app/node_modules/@oclif/core/lib/errors/index.js:27:15)
    at Run.error (/Users/hgpa/hgpa/git/git.corp.adobe.com/wcms/seotech/node_modules/@adobe/aio-cli-plugin-app/node_modules/@oclif/core/lib/command.js:139:23)
    at Run.catch (/Users/hgpa/hgpa/git/git.corp.adobe.com/wcms/seotech/node_modules/@adobe/aio-cli-plugin-app/src/BaseCommand.js:38:10)
    at async Run._run (/Users/hgpa/hgpa/git/git.corp.adobe.com/wcms/seotech/node_modules/@adobe/aio-cli-plugin-app/node_modules/@oclif/core/lib/command.js:121:13)
    at async Config.runCommand (/Users/hgpa/hgpa/git/git.corp.adobe.com/wcms/seotech/node_modules/@adobe/aio-cli/node_modules/@oclif/core/lib/config/config.js:329:25)
    at async run (/Users/hgpa/hgpa/git/git.corp.adobe.com/wcms/seotech/node_modules/@adobe/aio-cli/node_modules/@oclif/core/lib/main.js:89:16)
    at async AIOCommand.run (/Users/hgpa/hgpa/git/git.corp.adobe.com/wcms/seotech/node_modules/@adobe/aio-cli/src/index.js:30:12)
?2 seotech (MWPW-142722) %  

Types of changes

Checklist:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (a4bf919) to head (cafb167). Report is 1 commits behind head on master.

:exclamation: Current head cafb167 differs from pull request most recent head 097f3d8. Consider uploading reports for the commit 097f3d8 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #783 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 56 56 Lines 3232 3234 +2 Branches 614 614 ========================================= + Hits 3232 3234 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

shazron commented 3 months ago

although the required check did not return any status, the Codecov bot reported in a comment that it is 100% coverage so ✅