Skip to content

Make it easier to create/update action sequences.#172

Merged
jthomas merged 2 commits intoapache:masterfrom
jthomas:master
Jun 25, 2019
Merged

Make it easier to create/update action sequences.#172
jthomas merged 2 commits intoapache:masterfrom
jthomas:master

Conversation

@jthomas
Copy link
Member

@jthomas jthomas commented Jun 24, 2019

Adds top-level sequence parameter to actions.create/update method.
Removes need to manually construct action request body.

Fixes #168

Adds top-level `sequence` parameter to actions.create/update method.
Removes need to manually construct action request body.

Fixes apache#168
@jthomas jthomas requested review from chetanmeh and rabbah June 24, 2019 13:55
@codecov-io
Copy link

Codecov Report

Merging #172 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
+ Coverage      99%   99.03%   +0.02%     
==========================================
  Files          14       14              
  Lines         402      414      +12     
==========================================
+ Hits          398      410      +12     
  Misses          4        4
Impacted Files Coverage Δ
lib/messages.js 100% <ø> (ø) ⬆️
lib/actions.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7bc4b98...3266863. Read the comment docs.

Copy link
Member

@rabbah rabbah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm modulo the last paragraph and example in the docs which I didn’t understand.

- `version` - set semantic version of the action. If parameter is empty when create new action openwisk generate 0.0.1 value when update an action increase the patch version.

If you pass in an array for the first parameter, the `create` call will be executed for each array item. The function returns a Promise which resolves with the results when all operations have finished.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t understand this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you pass ow.actions.create([{...}, {...}]) it will provide a mechanism for creating multiple actions without having to do the calls manually. This is the doc copied from the section above: https://github.com/apache/incubator-openwhisk-client-js#create--update-action

@jthomas jthomas merged commit bc196fa into apache:master Jun 25, 2019
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

Successfully merging this pull request may close these issues.

Annotations for sequences require unwieldy workarounds

3 participants