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

Skip validation on delete requests #318 #330

Merged

Conversation

johnttompkins
Copy link
Contributor

Issue #, if available: #318

Description of changes: Certain properties that are marked writeOnly and required will cause validation errors on delete, as the primaryIdentifier is only passed to the delete handlers. This PR removes the requirement to validate incoming payloads on deletion.

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

Copy link
Contributor

@wbingli wbingli left a comment

Choose a reason for hiding this comment

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

Is this only for contract test? I believe in Cloudformation a full resource model is passed for the delete handler.

@johnttompkins
Copy link
Contributor Author

Is this only for contract test? I believe in Cloudformation a full resource model is passed for the delete handler.

Let me double check on this assumption and get back to you.

@wbingli
Copy link
Contributor

wbingli commented Feb 26, 2021

Even CFN pass the full model to the DELETE, it doesn't make sense to make validation for the resource model, especially for the writeOnly properties. It only makes sense to do a full model validation for CREATE/UPDATE.

@wbingli wbingli requested a review from anshikg February 26, 2021 17:34
@ammokhov
Copy link
Contributor

Did you run any manual tests? Did you make sure it does not cause any regression?

@anshikg anshikg merged commit 7725100 into aws-cloudformation:master Mar 2, 2021
@johnttompkins johnttompkins deleted the skip-delete-validate branch March 2, 2021 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants