Repository navigation
Releases
Releases · avast/retry-go
v5.1.1
v5.1.0
What's Changed
- 📝 Correct documentation examples by @blacksails in #150
- ci(workflow): add Go 1.26 and 1.27, fix macOS for pre-1.24 Go by @JaSei in #165
- options: fix newRetrierCore typo (was newRetrieerCore) by @c-tonneslan in #156
- Update README for DoWithData method transition by @JaSei in #152
- Fix backoff shift bounds for large delays by @bensynapse in #161
- fix: honor attemptsForError and prevent uint underflow when attempts is zero by @AdamMagued in #163
- ci(workflow): skip codecov upload on dependabot PRs by @JaSei in #166
- docs: add AGENTS.md with agent guidelines by @JaSei in #167
- fix: avoid unbounded error slice growth when lastErrorOnly is true by @Yanhu007 in #155
- build(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1 by @JaSei in #168
- docs: replace godocdown with in-repo stdlib README generator by @JaSei in #169
- feat(throttle): add retry throttling by @nhancdt2602 in #154
New Contributors
- @blacksails made their first contribution in #150
- @c-tonneslan made their first contribution in #156
- @bensynapse made their first contribution in #161
- @AdamMagued made their first contribution in #163
- @Yanhu007 made their first contribution in #155
- @nhancdt2602 made their first contribution in #154
Full Changelog: 5.0.0...v5.1.0
v5.0.1
Patch release — no public API changes.
Bug fixes
- Backoff delay overflow with very large
Delay— the shift cap was computed viamath.Log2on a float64, which underflowed for delays nearmath.MaxInt64, producing invalid backoff delays. The cap is now derived exactly from the bit length ofmath.MaxInt64. (#161) AttemptsForErroris now honored whenAttemptsis 0 (UntilSucceeded) — the per-error budget was previously ignored in the retry-until-success loop; this also fixes auintunderflow when a budget of0was configured, which caused infinite retries. (#163, fixes #137)- Unbounded error accumulation with
LastErrorOnly(true)— errors were appended to the internal error log on every attempt even though only the last one is returned, growing memory without bound on long retry runs (e.g.Attempts(math.MaxUint)+ context cancellation). Only the last error is retained now; the returned error is unchanged. (#155, fixes #118)
Documentation & tooling
- Clarified the v5 migration for
DoWithData→NewWithData[T](#152) - README is now generated by an in-repo stdlib tool (
tools/genreadme) with a CI golden-file check, replacing the unmaintained godocdown — the v5 changelog and doc links now render correctly on both GitHub and pkg.go.dev (#169, resolves #77) - CI: Go 1.26/1.27 added to the matrix, pre-1.24 Go excluded from macOS runners, Codecov no longer fails Dependabot PRs (#165, #166)
- Development dependency: testify 1.11.1 → 1.12.1 (#168)
Thanks to @bensynapse, @AdamMagued, @Yanhu007, @c-tonneslan, @AruneshDwivedi and @team-humaki — whose contributions, including the ones superseded during review, shaped this release. 🙏
v5.0.0
What's Changed
- Use Makefile lint target instead of blocked GitHub Action by @JaSei in #143
- default type is combination of backoff and random by @JaSei in #144
- Enhance readme + coverage by @JaSei in #146
- default branch is main by @JaSei in #147
- Proposal for v5 API: retry.New(...).Do(func) by @msf in #148
- upgrade to v5.0.0 with Go 1.20 multiple error wrapping support by @JaSei in #149
New Contributors
Full Changelog: 4.7.0...v5.0.0
v4.7.0
What's Changed
- support context cancel cause by @NivKeidan in #117
- Bump github.com/stretchr/testify from 1.10.0 to 1.11.1 by @dependabot[bot] in #136
- Add FullJitterBackoffDelay by @amirrezafahimi in #128
- No delay after final retry on max attempts by @StounhandJ in #129
- BackOffDelay multiplies attempts from zero by @StounhandJ in #130
- add Go version 1.25 to test matrix for expanded compatibility testing by @JaSei in #142
New Contributors
- @NivKeidan made their first contribution in #117
- @amirrezafahimi made their first contribution in #128
- @StounhandJ made their first contribution in #129
Full Changelog: 4.6.1...v4.7.0
v4.6.1
What's Changed
- Update link to docs by @ajeetdsouza in #100
- fix test for slow windows + add newer golang versions by @JaSei in #126
- Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 by @dependabot in #123
- Make sure DelayType function gets consistent values of n by @haaawk in #125
New Contributors
- @ajeetdsouza made their first contribution in #100
- @haaawk made their first contribution in #125
Full Changelog: 4.6.0...v4.6.1
v4.6.0
What's Changed
- Introduce UntilSucceeded option to improve readability by @natenho in #116
- Fix the inconsistency in the number of times passed in onRetry by @FarmerChillax in #114
- Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 by @dependabot in #112
New Contributors
- @natenho made their first contribution in #116
- @FarmerChillax made their first contribution in #114
Full Changelog: v4.5.1...v4.6.0
v4.5.1
What's Changed
- Bump github.com/stretchr/testify from 1.8.2 to 1.8.4 by @dependabot in #95
- add missing comma in the example by @spacewander in #101
- Add an example which shows err history by @avinassh in #98
- fix potential panic in IsRecoverable by @jalaziz in #104
New Contributors
- @spacewander made their first contribution in #101
- @avinassh made their first contribution in #98
- @jalaziz made their first contribution in #104
Full Changelog: 4.5.0...v4.5.1
v4.5.0
v4.4.0 (generic support)
What's Changed
- Go versions by @JaSei in #97
- fix: markdown code block format by @mrtc0 in #93
- remove error log pre-allocation and add benchmark by @dillonstreator in #89
- Add DoWithData function by @craigpastro in #91
New Contributors
- @mrtc0 made their first contribution in #93
- @dillonstreator made their first contribution in #89
- @craigpastro made their first contribution in #91
Full Changelog: 4.3.4...v4.4.0