-
Notifications
You must be signed in to change notification settings - Fork 44
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
Unable to create request URL, because OpenWhisk API host is missing #43
Comments
As an experiment, I tried changing:
(where the to what's in the README:
and I'm getting this error:
How do those configuration instructions translate to running on IBM Cloud? I don't believe there is any direct access to |
Hum that's weird we refer to whisk.properties directly from the go code |
You point out IBM cloud not working, does that mean that it works when you deploy your own OpenWhisk from open source ? |
I haven't tried that |
When is nil what are the values use for authkey and apihost? |
I see a getDefaultConfig when nil is that suppose to load the settings from __OW... ? |
Digging into this a bit more, I think I found a problem with the way my code is constructing the |
Maybe that could fue recent change and README was not updated to reflect changes |
Yeah I think the README should be updated to mention that the I just verified that setting the whisk.Config.Host field fixes it on IBM Cloud I think from a user perspective the when using this library on IBM Cloud, the ideal usage would be:
and |
@tleyden yeah I think that would be good addition. |
@tleyden Reading the information of credentials from whisk.properties is deprecated now, but still supported. We currently supports to read the credentials from $HOME/.wskprops.
Users do not need to care BaseURL any more. Instead, APIHOST is an easier configuration. Reading credentials from environmental variables are not 100% guaranteed. The best way to to configure the $HOME/.wskprops. |
To add: I ran into this problem a few weeks ago, but only when building from the cli specific repos. However, the cli/go client code within incubator-openwhisk did not have this problem. Maybe you should investigate there @tleyden , the code may be out of sync. |
@houshengbo Thanks for the list of mandatory and optional fields. I think the library would be a bit easier to use if that was documented in the exported Config struct.
I'm invoking this code from within an OpenWhisk action, which is running on IBM Cloud (though according to @csantanapr, the same would be true on any OpenWhisk installation). So reading from |
@drcariel the CLI is running in a different context, and it can just expect to be able to check local files like Btw, I'm using an action to monitor walk the list of recent activations to look for failures, and then send alerts if there are any. |
When I build against version of ad5aa34 and run on IBM Cloud, this code is getting an error:
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 (b3d194d), 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 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 #23The text was updated successfully, but these errors were encountered: