Skip to content
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

Support reading package name from WSK_PACKAGE env var #10

Closed
alexkli opened this issue Mar 4, 2020 · 1 comment · Fixed by #37
Closed

Support reading package name from WSK_PACKAGE env var #10

alexkli opened this issue Mar 4, 2020 · 1 comment · Fixed by #37
Labels
enhancement New feature or request
Milestone

Comments

@alexkli
Copy link
Contributor

alexkli commented Mar 4, 2020

Moved from adobe/wskdebug#49

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 inside a VS code launch.json args. 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?

Also update the README with updated vscode instructions:

  • envFile for new WSK_PACKAGE
  • envFile for WSK_CONFIG_FILE
@alexkli
Copy link
Contributor Author

alexkli commented Apr 10, 2020

In #37 I added support for WSK_PACKAGE as described above. I did not add WSK_ACTION as that's a speculative feature right now.

@alexkli alexkli added this to the 1.3 milestone Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant