-
Notifications
You must be signed in to change notification settings - Fork 99
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
Adding ConditionalCreateOnlyProperties handling to AWS patch logic #5512
Conversation
Test Results2 516 tests +2 2 509 ✔️ +2 1m 55s ⏱️ ±0s Results for commit 420059d. ± Comparison against base commit 42a6f1b. This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
CreateOnlyProperties []string `json:"createOnlyProperties,omitempty"` | ||
ConditionalCreateOnlyProperties []string `json:"conditionalCreateOnlyProperties,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think there is a way to somehow merge these two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like another struct that would be named CreateOnlyProperty which can have a conditional field on it that could be a boolean? And the CreateOnlyProperties could be an array of CreateOnlyProperty. Is it too much of an unnecessary effort? I am just brainstorming and this suggestion is not that important as of now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know this! Thanks!
may need a rebase other than that LGTM |
isReadOnlyProperty := slices.Contains(resourceTypeSchema.ReadOnlyProperties, property) | ||
if isReadOnlyProperty || isCreateOnlyProperty { | ||
isConditionalCreateOnlyProperty := slices.Contains(resourceTypeSchema.ConditionalCreateOnlyProperties, property) | ||
if isReadOnlyProperty || isCreateOnlyProperty || isConditionalCreateOnlyProperty { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add unit-test or functional test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description
Issue reference
Fixes: #issue_number
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: