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): expiredObjectDeleteMarker is not validated against other properties #23974

Closed
wants to merge 1 commit into from

Conversation

otaviomacedo
Copy link
Contributor

Apply the validation documented for the resource property ExpiredObjectDeleteMarker

Closes #18924.


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

Verified

This commit was signed with the committer’s verified signature.
connor4312 Connor Peet
…perties
@gitpod-io
Copy link

gitpod-io bot commented Feb 2, 2023

@aws-cdk-automation aws-cdk-automation requested a review from a team February 2, 2023 17:20
@github-actions github-actions bot added bug This issue is a bug. p2 labels Feb 2, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 2, 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.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@otaviomacedo otaviomacedo added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Feb 3, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review February 3, 2023 12:59

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

Comment on lines +2025 to +2028
if ((rule.expirationDate || rule.expiration || rule.tagFilters) && rule.expiredObjectDeleteMarker) {
throw new Error('expiredObjectDeleteMarker cannot be true if expirationDate, expiration, or tagFilters are specified');
}

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like we need a contract refactor and potential deprecation of props instead of throwing this error. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, there is a combinatorial explosion here caused by all these properties working together. I can't even think of a different contract that puts all these together in a coherent way. But I'm open to suggestions.

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. contribution/core This is a PR that came from AWS. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(S3): LifecycleRule builder allows invalid mix of parameters
3 participants