Skip to content

Breaking change: Stop deleting failed GKE clusters, taint instead#8978

Merged
rileykarson merged 1 commit into
GoogleCloudPlatform:FEATURE-BRANCH-major-release-5.0.0from
rileykarson:gke-taint-cleanup-5.0.0
Sep 18, 2023
Merged

Breaking change: Stop deleting failed GKE clusters, taint instead#8978
rileykarson merged 1 commit into
GoogleCloudPlatform:FEATURE-BRANCH-major-release-5.0.0from
rileykarson:gke-taint-cleanup-5.0.0

Conversation

@rileykarson

@rileykarson rileykarson commented Sep 16, 2023

Copy link
Copy Markdown
Member

Closes hashicorp/terraform-provider-google#4780

Release Note Template for Downstream PRs (will be copied)

container: removed the behaviour that `google_container_cluster` will delete the cluster if it's created in an error state. Instead, it will mark the cluster as tainted, allowing manual inspection and intervention. To proceed with deletion, run another `terraform apply`.

@modular-magician

Copy link
Copy Markdown
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, 11 insertions(+), 63 deletions(-))
Terraform Beta: Diff ( 2 files changed, 11 insertions(+), 63 deletions(-))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 3035
Passed tests 2729
Skipped tests: 304
Affected tests: 2

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
TestAccContainerCluster_errorCleanDanglingCluster|TestAccDataSourceGoogleServiceAccountJwt

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

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

}
// The resource didn't actually create
// Don't clear cluster id, this will taint the resource
log.Printf("[WARN] GKE cluster %s was created in an error state, and has been marked as tainted", clusterName)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Checking: this works because just returning the error below automatically taints the resource.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Returning an error without clearing the id, yep!

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