Tried to use serverless plugin and use an action from exchange.
Action: “GET” from servicenow pack
Encountered several errors with python dependencies using serverless. Here is an example attached:
python dependencies are not built/copied into virtual environments folder during deployment in the serverless package although they are specified in the requirements.txt and the modules exist in the system.
For the “GET” action in servicenow pack, the only dependency listed was “pysnow” which was part of the virtual environments in the package. However, when invoke command is run, it complained: ‘~st2/handler’: No module named six
When six was installed and added to requirements.txt, six module wasn’t copied to the virtual
I had to manually copy the module to the virtual environments, redeploy and invoke.
This time it complained: ‘~st2/handler’: No module named oslo_config
Repeated above steps and next it complained ‘~st2/handler’: No module named enum
And assuming its a repetitive process until all dependencies are satisfied and I stopped at this point and couldn’t successfully invoke the action.
- Where are the dependencies listed for an action with serverless plugin? Does serverless create a wrapper and has more internal dependencies, if so what are they? Cause they only show up during invocation and its hard to figure out
- When an action is cloned from exchange during serverless deployment, should we assume the dependencies are already listed in requirements.txt?
- What are actions to be taken to handle the dependencies? Clearly manual copy is not an option.
Looking for a list and automated procedure that is handled during serverless deployment.