DataDog / datadog-cloudformation-macro

CloudFormation Macros by Datadog
Apache License 2.0
14 stars 22 forks source link

Support for Datadog Lambda Extension #31

Closed zARODz11z closed 3 years ago

zARODz11z commented 3 years ago

What does this PR do?

This PR adds support for the Datadog Lambda Extension via the CloudFormation Macro.

Motivation

The team is making progress towards releasing the Datadog Lambda Extension for GA therefore we are putting in effort now to our existing integrations to add support for the Lambda Extension.

Testing Guidelines

I manually deployed the CloudFormation stack to sandbox and used it in a sample SAM and CDK deployment. The Datadog Extension was added as a layer and did not break any of the existing layer adding logic.

I added a few local tests for the code changes I added.

Additional Notes

Types of changes

Check all that apply

codecov-commenter commented 3 years ago

Codecov Report

Merging #31 (72d262c) into master (df1a5a1) will decrease coverage by 0.01%. The diff coverage is 89.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
- Coverage   90.24%   90.22%   -0.02%     
==========================================
  Files           7        7              
  Lines         410      440      +30     
  Branches       87       95       +8     
==========================================
+ Hits          370      397      +27     
- Misses         21       22       +1     
- Partials       19       21       +2     
Impacted Files Coverage Δ
serverless/src/index.ts 90.00% <60.00%> (-2.54%) :arrow_down:
serverless/src/env.ts 92.15% <91.66%> (-0.16%) :arrow_down:
serverless/src/layer.ts 98.61% <95.45%> (+0.36%) :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 df1a5a1...72d262c. Read the comment docs.

zARODz11z commented 3 years ago

I feel like I am getting better at making close to true unit tests, ie. testing just one unit. Previously my tests would go through so many unnecessary code paths that had nothing to do with my tests.