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

Sql pvup support #6472

Merged
merged 19 commits into from Sep 28, 2022
Merged

Conversation

usingh83
Copy link
Contributor

@usingh83 usingh83 commented Aug 26, 2022

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)

sql: added  `password_policy` field to `google_sql_user` resource

@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. @slevenick, 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 ( 3 files changed, 200 insertions(+))
Terraform Beta: Diff ( 3 files changed, 200 insertions(+))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF Cloud Doc Samples: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2147
Passed tests 1907
Skipped tests: 233
Failed tests: 7

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCloudFunctions2Function_fullUpdate|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccCloudFunctions2Function_fullUpdate[view]

Tests failed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]
TestAccComputeInstance_soleTenantNodeAffinities[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[view]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[view]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[view]

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

@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 ( 3 files changed, 199 insertions(+))
Terraform Beta: Diff ( 3 files changed, 199 insertions(+))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF Cloud Doc Samples: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2148
Passed tests 1906
Skipped tests: 234
Failed tests: 8

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]
TestAccFirebaserulesRelease_BasicRelease[view]

Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_SqlServerAuditConfig[view]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[view]
TestAccComputeInstance_soleTenantNodeAffinities[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[view]
TestAccCGCSnippet_eventarcWorkflowsExample[view]

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

@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 ( 3 files changed, 224 insertions(+))
Terraform Beta: Diff ( 3 files changed, 224 insertions(+))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF Cloud Doc Samples: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2152
Passed tests 1910
Skipped tests: 234
Failed tests: 8

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSqlUser_mysqlDisabled|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Debug log]

Tests failed during RECORDING mode:
TestAccSqlUser_mysqlDisabled[Error message] [Debug log]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log]

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

@slevenick
Copy link
Contributor

Are you able to run the TestAccSqlUser_mysqlDisabled locally and see it pass? I'm seeing a diff after apply during the test run that seems to be caused by the flatten not working correctly

@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 ( 3 files changed, 225 insertions(+))
Terraform Beta: Diff ( 3 files changed, 225 insertions(+))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF Cloud Doc Samples: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2157
Passed tests 1914
Skipped tests: 235
Failed tests: 8

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccSqlUser_mysqlDisabled

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Debug log]

Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log]
TestAccSqlUser_mysqlDisabled[Error message] [Debug log]

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

@slevenick
Copy link
Contributor

Sorry, I'm not sure how your last change fixes the issue. Have you been able to use this resource locally successfully?

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

See previous comments

@usingh83
Copy link
Contributor Author

usingh83 commented Sep 2, 2022

See previous comments

It didn't, i am still working on it.

@usingh83
Copy link
Contributor Author

Running this test locally still fails. Have you been able to test this resource locally?

          # google_sql_user.user2 will be updated in-place
          ~ resource "google_sql_user" "user2" {
                id       = "admin/gmail.com/i-8532336729755310092"
                name     = "admin"
                # (4 unchanged attributes hidden)

              ~ password_policy {
                  ~ enable_password_verification = false -> true
                    # (3 unchanged attributes hidden)

                  ~ status {
                      ~ locked                   = false -> true
                      ~ password_expiration_time = "2022-10-03T00:14:56Z" -> "2023-07-23T04:06:22.114-07:00"
                    }
                }
            }

Hi slevenick, sorry for the late response, I was having a lot of problems with the definitions of some of the fields. I have clarified the fields and found that the status block above is going to be a read only block. I have made changes for the same. The tests are passing for me in my local now.

@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 ( 3 files changed, 221 insertions(+))
Terraform Beta: Diff ( 3 files changed, 221 insertions(+))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2175
Passed tests 1932
Skipped tests: 239
Failed tests: 4

Action taken

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

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]

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

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

@usingh83
Copy link
Contributor Author

Running this test locally still fails. Have you been able to test this resource locally?

          # google_sql_user.user2 will be updated in-place
          ~ resource "google_sql_user" "user2" {
                id       = "admin/gmail.com/i-8532336729755310092"
                name     = "admin"
                # (4 unchanged attributes hidden)

              ~ password_policy {
                  ~ enable_password_verification = false -> true
                    # (3 unchanged attributes hidden)

                  ~ status {
                      ~ locked                   = false -> true
                      ~ password_expiration_time = "2022-10-03T00:14:56Z" -> "2023-07-23T04:06:22.114-07:00"
                    }
                }
            }

Hi slevenick, sorry for the late response, I was having a lot of problems with the definitions of some of the fields. I have clarified the fields and found that the status block above is going to be a read only block. I have made changes for the same. The tests are passing for me in my local now.

Please wait with the review, i am trying to see why TestAccSqlUser_mysqlDisabled is failing.

@usingh83
Copy link
Contributor Author

Running this test locally still fails. Have you been able to test this resource locally?

          # google_sql_user.user2 will be updated in-place
          ~ resource "google_sql_user" "user2" {
                id       = "admin/gmail.com/i-8532336729755310092"
                name     = "admin"
                # (4 unchanged attributes hidden)

              ~ password_policy {
                  ~ enable_password_verification = false -> true
                    # (3 unchanged attributes hidden)

                  ~ status {
                      ~ locked                   = false -> true
                      ~ password_expiration_time = "2022-10-03T00:14:56Z" -> "2023-07-23T04:06:22.114-07:00"
                    }
                }
            }

Hi slevenick, sorry for the late response, I was having a lot of problems with the definitions of some of the fields. I have clarified the fields and found that the status block above is going to be a read only block. I have made changes for the same. The tests are passing for me in my local now.

Please wait with the review, i am trying to see why TestAccSqlUser_mysqlDisabled is failing.

Ok now TestAccSqlUser_mysqlDisabled is passing. Don't know why modular-magician did not run.

@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 ( 3 files changed, 220 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 220 insertions(+), 1 deletion(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

The provider crashed while running the VCR tests in REPLAYING mode
Please fix it to complete your PR
View the build log

@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 ( 3 files changed, 222 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 222 insertions(+), 1 deletion(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2175
Passed tests 1933
Skipped tests: 239
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
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[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

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

One small note in the test, other than that looks good

mmv1/third_party/terraform/tests/resource_sql_user_test.go Outdated Show resolved Hide resolved
@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 ( 3 files changed, 222 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 222 insertions(+), 1 deletion(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2177
Passed tests 1895
Skipped tests: 239
Failed tests: 43

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeVpnTunnel_router|TestAccComputeVpnTunnel_regionFromGateway|TestAccComputeVpnTunnel_vpnTunnelBetaExample|TestAccComputeServiceAttachment_serviceAttachmentBasicExample|TestAccComputeRouterPeer_advertiseMode|TestAccComputeRouterInterface_withTunnel|TestAccComputeRouterInterface_basic|TestAccComputeRouterPeer_bfd|TestAccComputeRouterPeer_enable|TestAccComputeManagedSslCertificate_managedSslCertificateBasicExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeRouterPeer_basic|TestAccComputeRoute_routeIlbVipExample|TestAccComputeRoute_routeIlbExample|TestAccComputePacketMirroring_computePacketMirroringFullExample|TestAccComputeRegionNetworkEndpointGroup_regionNetworkEndpointGroupPscServiceAttachmentExample|TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample|TestAccComputeForwardingRule_forwardingRuleExternallbExample|TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample|TestAccComputeForwardingRule_internalHttpLbWithMigBackendExample|TestAccComputeForwardingRule_serviceDirectoryRegistrations|TestAccComputeForwardingRule_networkTier|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccComputeGlobalForwardingRule_labels|TestAccComputeGlobalForwardingRule_ipv6|TestAccComputeGlobalForwardingRule_updateTarget|TestAccComputeGlobalForwardingRule_privateServiceConnectGoogleApisExample|TestAccComputeGlobalForwardingRule_globalForwardingRuleHybridExample|TestAccComputeGlobalForwardingRule_globalForwardingRuleInternalExample|TestAccComputeGlobalForwardingRule_globalForwardingRuleHttpExample|TestAccComputeForwardingRule_update|TestAccComputeForwardingRule_forwardingRuleRegionalHttpXlbExample|TestAccComputeForwardingRule_forwardingRuleBasicExample|TestAccCloudRunService_cloudRunServiceMultipleRegionsExample|TestAccClouddeployTarget_Target|TestAccClouddeployDeliveryPipeline_DeliveryPipeline|TestAccDataSourceGoogleForwardingRule|TestAccDataSourceGoogleGlobalForwardingRule|TestAccComputeFirewallPolicyRule_update|TestAccComputeFirewallPolicyAssociation_basic|TestAccComputeFirewallPolicy_update|TestAccComputeFirewallPolicyRule_multipleRules

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeVpnTunnel_vpnTunnelBetaExample[Debug log]
TestAccComputeRouterInterface_basic[Debug log]
TestAccComputeRoute_routeIlbVipExample[Debug log]
TestAccComputePacketMirroring_computePacketMirroringFullExample[Debug log]
TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample[Debug log]
TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample[Debug log]
TestAccComputeForwardingRule_internalHttpLbWithMigBackendExample[Debug log]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[Debug log]
TestAccComputeGlobalForwardingRule_ipv6[Debug log]
TestAccComputeGlobalForwardingRule_updateTarget[Debug log]
TestAccComputeGlobalForwardingRule_globalForwardingRuleHybridExample[Debug log]
TestAccComputeGlobalForwardingRule_globalForwardingRuleInternalExample[Debug log]
TestAccComputeForwardingRule_forwardingRuleRegionalHttpXlbExample[Debug log]
TestAccClouddeployDeliveryPipeline_DeliveryPipeline[Debug log]
TestAccComputeFirewallPolicyRule_update[Debug log]
TestAccComputeFirewallPolicy_update[Debug log]

Tests failed during RECORDING mode:
TestAccComputeVpnTunnel_router[Error message] [Debug log]
TestAccComputeRouterPeer_advertiseMode[Error message] [Debug log]
TestAccComputeRouterInterface_withTunnel[Error message] [Debug log]
TestAccComputeManagedSslCertificate_managedSslCertificateBasicExample[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccComputeRouterPeer_basic[Error message] [Debug log]
TestAccClouddeployTarget_Target[Error message] [Debug log]

Please fix these to complete your PR
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
3 participants