Skip to content

chore: add integration test to test a construct with a builtin lambda#17571

Merged
mergify[bot] merged 2 commits intoaws:masterfrom
corymhall:corymhall/integ-cr
Dec 10, 2021
Merged

chore: add integration test to test a construct with a builtin lambda#17571
mergify[bot] merged 2 commits intoaws:masterfrom
corymhall:corymhall/integ-cr

Conversation

@corymhall
Copy link
Copy Markdown
Contributor

This adds a new integration test that deploys an s3.Bucket with
autoDeleteObjects set to true. The autoDeleteObjects feature deploys a
Nodejs Lambda backed Custom Resource.

Lambda backed custom resources that are included as part of CDK
constructs are compiled and bundled as part of the construct library.
There are scenarios where this compiled source code (e.g.
entrypoint.js) could be modified by the build process and cause the
lambda execution to fail.

This integration test should catch those instances. If the lambda
function throws errors during execution the CustomResource will
eventually fail. In the integration test this will result in a test
timeout and failure.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

This adds a new integration test that deploys an s3.Bucket with
autoDeleteObjects set to true. The autoDeleteObjects feature deploys a
Nodejs Lambda backed Custom Resource.

Lambda backed custom resources that are included as part of CDK
constructs are compiled and bundled as part of the construct library.
There are scenarios where this compiled source code (e.g.
__entrypoint__.js) could be modified by the build process and cause the
lambda execution to fail.

This integration test should catch those instances. If the lambda
function throws errors during execution the CustomResource will
eventually fail. In the integration test this will result in a test
timeout and failure.
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Nov 18, 2021

@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Nov 18, 2021
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 18, 2021
@corymhall corymhall requested a review from a team November 23, 2021 13:17
@nija-at nija-at added package/tools Related to AWS CDK Tools or CLI and removed @aws-cdk/aws-lambda Related to AWS Lambda labels Nov 30, 2021
@nija-at nija-at assigned corymhall and unassigned nija-at Nov 30, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 10, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 798f9ea
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 90eadcb into aws:master Dec 10, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 10, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
…aws#17571)

This adds a new integration test that deploys an s3.Bucket with
autoDeleteObjects set to true. The autoDeleteObjects feature deploys a
Nodejs Lambda backed Custom Resource.

Lambda backed custom resources that are included as part of CDK
constructs are compiled and bundled as part of the construct library.
There are scenarios where this compiled source code (e.g.
__entrypoint__.js) could be modified by the build process and cause the
lambda execution to fail.

This integration test should catch those instances. If the lambda
function throws errors during execution the CustomResource will
eventually fail. In the integration test this will result in a test
timeout and failure.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. package/tools Related to AWS CDK Tools or CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants