Openwhisk sequence actions cannot be deployed
See original GitHub issueOpenwhisk supports so-called sequence
actions, where a sequence only defines a chain of actions. The check recently introduced in https://github.com/serverless/serverless/pull/3729 prevents Openwhisk sequences to be deployed because by definition, a sequence does not have any code, so when packaged individually, the deployment of a sequence fails.
cc: @alexcasalboni and @pmuens, and also @jthomas for serverless-openwhisk
For bug reports:
- What went wrong? Deployment failed.
- What did you expect should have happened? Deployment should have succeeded.
- What was the config you used?
service: test
# We package each function in a separate zip
package:
individually: true
exclude:
- ./**
provider:
name: openwhisk
runtime: nodejs:default
ignore_certs: true
plugins:
- serverless-openwhisk
functions:
action1:
handler: src/action1/index.main
package:
include:
- src/action1/**
action2:
handler: src/action2/index.main
package:
include:
- src/action2/**
actionSequence:
sequence:
- action1
- action2
- What stacktrace or error message from your provider did you see?
Serverless: Packaging service...
Serverless Error ---------------------------------------
No file matches include / exclude patterns
Stack Trace --------------------------------------------
ServerlessError: No file matches include / exclude patterns
at Package.zipDirectory (/usr/local/lib/node_modules/serverless/lib/plugins/package/lib/zipService.js:45:21)
at Package.packageFunction (/usr/local/lib/node_modules/serverless/lib/plugins/package/lib/packageService.js:77:17)
at _.map.functionName (/usr/local/lib/node_modules/serverless/lib/plugins/package/lib/packageService.js:39:21)
at arrayMap (/usr/local/lib/node_modules/serverless/node_modules/lodash/lodash.js:660:23)
at Function.map (/usr/local/lib/node_modules/serverless/node_modules/lodash/lodash.js:9571:14)
at Package.packageService (/usr/local/lib/node_modules/serverless/lib/plugins/package/lib/packageService.js:34:31)
From previous event:
at Object.package:createDeploymentArtifacts [as hook] (/usr/local/lib/node_modules/serverless/lib/plugins/package/package.js:62:10)
at BbPromise.reduce (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:254:55)
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:254:22)
at PluginManager.spawn (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:266:17)
at Deploy.BbPromise.bind.then (/usr/local/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:88:48)
From previous event:
at Object.before:deploy:deploy [as hook] (/usr/local/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:86:8)
at BbPromise.reduce (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:254:55)
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:254:22)
at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:273:17)
at variables.populateService.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:105:33)
at runCallback (timers.js:666:20)
at tryOnImmediate (timers.js:639:5)
at processImmediate [as _immediateCallback] (timers.js:611:5)
From previous event:
at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:92:74)
at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless:30:50)
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
Documentation - Apache OpenWhisk
Whisk Deploy is a utility, named wskdeploy, to help deploy and manage all your OpenWhisk Packages, Actions, Triggers, Rules and APIs from a...
Read more >Advanced debugging of OpenWhisk actions | by rodric rabbah
In this article, I'll describe how to test an Apache OpenWhisk action locally using Docker and a helper Python script. This is an...
Read more >Sequences & Compositions - Adobe Developer
Sometimes you want to orchestrate a series of action calls into a flow. There are two ways to do this: using sequences or...
Read more >Build a serverless app with Node.js and OpenWhisk
With the Serverless framework plugin for OpenWhisk, it's fairly straightforward to deploy and manage web actions, triggers, rules, and sequences ...
Read more >Creating actions from the CLI - IBM Cloud Docs
Compress your app file and deploy it. The --native argument replaces the --docker openwhisk/dockerskeleton argument in the action create command. Example
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello 👋.
Thanks for the investigation on this @cjelger, another user also reported this recently and I have an open ticket to look into this: https://github.com/serverless/serverless-openwhisk/issues/62
I agree with @pmuens that this should be fixed in the provider plugin. I will dig into the provider code soon and work out if this can be fixed without any upstream changes.
Looking at the serverless code and the openwhisk plugin, I don’t think there’s a nice way to fix this without an upstream change.
My solution would be this change, which is close to what @cjelger suggested. https://github.com/serverless/serverless/compare/master...jthomas:master
Functions would now support the following option.
These functions would not trigger the
packageFunction
call or set thepackageService
flag to true.I’ve used the
ignore
flag as I think there might be future scenarios where providers want the ability to stop packaging from the framework. It should be less vendor specific thanseq
.If we support this change, I will modify the openwhisk provider plugin to automatically add this flag to all sequence functions using a pre-process hook.
Without this upstream modification, I will have to try and monkey patch code in the framework or manually remove the functions from memory before the packaging plugin is ran and restate them afterwards. Neither of these feels as sensible as the change outlined above.
@pmuens @alexcasalboni what do you think? I can open the PR if you agree with this.