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

fix(lambda-event-sources): update s3-event-source to accept IBucket #28943

Merged
merged 12 commits into from Feb 8, 2024

Conversation

roger-zhangg
Copy link
Member

Issue # (if applicable)

Closes #4323

Reason for this change

S3EventSource should accept IBucket instead of Bucket.
aws_s3.Bucket.from_bucket_name(...) or aws_s3.Bucket.from_bucket_arn(...), etc. returns aws_s3.IBucket type

Description of changes

Based on @otaviomacedo 's comment in #25782 , a new class S3EventSourceV2 is implementd to accept IBucket instead of Bucket. And avoids breaking changes.

Description of how you validated changes

  • unit test
  • integration test

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team January 31, 2024 19:42
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 labels Jan 31, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 31, 2024
GavinZZ
GavinZZ previously requested changes Feb 6, 2024
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Can we add a README that documents this V2 class please?

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 6, 2024
@mergify mergify bot dismissed GavinZZ’s stale review February 6, 2024 18:55

Pull request has been modified.

@roger-zhangg
Copy link
Member Author

roger-zhangg commented Feb 6, 2024

Hey @GavinZZ Thanks for the comment, I've added readme. However, when I'm trying to run yarn rosetta:extract --strict as the document suggested. I got JS heap out of memory even if I used --max-old-space-size=40000. Do you have any other way to make it work?

Update: Codebuild has run it successfully

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 6, 2024
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Thanks! One minor comment and I'm good to approve.

Copy link
Contributor

@GavinZZ GavinZZ 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 contributing!

Copy link
Contributor

mergify bot commented Feb 8, 2024

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 aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 8, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 8687056
  • 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 431df3b into aws:main Feb 8, 2024
12 checks passed
Copy link
Contributor

mergify bot commented Feb 8, 2024

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).

TheRealAmazonKendra pushed a commit that referenced this pull request Feb 9, 2024
…28943)

### Issue # (if applicable)

Closes #4323 

### Reason for this change

S3EventSource should accept `IBucket` instead of `Bucket`.
`aws_s3.Bucket.from_bucket_name(...)` or `aws_s3.Bucket.from_bucket_arn(...)`, etc. returns aws_s3.IBucket type

### Description of changes

Based on @otaviomacedo 's comment in #25782 , a new class `S3EventSourceV2` is implementd to accept `IBucket` instead of `Bucket`. And avoids breaking changes.

### Description of how you validated changes

- unit test
- integration test

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*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
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(aws-lambda-event-sources): S3EventSource should take IBucket instead of Bucket
3 participants