apache / openwhisk-client-js

JavaScript client library for the Apache OpenWhisk platform
https://openwhisk.apache.org/
Apache License 2.0
83 stars 53 forks source link

Handle a blocking/result response that is demoted to async. #199

Closed rabbah closed 4 years ago

rabbah commented 4 years ago

A blocking invoke that takes too long to complete may be demoted by the backend to an async invoke with the result being { activationId } only. To preserve the behavior of the function, this patch will complete the promise with a reject should that happen.

Closes #198.

codecov-io commented 4 years ago

Codecov Report

Merging #199 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
+ Coverage   99.27%   99.28%   +0.01%     
==========================================
  Files          14       14              
  Lines         411      417       +6     
==========================================
+ Hits          408      414       +6     
  Misses          3        3
Impacted Files Coverage Δ
lib/actions.js 100% <100%> (ø) :arrow_up:
lib/client.js 98.88% <0%> (+0.03%) :arrow_up:

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 88ce0e2...47d35f6. Read the comment docs.

rabbah commented 4 years ago

Thanks for the reviews @upgle @purplecabbage @dgrove-oss.