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

docs(s3): Bad type definition for objectsKeyPattern parameter #27486

Closed

Conversation

alinasir85
Copy link

Fixed the type of objectsKeyPattern parameter as string

Closes #27481


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 October 10, 2023 21:41
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 labels Oct 10, 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.

@alinasir85 alinasir85 changed the title fix(aws-s3): Bad type definition for objectsKeyPattern parameter fix(s3): Bad type definition for objectsKeyPattern parameter Oct 10, 2023
@alinasir85 alinasir85 changed the title fix(s3): Bad type definition for objectsKeyPattern parameter docs(s3): Bad type definition for objectsKeyPattern parameter Oct 10, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review October 10, 2023 21:50

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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@kaizencc
Copy link
Contributor

We cannot do this because it is a breaking change to a stable module (retyping any as string). Even if we argue that only a string is valid here, it's unlikely but possible that there's some implementation of IBucket out there that uses objectsKeyPattern: any and would be broken by this. Closign this PR because we cannot accept breaking changes here.

While I agree that this is an oversight the ship has sailed and the best we can do is provide better documentation to what types our implementation of Bucket.grantXxx accepts.

Also, this is neither here or there but this is clearly not a "docs" change.

@kaizencc kaizencc closed this Oct 10, 2023
mergify bot pushed a commit that referenced this pull request Nov 29, 2023
Improve docstrings to explain that parameter objectsKeyPattern of type any should take in string inputs.

Unable to directly change the parameter type because of backwards compatibility concerns (mentioned in #27486 we are improving documentation as an alternative solution.

Closes #27481.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
chenjane-dev pushed a commit to chenjane-dev/aws-cdk that referenced this pull request Dec 5, 2023
)

Improve docstrings to explain that parameter objectsKeyPattern of type any should take in string inputs.

Unable to directly change the parameter type because of backwards compatibility concerns (mentioned in aws#27486 we are improving documentation as an alternative solution.

Closes aws#27481.

----

*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 bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-s3: Bad type definition for objectsKeyPattern parameter
3 participants