apache / apache/openwhisk-client-go
Unable to create request URL, because OpenWhisk API host is missing
- Dominant language
- Go
- Stars
- 37
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
When I build against version of https://github.com/apache/incubator-openwhisk-client-go/commit/ad5aa3402b033edd8b30aec7f33434a253aa35ed and run on IBM Cloud, [this code](https://github.com/tleyden/keynuker/blob/110c0a672b75a4ccf5331bc08f2fc3fe354ac1c1/openwhisk_status.go#L111) is getting an error:
```
Unable to create request URL, because OpenWhisk API host is missing"
```
even though `__OW_API_HOST` and `__OW_API_KEY` are set to correct values in the environment (which is expected since it's running on IBM Cloud)
This same code was working fine against an older commit (https://github.com/apache/incubator-openwhisk-client-go/commit/b3d194d8b937a801ee11efcf7f2544d9cea1f58e), so I think something changed in this library.
What updates do I need to make in my code to make this work?
Currently my code is [directly loading the environment variables](https://github.com/tleyden/keynuker/blob/110c0a672b75a4ccf5331bc08f2fc3fe354ac1c1/openwhisk_status.go#L246-L268) and passing that to the `whisk.NewClient()` call. Is that still the right way to do things? I believe I did that as a workaround to https://github.com/apache/incubator-openwhisk-client-go/issues/23
Contributor guide
Research direction
Start with the NewClient call and environment-variable loading in openwhisk_status.go, especially the referenced lines 111 and 246-268. Compare the behavior at the two linked library commits and inspect how the OpenWhisk API host is obtained. Done means the IBM Cloud request URL is created successfully with __OW_API_HOST and __OW_API_KEY.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100