no-jira: GCP Destroy: Group Load Balancer Resources & Retry on Errors#10586
no-jira: GCP Destroy: Group Load Balancer Resources & Retry on Errors#10586patrickdillon wants to merge 1 commit into
Conversation
Groups GCP Load Balancer resources together so they are destroyed before attempting to destroy subsequent, dependent resources. Retry delete operations when an internal error is encountered instead of continually checking the operation with an internal error.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR restructures GCP resource destruction to respect load-balancer dependency chains and adds detection for internal errors during operation polling. Load balancer frontends (forwarding rules, target pools, proxies) are now deleted before backends (services, health checks), which are deleted before instance groups. A new helper detects internal errors on incomplete operations and triggers retryable failures. ChangesGCP Resource Destruction Improvements
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
|
@patrickdillon: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@patrickdillon: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
| } | ||
|
|
||
| func hasInternalError(op *compute.Operation) bool { | ||
| if op.Error == nil { |
There was a problem hiding this comment.
| if op.Error == nil { | |
| if op == nil || op.Error == nil { |
| return false | ||
| } | ||
| for _, e := range op.Error.Errors { | ||
| if e.Code == "INTERNAL_ERROR" { |
There was a problem hiding this comment.
| if e.Code == "INTERNAL_ERROR" { | |
| if e != nil && e.Code == "INTERNAL_ERROR" { |
There was a problem hiding this comment.
nit: should we define "INTERNAL_ERROR" as a const for consistancy?
Groups GCP Load Balancer resources together so they are destroyed before attempting to destroy subsequent, dependent resources.
Retry delete operations when an internal error is encountered instead of continually checking the operation with an internal error.
Fixes #10584
Summary by CodeRabbit