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

feat: implement CdkHandler for runtime version enforcement of Lambda handlers #27999

Closed
wants to merge 84 commits into from

Conversation

colifran
Copy link
Contributor

@colifran colifran commented Nov 15, 2023

This PR precedes a future PR that will introduce code generation for CdkFunction, CdkSingletonFunction, and CdkCustomResourceProvider. This PR introduces a new construct, CdkHandler, designed to enforce limited usage of runtime versions for Lambda handlers vended in core aws-cdk packages via the RuntimeDeterminer utility class.

Note that the changes to CustomResourceProvider will allow the future code generation PR to code generate CdkCustomResourceProvider by extending the new CustomResourceProviderBase class.

As expected, there were no changes to any integ tests. To verify that the changes made to CustomResourceProvider are not breaking, I force ran integ.triggers.ts which uses the Trigger class. The Trigger class uses CustomResourceProvider as its mechanism for creating a custom resource. This test ran successfully.


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

Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
…eprecated runtime

Signed-off-by: Francis <colifran@amazon.com>
@aws-cdk-automation aws-cdk-automation requested a review from a team November 15, 2023 00:27
@github-actions github-actions bot added the p2 label Nov 15, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 15, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

colifran and others added 23 commits November 14, 2023 17:48
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
@colifran colifran marked this pull request as draft November 30, 2023 17:10
@colifran colifran marked this pull request as ready for review November 30, 2023 17:38
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Nov 30, 2023
@colifran colifran added pr/do-not-merge This PR should not be merged at this time. and removed pr/do-not-merge This PR should not be merged at this time. labels Nov 30, 2023
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
@colifran colifran removed the pr/do-not-merge This PR should not be merged at this time. label Nov 30, 2023
colifran and others added 4 commits December 4, 2023 12:10
@colifran colifran changed the title feat: implement cdk vended handler framework feat: implement CdkHandler for runtime version enforcement Dec 4, 2023
@github-actions github-actions bot added p1 and removed p2 labels Dec 4, 2023
@colifran colifran changed the title feat: implement CdkHandler for runtime version enforcement feat: implement CdkHandler for runtime version enforcement of Lambda handlers Dec 4, 2023
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
@colifran colifran added pr/do-not-merge This PR should not be merged at this time. and removed pr/do-not-merge This PR should not be merged at this time. labels Dec 4, 2023
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: d7a23d1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

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. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1 pr/do-not-merge This PR should not be merged at this time. pr/needs-maintainer-review This PR needs a review from a Core Team Member pr-linter/exempt-integ-test The PR linter will not require integ test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants