GoogleCloudPlatform / k8s-cloud-provider

Support code for implementing a Kubernetes cloud provider for Google Cloud Platform
Apache License 2.0
37 stars 46 forks source link

Implement retriable action #205

Closed kl52752 closed 3 months ago

kl52752 commented 4 months ago

RetriableAction is a wrapper on Action which contains RetryProvider to decide if the action should be rerun on error. Retiable Action works with all already supported actions: Create, Delete and Update.

kl52752 commented 4 months ago

/cc @mag-kol /cc @AwesomePatrol /cc @akwi-github

kl52752 commented 4 months ago

/retest

bowei commented 4 months ago

Discussed offline -- it seems like we should make the retry function return a duration so this can be rate limited.

As part of waiting for the duration, the code should also use a switch to watch for context cancellation.

kl52752 commented 4 months ago

Discussed offline -- it seems like we should make the retry function return a duration so this can be rate limited.

As part of waiting for the duration, the code should also use a switch to watch for context cancellation.

this is done, PTAL

bowei commented 3 months ago

/lgtm /approve

google-oss-prow[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bowei, kl52752, mag-kol

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: - ~~[OWNERS](https://github.com/GoogleCloudPlatform/k8s-cloud-provider/blob/master/OWNERS)~~ [bowei] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment