Skip to content
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

fix(AWS API Gateway): Ensure that method depends on permission #9609

Merged
merged 5 commits into from Jun 25, 2021

Conversation

nyamba
Copy link
Contributor

@nyamba nyamba commented Jun 16, 2021

Closes: #9525

Copy link
Contributor

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

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

Thanks a lot @nyamba, it looks good 👍 It would be, however, great to ensure that this functionality is covered by tests. The tests should land here: https://github.com/serverless/serverless/blob/master/test/unit/lib/plugins/aws/package/compile/events/apiGateway/lib/method/index.test.js and should use runServerless

@@ -20,6 +20,9 @@ module.exports = {
});
}

const apiGetwayPermission = this.provider.naming.getLambdaApiGatewayPermissionLogicalId(
Copy link
Contributor

Choose a reason for hiding this comment

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

there's a small typo - apiGetway should be apiGateway

@codecov
Copy link

codecov bot commented Jun 21, 2021

Codecov Report

Merging #9609 (d9b9a25) into master (4bb5b34) will decrease coverage by 0.29%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9609      +/-   ##
==========================================
- Coverage   86.45%   86.16%   -0.30%     
==========================================
  Files         321      321              
  Lines       12141    12161      +20     
==========================================
- Hits        10497    10478      -19     
- Misses       1644     1683      +39     
Impacted Files Coverage Δ
...kage/compile/events/apiGateway/lib/method/index.js 100.00% <100.00%> (ø)
lib/plugins/interactiveCli/index.js 44.44% <0.00%> (-38.89%) ⬇️
...ns/aws/package/lib/mergeCustomProviderResources.js 76.47% <0.00%> (-23.53%) ⬇️
...n/variables/eventually-report-resolution-errors.js 84.21% <0.00%> (-15.79%) ⬇️
lib/cli/commands-schema/resolve-final.js 91.07% <0.00%> (-8.93%) ⬇️
lib/Serverless.js 71.85% <0.00%> (-5.53%) ⬇️
lib/plugins/package/package.js 96.15% <0.00%> (-3.85%) ⬇️
...on/variables/sources/instance-dependent/get-ssm.js 90.90% <0.00%> (-2.28%) ⬇️
...ins/aws/package/compile/events/apiGateway/index.js 94.73% <0.00%> (-1.76%) ⬇️
lib/plugins/aws/package/compile/functions.js 94.63% <0.00%> (-0.32%) ⬇️
... and 8 more

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 4bb5b34...d9b9a25. Read the comment docs.

@nyamba
Copy link
Contributor Author

nyamba commented Jun 21, 2021

Thanks @pgrzesik, pushed the improvements ;-)

Copy link
Contributor

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

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

Thanks @nyamba - looks good overall, I only have small suggestions, please let me know what do you think 🙇

@nyamba
Copy link
Contributor Author

nyamba commented Jun 25, 2021

please check, @pgrzesik

Copy link
Contributor

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

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

Great changes, thank you @nyamba 🙇

@pgrzesik pgrzesik changed the title api gateway method depends on permission fix(AWS API Gateway): Ensure that method depends on permission Jun 25, 2021
@pgrzesik pgrzesik merged commit 93b9027 into serverless:master Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race condition with AWS API Gateway Method & Lambda Permission
2 participants