New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated aws provider to invoke .promise on methods that support it. Otherwise falls back to .send with a callback #5161

Merged
merged 2 commits into from Jan 24, 2019

Conversation

Projects
4 participants
@exocom
Copy link

exocom commented Jul 25, 2018

What did you implement:

The ability on awsProvider to request methods that only have .promise.
Closes #5160

How did you implement it:

With a simple if check for .promise method and use it. Otherwise use default by using .send with a callback

How can we verify it:

Added a test. Also you can call any method on AWS sdk that has .promise
this.provider = this.serverless.getProvider(this.serverless.service.provider.name)
this.provider.request('APIGateway', 'getRestApis', {})

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

Kalarrs Topham
Updated aws provider to invoke .promise on methods that support it. O…
…therwise falls back to .send with a callback.

@pmuens pmuens self-assigned this Jan 23, 2019

@pmuens pmuens added this to In progress in Serverless via automation Jan 23, 2019

@pmuens
Copy link
Member

pmuens left a comment

Nice addition! Thanks for working on this @exocom 👍

This should be GTM after we've resolved the conflicts :shipit:

Serverless automation moved this from In progress to Reviewer approved Jan 24, 2019

@pmuens

pmuens approved these changes Jan 24, 2019

Copy link
Member

pmuens left a comment

Thanks again for taking the time to work on this @exocom 👍

I just jumped in and resolved the conflicts. After that I gave it a spin and it works fine! GTM :shipit:

Will merge it after CI gives the green light!

@pmuens pmuens merged commit dfb36b8 into serverless:master Jan 24, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 93.019%
Details

Serverless automation moved this from Reviewer approved to Done Jan 24, 2019

@pmuens pmuens added this to the 1.36.4 milestone Feb 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment