-
Notifications
You must be signed in to change notification settings - Fork 77
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
CLOUDP-201083: Improve validation and handling of advanced deployments #1146
Conversation
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.
Good job! 👍
var err error | ||
for _, replicationSpec := range replicationSpecs { | ||
for _, regionSpec := range replicationSpec.RegionConfigs { | ||
if regionSpec.AutoScaling == nil || regionSpec.AutoScaling.Compute == nil || regionSpec.AutoScaling.Compute.Enabled == nil || !*regionSpec.AutoScaling.Compute.Enabled { |
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.
nitpick, for this complex logic statement it helps readability to create a function with a descriptive name that summarizes the semantics of the change.
if regionSpec.AutoScaling == nil || regionSpec.AutoScaling.Compute == nil || regionSpec.AutoScaling.Compute.Enabled == nil || !*regionSpec.AutoScaling.Compute.Enabled { | |
if autoscalingComputeDisabled(regionSpec.AutoScaling) { |
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.
LGTM
Great job and extra points for not needing adding code to e2e or integration tests!
a334b3a
to
862ced4
Compare
862ced4
to
735fda0
Compare
Still LGTM |
All Submissions:
closes #XXXX
in your comment to auto-close the issue that your PR fixes (if there is one).