-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add Backoff.ErrCause() #538
Conversation
I just realised we require golang 1.20 in dskit. Damn this repo lives in the past! |
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.
LGTM - except I guess we need to increase the minimum Go version to 1.21. Does anything hinder us from doing so?
This seems like safer option to me, to avoid breaking changes to clients using |
I would agree with @pstibrany: A subtle breaking change like this will not come up when randomly upgrading the dskit package, and not too sure that everyone fully check the diff between go mod updates. I could also think of something that would at least make the |
Thanks for the feedback. Switching to draft cause it requires golang 1.21 anyway, so we would need to upgrade first. |
Thanks for the feedback people. I've added |
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
9b0cfc8
to
2ee2549
Compare
Signed-off-by: Marco Pracucci <marco@pracucci.com>
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.
LGTM
What this PR does:
In this PR I propose a add
Backoff.ErrCause()
which is likeBackoff.Err()
but returns the context cause if backoff is terminated because the context has been canceled.Which issue(s) this PR fixes:
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]