Skip to content

Skip validation on delete requests #318 - #330

Merged
anshikg merged 2 commits into
aws-cloudformation:masterfrom
johnttompkins:skip-delete-validate
Mar 2, 2021
Merged

anshikg merged 2 commits into
aws-cloudformation:masterfrom
johnttompkins:skip-delete-validate

Conversation

@johnttompkins

Copy link
Copy Markdown
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.

@wbingli wbingli left a comment

Copy link
Copy Markdown

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
Copy Markdown
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

wbingli commented Feb 26, 2021

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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

@anshikg
anshikg force-pushed the skip-delete-validate branch from a8d2e9d to 5e93292 Compare March 2, 2021 03:08
@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