-
Notifications
You must be signed in to change notification settings - Fork 159
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
Allow last error to be returned with context error #96
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Interesting. Forgot you can't wrap more than 1 error in Go 1.19 or below. |
JaSei
approved these changes
Aug 3, 2023
Thank you for your PR |
JaSei
added a commit
that referenced
this pull request
Aug 7, 2023
kodiakhq bot
pushed a commit
to cloudquery/plugin-pb-go
that referenced
this pull request
Sep 1, 2023
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/avast/retry-go/v4](https://github.com/avast/retry-go) | require | minor | `v4.3.4` -> `v4.5.0` | --- ### Release Notes <details> <summary>avast/retry-go (github.com/avast/retry-go/v4)</summary> ### [`v4.5.0`](https://github.com/avast/retry-go/releases/tag/v4.5.0) [Compare Source](https://github.com/avast/retry-go/compare/4.4.0...4.5.0) #### What's Changed - Allow last error to be returned with context error by [@​willdot](https://github.com/willdot) in [avast/retry-go#96 #### New Contributors - [@​willdot](https://github.com/willdot) made their first contribution in [avast/retry-go#96 **Full Changelog**: avast/retry-go@4.4.0...v4.5.0 ### [`v4.4.0`](https://github.com/avast/retry-go/releases/tag/v4.4.0): (generic support) [Compare Source](https://github.com/avast/retry-go/compare/4.3.4...4.4.0) #### What's Changed - Go versions by [@​JaSei](https://github.com/JaSei) in [avast/retry-go#97 - fix: markdown code block format by [@​mrtc0](https://github.com/mrtc0) in [avast/retry-go#93 - remove error log pre-allocation and add benchmark by [@​dillonstreator](https://github.com/dillonstreator) in [avast/retry-go#89 - Add DoWithData function by [@​craigpastro](https://github.com/craigpastro) in [avast/retry-go#91 #### New Contributors - [@​mrtc0](https://github.com/mrtc0) made their first contribution in [avast/retry-go#93 - [@​dillonstreator](https://github.com/dillonstreator) made their first contribution in [avast/retry-go#89 - [@​craigpastro](https://github.com/craigpastro) made their first contribution in [avast/retry-go#91 **Full Changelog**: avast/retry-go@4.3.4...v4.4.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi43OC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNzguMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempts to fix #63
I came across a situation where I needed to keep trying until a context had been canceled (either through a time out or canceled).
However when doing so, the returned error was always
context deadline exceeded
orcontext canceled
and I needed the error that the function I was trying to retry returned.Obviously returning the entire error log isn't ideal since it could technically be 100s or 1000s 🤪
I am terrible at naming, so open to a better names option.