-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Expose Conflict errors and allow wrapping get/replace with backoff #34
Comments
https://docs.rs/backoff/0.2.1/backoff/future/fn.retry.html looks pretty nice now. Want to get this into one of the bigger examples and close this. |
Actually, I guess the key point here is to figure out where to use this. If we just put retry inside the reconciliation loop it wouldn't matter much, because that kind of has backoff built in. However, as the go side lets you wrap a |
IMO the "obvious" place to put this would be to provide it as an |
Maybe consider also adding backoff to |
Maybe try |
Oh, that's nice! We could even use the |
Isn't the layer stack decided when building the This needs cooperation from the user code, since only the user knows what exact changes were made, and why. At the very least, you'd need to replace the current
If you want to steamroll the conflicts (which is the only thing that we can do with our current API) then you don't need any of this machinery anyway; just set In order to actually handle the conflicts, you need to understand the mutation. For example, with Of course, there are still transient errors that do warrant transparent retries (network errors, and so on). But it's important that we don't get overzealous. |
Yeah, sorry, I didn't understand the requirements and the
Yeah, I thought users can provide their |
Going to close this. It's not worth doing anything smart for get/replace now that server-side apply is ubiquitous. The way to do this for individual calls is using Watcher has a similar Note that |
client-go encourages RetryOnConflict which is a reasonable pattern - code's also not that advanced.
Rust has:
We could probably make wrappers around that..
AFAIKT it's just a wrapper around a deliberate error match case, where the backoff continues. That should be easy to emulate now that we've exposed api error helpers on our
Error
type. Backoff seems like a good fit atm.The text was updated successfully, but these errors were encountered: