Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Support reading package name from WSK_PACKAGE env var #49

Closed
alexkli opened this issue Feb 12, 2020 · 1 comment
Closed

Support reading package name from WSK_PACKAGE env var #49

alexkli opened this issue Feb 12, 2020 · 1 comment
Labels
enhancement New feature or request moved-to-openwhisk

Comments

@alexkli
Copy link
Contributor

alexkli commented Feb 12, 2020

Motivation

Some Openwhisk applications deploy their actions in a package that is defined at deployment time and includes a version number etc. OTOH, when using a VS Code launch config one cannot easily use environment variables for the action name, so something like wskdebug $WSK_PACKAGE/myaction does NOT work. It is impractical if each developer, working against a different package, has to modify the VS code launch.json which is usually version controlled.

Solution

Users would configure wskdebug myaction in their launch.json config. Upon start, wskdebug would:

  • if WSK_PACKAGE env var is set: use $WSK_PACKAGE/myaction as fully qualified action name
  • if WSK_PACKAGE is not set: use myaction

In case the cli argument already contains a package as part of the action name (package/myaction), the cli arg would be used and the env var ignored. This would follow standard cli behavior patterns.

Notes

Sometimes the action name might also get dynamically generated. So maybe we should also support WSK_ACTION as well? What to specify on the cli then?

@alexkli
Copy link
Contributor Author

alexkli commented Mar 4, 2020

Moved to apache/openwhisk-wskdebug#10

@alexkli alexkli closed this as completed Mar 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request moved-to-openwhisk
Projects
None yet
Development

No branches or pull requests

1 participant