magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Add DeletionProtectionEnabled to Redis Cluster

Open Harshita1603 opened this issue 3 months ago • 38 comments

Adding deletion protection enabled field in the Cluster resource in redis.

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

  1. 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 - https://github.com/hashicorp/terraform-provider-google/issues/17763

  2. 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).

  3. Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.

  4. Ran relevant acceptance tests using my own Google Cloud project and credentials. They show the following error -
    testing_new.go:85: Error running post-test destroy, there may be dangling resources: exit status 1 Error: Error waiting for Deleting Network: The network resource 'projects/harshig-test/global/networks/mynetworkpxlkaasq97' is already being used by 'projects/harshig-test/global/firewalls/mynetworkpxlkaasq97-vmvqhndc7vcvhkaszq37j4sh-4'4.

  5. Read/Write release notes before writing my release note below.

redis: added deletion_protection_enabled field to google_redis_cluster resource

Harshita1603 avatar Apr 04 '24 11:04 Harshita1603

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@NickElliot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

github-actions[bot] avatar Apr 04 '24 11:04 github-actions[bot]

/gcbrun

NickElliot avatar Apr 05 '24 16:04 NickElliot

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.

google provider: Diff ( 3 files changed, 41 insertions(+), 10 deletions(-)) google-beta provider: Diff ( 4 files changed, 44 insertions(+), 20 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+)) Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+), 4 deletions(-))

modular-magician avatar Apr 05 '24 16:04 modular-magician

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.

google provider: Diff ( 3 files changed, 41 insertions(+), 10 deletions(-)) google-beta provider: Diff ( 4 files changed, 44 insertions(+), 20 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+)) Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+), 4 deletions(-))

modular-magician avatar Apr 05 '24 16:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 13 Skipped tests: 0 Affected tests: 3

Click here to see the affected service packages
  • redis

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccRedisCluster_createClusterWithNodeType|TestAccRedisCluster_updateReplicaCount|TestAccRedisCluster_updateShardCount

Get to know how VCR tests work

modular-magician avatar Apr 05 '24 16:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 13 Skipped tests: 0 Affected tests: 3

Click here to see the affected service packages
  • redis

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccRedisCluster_createClusterWithNodeType|TestAccRedisCluster_updateReplicaCount|TestAccRedisCluster_updateShardCount

Get to know how VCR tests work

modular-magician avatar Apr 05 '24 16:04 modular-magician

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccRedisCluster_createClusterWithNodeType[Error message] [Debug log] TestAccRedisCluster_updateReplicaCount[Error message] [Debug log] TestAccRedisCluster_updateShardCount[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$ View the build log or the debug log for each test

modular-magician avatar Apr 05 '24 17:04 modular-magician

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccRedisCluster_createClusterWithNodeType[Error message] [Debug log] TestAccRedisCluster_updateReplicaCount[Error message] [Debug log] TestAccRedisCluster_updateShardCount[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$ View the build log or the debug log for each test

modular-magician avatar Apr 05 '24 17:04 modular-magician

/gcbrun

Harshita1603 avatar Apr 05 '24 18:04 Harshita1603

/gcbrun

NickElliot avatar Apr 08 '24 16:04 NickElliot

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.

google provider: Diff ( 3 files changed, 41 insertions(+), 10 deletions(-)) google-beta provider: Diff ( 4 files changed, 84 insertions(+), 20 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+)) Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+), 4 deletions(-))

modular-magician avatar Apr 08 '24 16:04 modular-magician

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.

google provider: Diff ( 3 files changed, 41 insertions(+), 10 deletions(-)) google-beta provider: Diff ( 4 files changed, 84 insertions(+), 20 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+)) Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+), 4 deletions(-))

modular-magician avatar Apr 08 '24 16:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 13 Skipped tests: 0 Affected tests: 3

Click here to see the affected service packages
  • redis

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccRedisCluster_createClusterWithNodeType|TestAccRedisCluster_updateReplicaCount|TestAccRedisCluster_updateShardCount

Get to know how VCR tests work

modular-magician avatar Apr 08 '24 16:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 13 Skipped tests: 0 Affected tests: 3

Click here to see the affected service packages
  • redis

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccRedisCluster_createClusterWithNodeType|TestAccRedisCluster_updateReplicaCount|TestAccRedisCluster_updateShardCount

Get to know how VCR tests work

modular-magician avatar Apr 08 '24 16:04 modular-magician

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccRedisCluster_createClusterWithNodeType[Error message] [Debug log] TestAccRedisCluster_updateReplicaCount[Error message] [Debug log] TestAccRedisCluster_updateShardCount[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$ View the build log or the debug log for each test

modular-magician avatar Apr 08 '24 17:04 modular-magician

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccRedisCluster_createClusterWithNodeType[Error message] [Debug log] TestAccRedisCluster_updateReplicaCount[Error message] [Debug log] TestAccRedisCluster_updateShardCount[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$ View the build log or the debug log for each test

modular-magician avatar Apr 08 '24 17:04 modular-magician

It looks like whats happening is the API does not return the "deletion_protection_enabled" value in the "GET" request, so the plan assumes the value to be false (as that is how Terraform handles empty booleans) and has a resulting permadiff. Is this intended API behavior? If so, an "ignore_read" will need to be set for the new field

Hey Nick, No. This is not intended API behaviour. One of the possible reason is that the field "deletion_protection_enabled" is currently google internal - hence, it doesn't appear in "GET" request. However, the instance creation was successful with the field - hence, the testing project does belong to google org.

Harshita1603 avatar Apr 10 '24 19:04 Harshita1603

Hey Nick, Could you please run the Google Cloud Build again?

Harshita1603 avatar Apr 22 '24 09:04 Harshita1603

/gcbrun

NickElliot avatar Apr 22 '24 20:04 NickElliot

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.

google provider: Diff ( 3 files changed, 41 insertions(+), 10 deletions(-)) google-beta provider: Diff ( 4 files changed, 84 insertions(+), 20 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+)) Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+), 4 deletions(-))

modular-magician avatar Apr 22 '24 20:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 13 Skipped tests: 0 Affected tests: 3

Click here to see the affected service packages
  • redis

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccRedisCluster_createClusterWithNodeType|TestAccRedisCluster_updateReplicaCount|TestAccRedisCluster_updateShardCount

Get to know how VCR tests work

modular-magician avatar Apr 22 '24 20:04 modular-magician

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$ TestAccRedisCluster_updateShardCount[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccRedisCluster_createClusterWithNodeType[Error message] [Debug log] TestAccRedisCluster_updateReplicaCount[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$ View the build log or the debug log for each test

modular-magician avatar Apr 22 '24 21:04 modular-magician

/gcbrun

Harshita1603 avatar Apr 23 '24 07:04 Harshita1603

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.

google provider: Diff ( 3 files changed, 41 insertions(+), 10 deletions(-)) google-beta provider: Diff ( 4 files changed, 75 insertions(+), 25 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+)) Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+), 4 deletions(-))

modular-magician avatar Apr 23 '24 07:04 modular-magician

Tests analytics

Total tests: 16 Passed tests: 14 Skipped tests: 0 Affected tests: 2

Click here to see the affected service packages
  • redis

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccRedisCluster_createClusterWithNodeType|TestAccRedisCluster_updateReplicaCount

Get to know how VCR tests work

modular-magician avatar Apr 23 '24 07:04 modular-magician

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$ TestAccRedisCluster_createClusterWithNodeType[Debug log] TestAccRedisCluster_updateReplicaCount[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$ View the build log or the debug log for each test

modular-magician avatar Apr 23 '24 08:04 modular-magician

The tests are now passing

Harshita1603 avatar Apr 25 '24 07:04 Harshita1603

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.

google provider: Diff ( 3 files changed, 47 insertions(+), 10 deletions(-)) google-beta provider: Diff ( 4 files changed, 109 insertions(+), 41 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+)) Open in Cloud Shell: Diff ( 1 file changed, 2 insertions(+), 4 deletions(-))

modular-magician avatar Apr 29 '24 12:04 modular-magician

Tests analytics

Total tests: 0 Passed tests: 0 Skipped tests: 0 Affected tests: 0

Click here to see the affected service packages
  • redis

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$ View the build log

modular-magician avatar Apr 29 '24 12:04 modular-magician

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.

google provider: Diff ( 3 files changed, 47 insertions(+), 10 deletions(-)) google-beta provider: Diff ( 4 files changed, 109 insertions(+), 41 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+)) Open in Cloud Shell: Diff ( 1 file changed, 2 insertions(+), 4 deletions(-))

modular-magician avatar Apr 29 '24 12:04 modular-magician