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

Add blue green upgrade settings. #6618

Merged
merged 12 commits into from Nov 9, 2022

Conversation

jasonkramberger
Copy link
Contributor

@jasonkramberger jasonkramberger commented Sep 28, 2022

Implement GKE blue green node pool upgrade settings.
fixes hashicorp/terraform-provider-google#12045

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

container: added field `strategy` to `google_container_node_pool`
container: added field `blue_green_settings` to `google_container_node_pool`

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @shuyama1, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 203 insertions(+), 17 deletions(-))
Terraform Beta: Diff ( 2 files changed, 203 insertions(+), 17 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2192
Passed tests 1910
Skipped tests: 240
Failed tests: 42

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSqlDatabaseInstance_mysqlMajorVersionUpgrade|TestAccContainerCluster_deleteExclusionWindow|TestAccContainerCluster_updateMaintenanceExclusionOptions|TestAccContainerCluster_withRecurringMaintenanceWindow|TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType|TestAccContainerCluster_withMaintenanceWindow|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerCluster_withMaintenanceExclusionWindow|TestAccContainerCluster_regionalWithNodeLocations|TestAccContainerCluster_regionalWithNodePool|TestAccContainerCluster_regional|TestAccContainerCluster_withNodePoolResize|TestAccContainerCluster_withNodePoolBasic|TestAccContainerCluster_withTelemetryEnabled|TestAccContainerCluster_withMasterAuthorizedNetworksConfig|TestAccContainerCluster_network|TestAccComputeVpnTunnel_vpnTunnelBetaExample|TestAccContainerCluster_withReleaseChannelEnabledDefaultVersion|TestAccContainerCluster_withSandboxConfig|TestAccContainerCluster_withMasterAuthConfig_NoCert|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withILBSubsetting|TestAccComputeRouterInterface_basic|TestAccContainerCluster_withAutopilot|TestAccContainerCluster_nodeAutoprovisioningDefaults|TestAccContainerCluster_withVersion|TestAccContainerCluster_withAddons|TestAccContainerCluster_updateVersion|TestAccContainerCluster_withIntraNodeVisibility|TestAccContainerCluster_basic|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock_withAutopilot|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample|TestAccComputeForwardingRule_networkTier|TestAccComputeForwardingRule_update|TestAccComputeForwardingRule_forwardingRuleRegionalHttpXlbExample|TestAccComputeForwardingRule_forwardingRuleExternallbExample|TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample|TestAccClouddeployDeliveryPipeline_DeliveryPipeline|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccComputeFirewallPolicyRule_update|TestAccComputeFirewallPolicy_update

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccSqlDatabaseInstance_mysqlMajorVersionUpgrade[Debug log]
TestAccContainerCluster_regionalWithNodeLocations[Debug log]
TestAccContainerCluster_regionalWithNodePool[Debug log]
TestAccContainerCluster_withNodePoolResize[Debug log]
TestAccContainerCluster_withNodePoolBasic[Debug log]
TestAccContainerCluster_withMasterAuthorizedNetworksConfig[Debug log]
TestAccContainerCluster_network[Debug log]
TestAccComputeVpnTunnel_vpnTunnelBetaExample[Debug log]
TestAccContainerCluster_withReleaseChannelEnabledDefaultVersion[Debug log]
TestAccContainerCluster_withMasterAuthConfig_NoCert[Debug log]
TestAccContainerCluster_withConfidentialNodes[Debug log]
TestAccContainerCluster_withILBSubsetting[Debug log]
TestAccComputeRouterInterface_basic[Debug log]
TestAccContainerCluster_nodeAutoprovisioningDefaults[Debug log]
TestAccContainerCluster_withVersion[Debug log]
TestAccContainerCluster_updateVersion[Debug log]
TestAccContainerCluster_basic[Debug log]
TestAccComputeForwardingRule_networkTier[Debug log]
TestAccComputeForwardingRule_forwardingRuleRegionalHttpXlbExample[Debug log]
TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample[Debug log]
TestAccClouddeployDeliveryPipeline_DeliveryPipeline[Debug log]
TestAccComputeFirewallPolicy_update[Debug log]

Errors occurred during RECORDING mode. Please fix them to complete your PR
View the build log or the debug log for each test

@shuyama1
Copy link
Member

/gcbrun

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 203 insertions(+), 17 deletions(-))
Terraform Beta: Diff ( 2 files changed, 203 insertions(+), 17 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2192
Passed tests 1932
Skipped tests: 240
Failed tests: 20

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccContainerCluster_withAutopilot|TestAccContainerCluster_deleteExclusionWindow|TestAccContainerCluster_updateMaintenanceExclusionOptions|TestAccContainerCluster_withMaintenanceExclusionWindow|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock_withAutopilot|TestAccContainerCluster_withIntraNodeVisibility|TestAccContainerCluster_withRecurringMaintenanceWindow|TestAccContainerCluster_regional|TestAccContainerCluster_withTelemetryEnabled|TestAccContainerCluster_withMaintenanceWindow|TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerCluster_withSandboxConfig|TestAccContainerCluster_withAddons|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeForwardingRule_forwardingRuleExternallbExample|TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample|TestAccComputeForwardingRule_update|TestAccSqlDatabaseInstance_mysqlMajorVersionUpgrade|TestAccComputeFirewallPolicyRule_update

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_deleteExclusionWindow[Debug log]
TestAccContainerCluster_updateMaintenanceExclusionOptions[Debug log]
TestAccContainerCluster_withMaintenanceExclusionWindow[Debug log]
TestAccContainerCluster_withIntraNodeVisibility[Debug log]
TestAccContainerCluster_withRecurringMaintenanceWindow[Debug log]
TestAccContainerCluster_regional[Debug log]
TestAccContainerCluster_withTelemetryEnabled[Debug log]
TestAccContainerCluster_withMaintenanceWindow[Debug log]
TestAccContainerNodePool_withUpgradeSettings[Debug log]
TestAccComputeForwardingRule_forwardingRuleExternallbExample[Debug log]
TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample[Debug log]
TestAccComputeForwardingRule_update[Debug log]
TestAccSqlDatabaseInstance_mysqlMajorVersionUpgrade[Debug log]
TestAccComputeFirewallPolicyRule_update[Debug log]

Tests failed during RECORDING mode:
TestAccContainerCluster_withAutopilot[Error message] [Debug log]
TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock_withAutopilot[Error message] [Debug log]
TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType[Error message] [Debug log]
TestAccContainerCluster_withSandboxConfig[Error message] [Debug log]
TestAccContainerCluster_withAddons[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@shuyama1
Copy link
Member

shuyama1 commented Oct 3, 2022

/gcbrun

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician - !

Diff report

Terraform GA: Diff ( 2 files changed, 203 insertions(+), 17 deletions(-))
Terraform Beta: Diff ( 2 files changed, 203 insertions(+), 17 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2198
Passed tests 1949
Skipped tests: 240
Failed tests: 9

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccContainerCluster_withAutopilot|TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType|TestAccContainerCluster_withSandboxConfig|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock_withAutopilot|TestAccContainerCluster_withAddons|TestAccComputeInstance_soleTenantNodeAffinities|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample|TestAccSqlDatabaseInstance_mysqlMajorVersionUpgrade

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_withAutopilot[Debug log]
TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType[Debug log]
TestAccContainerCluster_withSandboxConfig[Debug log]
TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock_withAutopilot[Debug log]
TestAccContainerCluster_withAddons[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[Debug log]
TestAccSqlDatabaseInstance_mysqlMajorVersionUpgrade[Debug log]

Tests failed during RECORDING mode:
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes and sorry for the delay on reviewing this PR!

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 203 insertions(+), 17 deletions(-))
Terraform Beta: Diff ( 2 files changed, 203 insertions(+), 17 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2208
Passed tests 1965
Skipped tests: 240
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample[Debug log]

Tests failed during RECORDING mode:
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccCGCSnippet_eventarcWorkflowsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

Modify several fields to be computed to reduce diffs
from API defaults.

Fix flattenUpgradeSettings to always set returned API
values.
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 203 insertions(+), 19 deletions(-))
Terraform Beta: Diff ( 2 files changed, 203 insertions(+), 19 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2197
Passed tests 1958
Skipped tests: 239
Failed tests: 0

All tests passed in REPLAYING mode
View the build log

@sharkymcdongles
Copy link

Any chance of getting this merged in pretty please?

@shuyama1
Copy link
Member

Waiting for the rollout of internal validation. @jasonkramberger please ping me when that's done. Thanks!

jasonkramberger and others added 2 commits October 25, 2022 16:05
Add validation to prevent making changes to node pool upgrade
parameters for inactive strategies.
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

If you believe this detection to be incorrect please raise the concern with your reviewer. If you intend to make this change you will need to wait for a major release window. An override-breaking-change label can be added to allow merging.

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 2 files changed, 228 insertions(+), 19 deletions(-))
Terraform Beta: Diff ( 2 files changed, 228 insertions(+), 19 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2207
Passed tests 1966
Skipped tests: 239
Failed tests: 2

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType|TestAccContainerCluster_nodeAutoprovisioningDefaults

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType[Debug log]
TestAccContainerCluster_nodeAutoprovisioningDefaults[Debug log]

All tests passed
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 2 files changed, 230 insertions(+), 18 deletions(-))
Terraform Beta: Diff ( 2 files changed, 230 insertions(+), 18 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 2 files changed, 232 insertions(+), 18 deletions(-))
Terraform Beta: Diff ( 2 files changed, 232 insertions(+), 18 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2215
Passed tests 1976
Skipped tests: 239
Failed tests: 0

All tests passed in REPLAYING mode
View the build log

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Sorry, just realize that we still need to add documentation since this a handwritten resource. The doc file is located at https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/website/docs/r/container_node_pool.html.markdown
The rest looks good to me, and the PR should be good to go after the documentation is added. Thanks

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Thank you!

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 3 files changed, 250 insertions(+), 22 deletions(-))
Terraform Beta: Diff ( 3 files changed, 250 insertions(+), 22 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2216
Passed tests 1976
Skipped tests: 239
Failed tests: 1

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]

All tests passed
View the build log or the debug log for each test

Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, 1, 1),
Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, 1, 1, "SURGE", "", 0, 0.0, ""),
},
{
Copy link
Member

@shuyama1 shuyama1 Nov 4, 2022

Choose a reason for hiding this comment

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

Running some tests locally. When I only run the last two steps of the test (tests with only BLUE_GREEN config). I get errors like:

provider_test.go:315: Step 1/4 error: Error running apply: exit status 1
        
        Error: Surge upgrade settings may not be changed when surge strategy is not enabled
        
          with google_container_node_pool.with_upgrade_settings,
          on terraform_plugin_test.tf line 13, in resource "google_container_node_pool" "with_upgrade_settings":
          13: resource "google_container_node_pool" "with_upgrade_settings" {

Any ideas why this error occurs?

@shuyama1
Copy link
Member

shuyama1 commented Nov 8, 2022

/gcbrun

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 3 files changed, 258 insertions(+), 26 deletions(-))
Terraform Beta: Diff ( 3 files changed, 258 insertions(+), 26 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2230
Passed tests 1976
Skipped tests: 241
Failed tests: 13

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccContainerCluster_nodeAutoprovisioningDefaults|TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType|TestAccComputeVpnTunnel_vpnTunnelBetaExample|TestAccComputeRouterInterface_basic|TestAccComputeForwardingRule_networkTier|TestAccComputeForwardingRule_update|TestAccComputeForwardingRule_forwardingRuleRegionalHttpXlbExample|TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample|TestAccComputeForwardingRule_forwardingRuleExternallbExample|TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample|TestAccClouddeployDeliveryPipeline_DeliveryPipeline|TestAccComputeFirewallPolicy_update|TestAccComputeFirewallPolicyRule_update

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_nodeAutoprovisioningDefaults[Debug log]
TestAccContainerCluster_nodeAutoprovisioningDefaultsImageType[Debug log]
TestAccComputeVpnTunnel_vpnTunnelBetaExample[Debug log]
TestAccComputeRouterInterface_basic[Debug log]
TestAccComputeForwardingRule_networkTier[Debug log]
TestAccComputeForwardingRule_update[Debug log]
TestAccComputeForwardingRule_forwardingRuleRegionalHttpXlbExample[Debug log]
TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample[Debug log]
TestAccComputeForwardingRule_forwardingRuleExternallbExample[Debug log]
TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample[Debug log]
TestAccClouddeployDeliveryPipeline_DeliveryPipeline[Debug log]
TestAccComputeFirewallPolicy_update[Debug log]
TestAccComputeFirewallPolicyRule_update[Debug log]

All tests passed
View the build log or the debug log for each test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants