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

CLOUDP-201083: Improve validation and handling of advanced deployments #1146

Merged
merged 4 commits into from
Oct 5, 2023

Conversation

helderjs
Copy link
Collaborator

All Submissions:

  • Have you signed our CLA?
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if there is one).
  • Update docs/release-notes/release-notes.md if your changes should be included in the release notes for the next release.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2023

Copy link
Collaborator

@igor-karpukhin igor-karpukhin left a 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 {
Copy link
Collaborator

@josvazg josvazg Sep 27, 2023

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.

Suggested change
if regionSpec.AutoScaling == nil || regionSpec.AutoScaling.Compute == nil || regionSpec.AutoScaling.Compute.Enabled == nil || !*regionSpec.AutoScaling.Compute.Enabled {
if autoscalingComputeDisabled(regionSpec.AutoScaling) {

Copy link
Collaborator

@josvazg josvazg left a 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!

@helderjs helderjs force-pushed the CLOUDP-201083-fix-autoscaling-config branch 2 times, most recently from a334b3a to 862ced4 Compare September 29, 2023 11:09
@helderjs helderjs force-pushed the CLOUDP-201083-fix-autoscaling-config branch from 862ced4 to 735fda0 Compare October 4, 2023 13:53
@josvazg
Copy link
Collaborator

josvazg commented Oct 4, 2023

Still LGTM

@helderjs helderjs merged commit 5878ddc into main Oct 5, 2023
39 of 40 checks passed
@helderjs helderjs deleted the CLOUDP-201083-fix-autoscaling-config branch October 5, 2023 21:55
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.

3 participants