Open giusdp opened 1 year ago
Can you explain to me how the environment variables are passed to the action initialization route in the action-proxy?
I thought the OpenWhisk-CLI simply sends requests to the OpenWhisk API? And as far as I can tell, the OpenWhisk API does not directly support passing environment variables to actions on initialization. Unless there is an undocumented annotation for it?
Following the PR that adds the Env field to the action struct in client-go https://github.com/apache/openwhisk-client-go/pull/158, this PR adds the
--env
and--env-file
flag to wsk action create/update.It follows closely the code for the --params and --annotation flags to add support for passing environment variables during action initialization.
I tried to extend some tests in Go but let me know where I should add more.
I've also updated the client-go dep to the latest commit and run
go mod tidy
which removed many deps.