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(lambda-event-sources): S3EventSource requires Bucket instead of IBucket #25368

Closed
wants to merge 5 commits into from

Conversation

Styerp
Copy link
Contributor

@Styerp Styerp commented Apr 28, 2023

Closes #23940
Closes #4323

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 Apr 28, 2023

@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK labels Apr 28, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team April 28, 2023 22:57
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.

@Styerp
Copy link
Contributor Author

Styerp commented Apr 28, 2023

Exemption Request

I don't think this needs a readme update, since this makes it work how folks expect, but I can modify one if there's a reasonable spot.

Caveats called out in other threads are already covered by other validations and readmes.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Apr 28, 2023
@corrjo
Copy link

corrjo commented May 16, 2023

Would love to see this merged and get rid of my forced casting to s3.Bucket 🙃

@TheRealAmazonKendra
Copy link
Contributor

We cannot accept changes without a passing build. It looks like the snapshots have been incorrectly generated to be .ts instead of .js. Please delete them and rerun the tests without the typescript language flag.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 19, 2023
@Styerp
Copy link
Contributor Author

Styerp commented May 19, 2023

No clue how I generated snapshots as TS instead of JS... Thanks for the call out, Kendra. That part's cleared up.

I think I need additional guidance on the "breaking" API change that's now failing the build:

API elements with incompatible changes:
err - PROP aws-cdk-lib.aws_lambda_event_sources.S3EventSource.bucket: type aws-cdk-lib.aws_s3.IBucket (formerly aws-cdk-lib.aws_s3.Bucket): aws-cdk-lib.aws_s3.IBucket does not extend aws-cdk-lib.aws_s3.Bucket [changed-type:aws-cdk-lib.aws_lambda_event_sources.S3EventSource.bucket]
Some packages seem to have undergone breaking API changes. Please avoid.

This "breaking" change is the point -- it's not breaking, it's easing.

@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

AWS CodeBuild CI Report

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

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

@Styerp
Copy link
Contributor Author

Styerp commented May 23, 2023

API surface changes says changes would cause builds to fail -- that will not happen here. Underlying objects didn't access Bucket methods on the object passed into this function, either directly or indirectly. All properties and objects being used were already available on the IBucket, which was the driving rationale to ease this input type.

While this is ostensibly an API Surface Change, it is NOT a breaking surface change.

Behavior changes say "even though the user didn't change their code, the CloudFormation template that gets synthesized is now different." The integration tests prove this is not the case -- the CFN generated is identical.

Build will continue to fail because of the "Breaking API Changes". Guidance on how y'all handle this would be great. Clarification Request

@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label May 23, 2023
@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 May 27, 2023
@aws-cdk-automation
Copy link
Collaborator

The pull request linter fails with the following errors:

❌ Features must contain a change to a README file.

PRs must pass status checks before we can provide a meaningful review.

If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing Exemption Request and/or Clarification Request.

@Styerp
Copy link
Contributor Author

Styerp commented May 30, 2023

Wasn't abandoned, was actively worked on. Didn't have input from the maintaining team. Reopening, if I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 feature-request A feature should be added or improved. p1 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK
Projects
None yet
4 participants