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 #24435

Merged
merged 7 commits into from Apr 5, 2023

Conversation

DerkSchooltink
Copy link
Contributor

Reopened PR from #23650 and #23788

And re-revert from #23062 (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.

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

@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 Mar 3, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review March 3, 2023 09:48

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

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@DerkSchooltink
Copy link
Contributor Author

I might be wrong, but the build failure doesn't seem to be related to my changes:

FAIL test/resource-pool.test.js
@aws-cdk-testing/cli-integ:   â—� double dispose throws
@aws-cdk-testing/cli-integ:     expect(received).toThrow()
@aws-cdk-testing/cli-integ:     Received function did not throw
@aws-cdk-testing/cli-integ:       33 |
@aws-cdk-testing/cli-integ:       34 |   await lease.dispose();
@aws-cdk-testing/cli-integ:     > 35 |   expect(() => lease.dispose()).toThrow();
@aws-cdk-testing/cli-integ:          |                                 ^
@aws-cdk-testing/cli-integ:       36 | });
@aws-cdk-testing/cli-integ:       37 |
@aws-cdk-testing/cli-integ:       38 | test('somewhat balance', async () => {
@aws-cdk-testing/cli-integ:       at Object.<anonymous> (test/resource-pool.test.ts:35:33)
@aws-cdk-testing/cli-integ:   â—� somewhat balance
@aws-cdk-testing/cli-integ:     Calling dispose() on an already-disposed lease.
@aws-cdk-testing/cli-integ:       93 |       dispose: async () => {
@aws-cdk-testing/cli-integ:       94 |         if (disposed) {
@aws-cdk-testing/cli-integ:     > 95 |           throw new Error('Calling dispose() on an already-disposed lease.');
@aws-cdk-testing/cli-integ:          |                 ^
@aws-cdk-testing/cli-integ:       96 |         }
@aws-cdk-testing/cli-integ:       97 |         disposed = true;
@aws-cdk-testing/cli-integ:       98 |         return this.returnValue(value).finally(() => process.stderr.write(`Lease returned by ${process.pid}: ${value}`));
@aws-cdk-testing/cli-integ:       at Object.dispose (lib/resource-pool.ts:95:17)
@aws-cdk-testing/cli-integ:       at test/resource-pool.test.ts:35:22
@aws-cdk-testing/cli-integ:       at Object.<anonymous> (../../../node_modules/expect/build/toThrowMatchers.js:83:11)
@aws-cdk-testing/cli-integ:       at Object.toThrow (../../../node_modules/expect/build/index.js:382:21)
@aws-cdk-testing/cli-integ:       at Object.<anonymous> (test/resource-pool.test.ts:35:33)

@TheRealAmazonKendra TheRealAmazonKendra added p2 and removed p0 labels Mar 8, 2023
@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

2 similar comments
@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@mergify
Copy link
Contributor

mergify bot commented Apr 5, 2023

Thank you for contributing! Your pull request will be updated from main 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
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: bb2ec70
  • 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 30e05f0 into aws:main Apr 5, 2023
6 checks passed
@mergify
Copy link
Contributor

mergify bot commented Apr 5, 2023

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

@DerkSchooltink DerkSchooltink deleted the feature/notriggertimeoutv2 branch April 5, 2023 13:24
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. 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