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(trigger): Allow trigger to work with Lambda functions with long timeouts #23788

Closed

Conversation

DerkSchooltink
Copy link
Contributor

Reopened PR from #23650

And re-revert from #23062 (v2.61.1)

Implements #23058 and fixes #23407


All Submissions:

Adding new Construct Runtime Dependencies:

  • This PR adds new construct runtime dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use 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

@gitpod-io
Copy link

gitpod-io bot commented Jan 23, 2023

@aws-cdk-automation aws-cdk-automation requested a review from a team January 23, 2023 09:40
@github-actions github-actions bot added valued-contributor [Pilot] contributed between 6-12 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p0 labels Jan 23, 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.

@DerkSchooltink DerkSchooltink changed the title Allow trigger to work with Lambda functions with long timeouts feat(trigger): Allow trigger to work with Lambda functions with long timeouts Jan 23, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review January 23, 2023 09:45

✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a 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', {
Copy link
Contributor

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', {
Copy link
Contributor

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.

@comcalvi comcalvi added p2 and removed p0 labels Feb 9, 2023
@aws-cdk-automation
Copy link
Collaborator

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.

@aws-cdk-automation
Copy link
Collaborator

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.

@aws-cdk-automation aws-cdk-automation added the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Feb 23, 2023
mergify bot pushed a commit that referenced this pull request Apr 5, 2023
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort p2 valued-contributor [Pilot] contributed between 6-12 PRs to the CDK
Projects
None yet
5 participants