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(trigger): Allow trigger to work with Lambda functions with long timeouts #23788
feat(trigger): Allow trigger to work with Lambda functions with long timeouts #23788
Conversation
There was a problem hiding this 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.
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution. Please see my comments inline.
@@ -25,8 +40,8 @@ new triggers.TriggerFunction(stack, 'MySecondFunction', { | |||
code: lambda.Code.fromInline('exports.handler = function() { console.log("hello"); };'), | |||
}); | |||
|
|||
new integ.IntegTest(app, 'TriggerTest', { | |||
testCases: [stack], | |||
new triggers.Trigger(stack, 'MyDefaultPropTrigger', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests should always use the IntegTest
construct.
|
||
const app = new App(); | ||
const stack = new Stack(app, 'MyStack'); | ||
|
||
const topic1 = new sns.Topic(stack, 'Topic1'); | ||
const topic2 = new sns.Topic(stack, 'Topic2'); | ||
|
||
const trigger = new triggers.TriggerFunction(stack, 'MyFunction', { | ||
runtime: lambda.Runtime.NODEJS_14_X, | ||
const triggerFunction = new triggers.TriggerFunction(stack, 'MyTriggerFunction', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see a new test rather than an edit to a current test for this test case. We should also have some sort of assert added to ensure that the lambda function successfully triggers. This is above our typical ask but since the original change triggered a p0, we'll need to be a little extra verifying the functionality here.
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
…timeouts (#24435) Reopened PR from #23650 and #23788 And re-revert from #23062 ([v2.61.1](https://github.com/aws/aws-cdk/releases/tag/v2.61.1)) Implements #23058 and fixes #23407 Worked on comments from @TheRealAmazonKendra as well. Added an integration test scenario where a Lambda function will be triggered by a Trigger construct, send a message to an SQS queue, which will be consumed by the integration test assertion.
Reopened PR from #23650
And re-revert from #23062 (v2.61.1)
Implements #23058 and fixes #23407
All Submissions:
Adding new Construct Runtime Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license