Actions generated by wskdebug don't get removed upon undeploy
meryllblanchet opened this issue · 3 comments
Expected Behaviour
When called at the root of a CNA project folder, aio cna undeploy should remove all the actions and package used by this CNA.
Actual Behaviour
If the application is run and debugged remotely (aio cna run + CNA debugging with wskdebug profile), some proxy actions are created within the application package.
These actions are not stored in the manifest.yml and therefore not handled by https://github.com/adobe/adobeio-cna-scripts/blob/master/scripts/undeploy.actions.js
This results in an error like on the screenshot below:
Reproduce Scenario (including but not limited to)
Please look at the steps below:
- CNA creation
- CNA add another action (e.g. 'goodbye')
- CNA remote debugging of the 'hello' action
- CNA deploy
- CNA undeploy
Steps to Reproduce
$ aio cna init helloworld //just use the wizard default values
$ cp _your_dot_env helloworld/
$ cd helloworld
// add a second action in the actions folder and declare it in the manifest.yml
// for example 'goodbye', with a simple index.js implementation
$ aio cna run
// just set a breakpoint in the hello index.js file and launch a debugging session...
// Quit the debugging session and go back to your term
$ aio cna deploy
$ aio cna undeploy
// Error happens, the goodbye_wskdebug_original action is not undeployed
Platform and Version
Sample Code that illustrates the problem
Logs taken while reproducing problem
Please see the screenshot
The error log indicates following flow
- wskdebug creates new actions (backup, agent,..) in same package
- undeploy only deletes actions which are referenced in the manifest
- undeploy deletes package
- error is raised because package can only be deleted when non empty but wskdebug actions are still present
some potential solutions on top of my mind:
- changes in wskdebug to not push additional actions to same package
- changes in run script to clean wskdebug actions after dev server shutdown
has been fixed in #24