client-go icon indicating copy to clipboard operation
client-go copied to clipboard

locate: retry on ErrClientGetResourceGroup for transient errors

Open disksing opened this issue 2 months ago • 3 comments

When receiving ErrClientGetResourceGroup error, distinguish between permanent and transient errors:

  • For 'resource group not found' error, return directly without retry since it's a permanent error
  • For other errors (e.g., 'not leader'), apply backoff and retry since they are transient errors

Add test case TestOnSendFailByResourceGroupError to cover both scenarios:

  1. Test that 'resource group not found' returns immediately without backoff
  2. Test that other errors trigger retry with backoff

disksing avatar Oct 22 '25 05:10 disksing

@ystaticy: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In 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 kubernetes-sigs/prow repository.

ti-chi-bot[bot] avatar Oct 22 '25 05:10 ti-chi-bot[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iosmanthus, ystaticy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

ti-chi-bot[bot] avatar Oct 22 '25 06:10 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2025-10-22 06:12:08.888394831 +0000 UTC m=+852234.965647391: :ballot_box_with_check: agreed by iosmanthus.

ti-chi-bot[bot] avatar Oct 22 '25 06:10 ti-chi-bot[bot]