apache / apache/openwhisk-wskdebug
store backup of action as local file instead
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Storing it as another action `_wskdebug_original` has problems:
- takes time to create (albeit it's done async now)
- must be removed at the end (currently not done by default to make shutdown faster, but now it's left behind if the user does not care)
- security issue: if it's a web action the duplicate might open up an unexpected HTTP end point
Storing it in a local file (e.g. `.wskdebug/..code`) could be a much faster and lenient solution. In case it has to be restored, the next run can fix it. If restore after shutdown was successful, the local file can be removed.
Alternatively the local file is kept and the version is compared, so that if it hasn't changed (aka original re-deployed), a 2nd wskdebug run can skip the cost-intensive download of the original on startup.
Challenges:
- if `wskdebug` re-run (after failure) happens in a different folder, it can't be found
- if a hit condition is set (`-c`), and it does not match, the agent will invoke the original copy `*_wskdebug_original`
- what if it cannot write to the current folder or if there is a conflict
- does not help for the activation db agent helper actions `*_wskdebug_invoked` and `*_wskdebug_completed`
Contributor guide
Assessment
This issue has not been assessed yet.