adobe / adobe/aio-cli-plugin-app
`waitForOpenWhiskReadiness` should poll the root path, not the api path
- Dominant language
- JavaScript
- Stars
- 28
- Forks
- 41
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 3
Description
See: https://github.com/adobe/aio-cli-plugin-app/blob/36027b9ff67bb6473cd6e26360d8baa42fa66e89/src/lib/app-helper.js#L289
The path being polled is `/api/v1` which could possibly change in the future thus this call is not future-proof. It's possible that if the path is removed, but the server is still running, our poll will think OW is not ready.
The proper path to poll is the `/` root path, which returns JSON metadata:
```
{
"api_paths": [
"/api/v1"
],
"description": "OpenWhisk",
"limits": {
"actions_per_minute": 60,
"concurrent_actions": 30,
"max_action_duration": 300000,
"max_action_logs": 10485760,
"max_action_memory": 536870912,
"min_action_duration": 100,
"min_action_logs": 0,
"min_action_memory": 134217728,
"sequence_length": 50,
"triggers_per_minute": 60
},
"runtimes": {
"nodejs": [
{
"attached": false,
"default": true,
"deprecated": false,
"image": "adobeapiplatform/adobe-action-nodejs-v12:3.0.22",
"kind": "nodejs:12",
"requireMain": false
},
{
"attached": false,
"default": false,
"deprecated": false,
"image": "adobeapiplatform/adobe-action-nodejs-v10:3.0.22",
"kind": "nodejs:10",
"requireMain": false
}
]
},
"support": {
"github": "https://github.com/apache/openwhisk/issues",
"slack": "http://slack.openwhisk.org"
}
}
```
Contributor guide
Research direction
Start in src/lib/app-helper.js at the linked waitForOpenWhiskReadiness implementation around line 289. Check how the readiness URL is constructed and change the polled path from /api/v1 to /. Done means readiness succeeds when the OpenWhisk root endpoint responds, without depending on a versioned API path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100