Skip to content

fix!: Add default worker retry config values - #892

Merged
spencewenski merged 1 commit into
mainfrom
gh-891-worker-retry-defaults
Aug 5, 2025
Merged

spencewenski merged 1 commit into
mainfrom
gh-891-worker-retry-defaults

Conversation

@spencewenski

@spencewenski spencewenski commented Aug 5, 2025 •

Copy link
Copy Markdown
Member

Currently, workers will not retry by default even though the default retry config has max-retries = 25. This is because there is no retry strategy nor delay provided.

This PR adds sensible defaults for the retry config. This is maybe technically a breaking change, but it can also be considered a bug fix because we want workers to retry by default with the given max-retries = 25 default.

This PR also fixes the exponential backoff delay calculation -- before, it would always be 0 if the delay config was < 1000 and always 1 second if the delay config was >= 1000 and < 2000.

This PR also fixes the delay calcuations to use saturating_* methods to avoid overflows.

Closes #891

Currently, workers will not retry by default even though the default
retry config has `max-retries = 25`. This is because there is no retry
strategy nor delay provided.

This PR adds sensible defaults for the retry config. This is maybe
technically a breaking change, but it can also be considered a bug fix
because we want workers to retry by default with the given `max-retries
= 25` default.

This PR also fixes the exponential backoff delay calculation -- before,
it would always be 0 if the delay config was < 1000 and always 1 second
if the delay config was >= 1000 and < 2000.

This PR also fixes the delay calcuations to use `saturating_*` methods
to avoid overflows.
@spencewenski spencewenski changed the title fix: Add default worker retry config values fix!: Add default worker retry config values Aug 5, 2025
@codecov

codecov Bot commented Aug 5, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.85%. Comparing base (fdf5e84) to head (7a20c2c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/worker/backend/pg/mod.rs 0.00% 9 Missing ⚠️
Files with missing lines Coverage Δ
src/worker/backend/pg/mod.rs 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdf5e84...7a20c2c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@spencewenski
spencewenski merged commit bd2bb0b into main Aug 5, 2025
@spencewenski
spencewenski deleted the gh-891-worker-retry-defaults branch August 5, 2025 00:45
@github-actions github-actions Bot mentioned this pull request Aug 5, 2025
spencewenski added a commit that referenced this pull request Aug 5, 2025
## 🤖 New release

* `roadster`: 0.8.0 -> 0.8.1 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.8.1](roadster-v0.8.0...roadster-v0.8.1)
- 2025-08-05

### Fixed

- [**breaking**] Add default worker retry config values
([#892](#892))
- *(docs)* Change background jobs header levels
([#881](#881))
- *(docs)* Fix typo in docs
([#879](#879))
- *(docs)* Update references to Service in book
([#878](#878))

### Other

- *(deps)* bump taiki-e/install-action from 2.56.3 to 2.57.5
([#883](#883))
- *(deps)* bump obi1kenobi/cargo-semver-checks-action from 2.6 to 2.8
([#882](#882))
- *(deps)* bump MarcoIeni/release-plz-action from 0.5.106 to 0.5.110
([#884](#884))
- *(deps)* bump rui314/setup-mold from
e16410e7f8d9e167b74ad5697a9089a35126eb50 to
7344740a9418dcdcb481c7df83d9fbd1d5072d7d
([#885](#885))
- *(deps)* bump tonic from 0.13.0 to 0.13.1
([#888](#888))
- *(deps)* bump rand from 0.9.0 to 0.9.2
([#886](#886))
- *(deps)* bump tokio from 1.44.2 to 1.46.1
([#887](#887))
- *(deps)* bump sqlx from 0.8.5 to 0.8.6
([#889](#889))
- *(deps)* bump config from 0.15.11 to 0.15.13
([#890](#890))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Spencer Ferris <3319370+spencewenski@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update default values for worker retry config

1 participant