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 Layers): Support references to external layers #9826

Merged
merged 1 commit into from Aug 11, 2021

Conversation

pgrzesik
Copy link
Contributor

Closes: #9797

This fix will not error out if layer referenced by Ref will not be found locally, but rather allow such behavior and let the deployment fail is the layer really cannot be referenced.

@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #9826 (59632b3) into master (d53c80d) will increase coverage by 0.00%.
The diff coverage is 75.00%.

❗ Current head 59632b3 differs from pull request most recent head ca0656f. Consider uploading reports for the commit ca0656f to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9826   +/-   ##
=======================================
  Coverage   86.14%   86.14%           
=======================================
  Files         329      329           
  Lines       12808    12803    -5     
=======================================
- Hits        11033    11029    -4     
+ Misses       1775     1774    -1     
Impacted Files Coverage Δ
commitlint.config.js 0.00% <ø> (ø)
lib/plugins/aws/package/compile/functions.js 94.33% <66.66%> (-0.30%) ⬇️
...ins/aws/package/compile/events/apiGateway/index.js 93.44% <100.00%> (+2.26%) ⬆️

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 d53c80d...ca0656f. Read the comment docs.

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

@pgrzesik looks good. I have just one suggestion

'LAMBDA_LAYER_REFERENCE_NOT_FOUND'
);
if (process.env.SLS_DEBUG) {
serverless.cli.log(
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to rely on @serverless/utils/log

We're rather on the path on removing dependency on serverless instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

of course, great suggestion 👍

@pgrzesik pgrzesik force-pushed the support-references-to-external-layers branch from b0c53c2 to ca0656f Compare August 11, 2021 12:42
@pgrzesik pgrzesik requested a review from medikoo August 11, 2021 12:59
Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

Looks great 👍

@pgrzesik pgrzesik merged commit dc74f41 into master Aug 11, 2021
@pgrzesik pgrzesik deleted the support-references-to-external-layers branch August 11, 2021 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants