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

Actions generated by wskdebug don't get removed upon undeploy #19

Closed
meryllblanchet opened this issue Aug 28, 2019 · 3 comments
Closed

Comments

@meryllblanchet
Copy link

meryllblanchet commented Aug 28, 2019

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:

Screenshot 2019-08-27 at 18 44 28

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

@moritzraho
Copy link
Member

The error log indicates following flow

  1. wskdebug creates new actions (backup, agent,..) in same package
  2. undeploy only deletes actions which are referenced in the manifest
  3. undeploy deletes package
  4. error is raised because package can only be deleted when non empty but wskdebug actions are still present

@moritzraho
Copy link
Member

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

@moritzraho
Copy link
Member

has been fixed in #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants