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 DeletionProtectionEnabled to Redis Cluster #10367

Conversation

Harshita1603
Copy link
Contributor

@Harshita1603 Harshita1603 commented Apr 4, 2024

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 - Support Deletion Protection for Redis Cluster hashicorp/terraform-provider-google#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 support for the `deletion_protection_enabled` field with a default value of `true` to the `google_redis_cluster` resource

Copy link

github-actions bot commented Apr 4, 2024

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 github-actions bot requested a review from NickElliot April 4, 2024 11:25
@NickElliot
Copy link
Contributor

/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.

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(-))

1 similar comment
@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.

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
Copy link
Collaborator

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

1 similar comment
@modular-magician
Copy link
Collaborator

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
Copy link
Collaborator

$\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
Copy link
Collaborator

$\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

@Harshita1603
Copy link
Contributor Author

/gcbrun

1 similar comment
@NickElliot
Copy link
Contributor

/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.

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(-))

1 similar comment
@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.

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
Copy link
Collaborator

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

1 similar comment
@modular-magician
Copy link
Collaborator

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
Copy link
Collaborator

$\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
Copy link
Collaborator

$\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

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

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

@Harshita1603
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@NickElliot
Copy link
Contributor

/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.

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
Copy link
Collaborator

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
Copy link
Collaborator

$\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

@NickElliot
Copy link
Contributor

/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.

google provider: Diff ( 3 files changed, 50 insertions(+), 13 deletions(-))
google-beta provider: Diff ( 4 files changed, 114 insertions(+), 48 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+))
Open in Cloud Shell: Diff ( 2 files changed, 3 insertions(+), 7 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.

google provider: Diff ( 3 files changed, 51 insertions(+), 18 deletions(-))
google-beta provider: Diff ( 4 files changed, 115 insertions(+), 53 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+))
Open in Cloud Shell: Diff ( 2 files changed, 3 insertions(+), 7 deletions(-))

1 similar comment
@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.

google provider: Diff ( 3 files changed, 51 insertions(+), 18 deletions(-))
google-beta provider: Diff ( 4 files changed, 115 insertions(+), 53 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+))
Open in Cloud Shell: Diff ( 2 files changed, 3 insertions(+), 7 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 21
Passed tests: 19
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_createUpdateDeletionProtection

Get to know how VCR tests work

1 similar comment
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 21
Passed tests: 19
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_createUpdateDeletionProtection

Get to know how VCR tests work

@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.

google provider: Diff ( 3 files changed, 51 insertions(+), 18 deletions(-))
google-beta provider: Diff ( 4 files changed, 115 insertions(+), 53 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+))
Open in Cloud Shell: Diff ( 2 files changed, 3 insertions(+), 7 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 21
Passed tests: 19
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_createUpdateDeletionProtection

Get to know how VCR tests work

1 similar comment
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 21
Passed tests: 19
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_createUpdateDeletionProtection

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccRedisCluster_createClusterWithNodeType[Debug log]
TestAccRedisCluster_createUpdateDeletionProtection[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
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccRedisCluster_createClusterWithNodeType[Debug log]
TestAccRedisCluster_createUpdateDeletionProtection[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

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

rebased onto 6.0.0 branch and merged in latest changes, resolved test failures resulting from the changes (which affected the non standard test template)

LGTM

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccRedisCluster_createClusterWithNodeType[Debug log]
TestAccRedisCluster_createUpdateDeletionProtection[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

@github-actions github-actions bot requested a review from NickElliot August 16, 2024 23:31
@NickElliot NickElliot merged commit 820e403 into GoogleCloudPlatform:FEATURE-BRANCH-major-release-6.0.0 Aug 16, 2024
8 checks passed
@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccRedisCluster_createClusterWithNodeType[Debug log]
TestAccRedisCluster_createUpdateDeletionProtection[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
Copy link
Collaborator

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

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

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

Successfully merging this pull request may close these issues.

3 participants