-
Notifications
You must be signed in to change notification settings - Fork 244
[v1.34] Improved Error handling #869
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: swastik959 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
This issue is currently awaiting triage. If the repository mantainers determine this is a relevant issue, they will accept it by applying the The 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 kubernetes-sigs/prow repository. |
|
Welcome @swastik959! |
|
Hi @swastik959. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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 kubernetes-sigs/prow repository. |
|
/ok-to-test |
|
@swastik959: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/uncc |
| By("waiting for the UDP service to have a load balancer") | ||
| // 2nd one should be faster since they ran in parallel. | ||
| udpService, err = udpJig.WaitForLoadBalancer(ctx, loadBalancerCreateTimeout) | ||
| By("waiting for the UDP service to have a load balancer with enhanced error handling") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to add this to the log message.
| // 2nd one should be faster since they ran in parallel. | ||
| udpService, err = udpJig.WaitForLoadBalancer(ctx, loadBalancerCreateTimeout) | ||
| By("waiting for the UDP service to have a load balancer with enhanced error handling") | ||
| // Enhanced load balancer creation with better error reporting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, delete this.
| }) | ||
| }) | ||
|
|
||
| // Enhanced helper functions with GCP-specific retry logic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
| // Check for known GCP infrastructure errors | ||
| retriableErrors := []string{ | ||
| "INTERNAL_ERROR", | ||
| "503", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are checking for error code, you should check the code explicitly vs doing a string match.
| } | ||
|
|
||
| for _, retriableErr := range retriableErrors { | ||
| if strings.Contains(errStr, retriableErr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above
| continue | ||
| } | ||
| } else { | ||
| // Non-retriable error, fail immediately |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be good to track start and end time and print it in the logs (it makes it easier to debug what happened when reading from the logs)
| } | ||
| } | ||
|
|
||
| // If we get here, all retries failed with retriable errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add logf
| } | ||
|
|
||
| // waitForLoadBalancerDestroyWithRetry waits for load balancer destruction with retry | ||
| func waitForLoadBalancerDestroyWithRetry(ctx context.Context, jig *e2eservice.TestJig, ip string, port int, timeout time.Duration) (*v1.Service, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this is exactly the same function as above but the jig.WaitForxxx is different.
you should consolidate this into one function taking the jig.WaitForXXX as an argument instead of duplicating the code
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
Improves error handling and timeout so that do Identify when the test is actually failing due to unavailability of loadbalancer and nor the fault in code
solves #131863