Uh oh!
There was an error while loading. Please reload this page.
Implement project specific undeploy command - #98
Conversation
also update docopts
@almartino thanks for taking the time to work on this! This is pretty much the idea I had in mind when I opened the issue (and executed way better than I would have been able to). I just tested it on the openserverless tutorial and I encountered just a small issue: error: Unable to delete package 'contact': Package not empty (contains 2 entities).
Set force param or delete package contents.The 2 entities are the sequences: Regarding your questions:
I think
I wouldn't bother: the |
added a process.exit inside undeploy. Added missing license header on info.js and syncDeployInfo.js. Added icons on error messages
The solution implements a project-specific undeployment mechanism that:
Implementation Details
1. Improved Structure for Deployment Information
When
ops ide deployis executed, the system now saves information about deployed packages and actions in a file with an improved structure:.ops/deployment.jsonin the project rootpackages: An array of package names that have been deployedpackageActions: An object that maps each package to an array of its actionsExample:
{ "packages": ["foo", "bar", "baz"], "packageActions": { "foo": ["hello", "world"], "bar": ["some_action"], "baz": [] } }Sidenote 1: could be useful to automatically add the
.opsdir to the .gitignore file when creating a project?Sidenote 2: should we make this retro compatible for projects prior to this fix?
2. Project-Specific Undeployment
When
ops ide undeployis executed without arguments:.ops/deployment.json3. Single Action Undeployment
When
ops ide undeploy contact/indexis executed:.ops/deployment.jsonfile to remove the action from the listreferences apache/openserverless#117