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(s3): InventoryConfiguration[].Id exceeds maximum size allowed by the PutBucketInventoryConfiguration API #27794

Merged
merged 12 commits into from
Nov 9, 2023

Conversation

bweigel
Copy link
Contributor

@bweigel bweigel commented Nov 1, 2023

Truncate the inventory-id to 64 characters, such that it conforms to the S3 PutBucketInventoryConfiguration API.
Also remove non-allowed characters.

Closes #27793.


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

…e allowed by the PutBucketInventoryConfiguration API
@aws-cdk-automation aws-cdk-automation requested a review from a team November 1, 2023 13:20
@github-actions github-actions bot added valued-contributor [Pilot] contributed between 6-12 PRs to the CDK bug This issue is a bug. p2 labels Nov 1, 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.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@bweigel
Copy link
Contributor Author

bweigel commented Nov 1, 2023

Exemption Request: I don't think integration test changes are needed here, but happy to add them if needed.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Nov 1, 2023
@bweigel
Copy link
Contributor Author

bweigel commented Nov 1, 2023

Exemption Request: I don't think integration test changes are needed here, but happy to add them if needed.

@bweigel bweigel marked this pull request as ready for review November 1, 2023 22:37
@msambol
Copy link
Contributor

msambol commented Nov 2, 2023

LGTM.

Copy link
Contributor

@scanlonp scanlonp left a comment

Choose a reason for hiding this comment

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

Good change, a couple small comments.

I also think we need an integ test. It can be simple, but will serve to both confirm the id is well formed as well as preventing future changes from breaking this again.

packages/aws-cdk-lib/aws-s3/lib/bucket.ts Outdated Show resolved Hide resolved
@aws-cdk-automation aws-cdk-automation dismissed their stale review November 3, 2023 08:42

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

@bweigel bweigel requested a review from scanlonp November 3, 2023 09:11
@scanlonp scanlonp removed the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Nov 8, 2023
@bweigel
Copy link
Contributor Author

bweigel commented Nov 9, 2023

@scanlonp just a heads up, I won't be able to work on the PR until December starting Sunday.

Copy link
Contributor

@scanlonp scanlonp left a comment

Choose a reason for hiding this comment

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

This looks very good! Last small ask is to return the value in the error message.

packages/aws-cdk-lib/aws-s3/lib/bucket.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-s3/test/bucket.test.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-s3/test/bucket.test.ts Outdated Show resolved Hide resolved
@mergify mergify bot dismissed scanlonp’s stale review November 9, 2023 18:49

Pull request has been modified.

scanlonp
scanlonp previously approved these changes Nov 9, 2023
Copy link
Contributor

@scanlonp scanlonp left a comment

Choose a reason for hiding this comment

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

Good to go if the build passes!

Copy link
Contributor

mergify bot commented Nov 9, 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).

@mergify mergify bot dismissed scanlonp’s stale review November 9, 2023 19:48

Pull request has been modified.

@scanlonp scanlonp changed the title fix(s3): InventoryConfiguration[].Id is truncated to meet maximum size allowed by the PutBucketInventoryConfiguration API fix(s3): InventoryConfiguration[].Id exceeds maximum size allowed by the PutBucketInventoryConfiguration API Nov 9, 2023
@github-actions github-actions bot added the effort/small Small work item – less than a day of effort label Nov 9, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

mergify bot commented Nov 9, 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).

@mergify mergify bot merged commit 1fa399e into aws:main Nov 9, 2023
15 checks passed
mikewrighton pushed a commit that referenced this pull request Nov 13, 2023
…the PutBucketInventoryConfiguration API (#27794)

Truncate the inventory-id to 64 characters, such that it conforms to the  S3 PutBucketInventoryConfiguration API.
Also remove non-allowed characters.

Closes #27793.

----

*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
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
4 participants