chore(deps): replace unmaintained backoff crate with backon#1291
Open
pranc1ngpegasus wants to merge 1 commit into
Open
chore(deps): replace unmaintained backoff crate with backon#1291pranc1ngpegasus wants to merge 1 commit into
pranc1ngpegasus wants to merge 1 commit into
Conversation
The backoff crate is unmaintained per RUSTSEC-2025-0012. Migrate gRPC retry and poll-buffer backoff to backon's ExponentialBuilder API in temporalio-client and temporalio-sdk-core respectively. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or 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
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.
What was changed
The SDK depended on the unmaintained
backoffcrate (see RUSTSEC-2025-0012 / RustSec advisory) for exponential retry delays in:temporalio-client— gRPC call retry (TonicErrorHandlerinretry.rs)temporalio-sdk-core— poller autoscaling error backoff (poll_buffer.rs)This PR replaces
backoffwithbackonin both crates:temporalio-client:RetryOptionsbuilds abackon::ExponentialBuilder;TonicErrorHandlerdrives retry delays viaIterator::next()onbackon::ExponentialBackoff. Jitter is enabled whenrandomization_factor > 0(with_jitter()). Long-poll fatal-error grace still uses wall-clock elapsed time viaretry_started_at.temporalio-sdk-core: Poll scaler backoff uses sharedExponentialBuilderconstants aligned withRetryOptions::task_poll_retry_policy()andthrottle_retry_policy(); state resets withbuilder.build()after successful polls.Why?
Fixes #1292. RUSTSEC-2025-0012 reports that
backoffis unmaintained and recommends migrating tobackonfor exponential backoff/retry. Each crate now depends onbackondirectly sosdk-coredoes not pull retry utilities throughclient.Checklist
Closes [Maintenance] Replace unmaintained
backoffcrate withbackon(RUSTSEC-2025-0012) #1292How was this tested:
cargo test -p temporalio-client retry::cargo test -p temporalio-sdk-core autoscaler_applies_backoffAny docs updates needed?
N/A — internal dependency and retry implementation change only; public
RetryOptionsfields are unchanged.