Upgrading retriable 2 to 3
Breaking2.1.0 → 3.8.0Breaking1Platform1Deprecated1New3Fixed8Other5
Fetching 17 releases from GitHub…11 / 17
BreakingUpgrade verdict
1 breaking change and a platform requirement change.
In plain terms
- The old way of temporarily changing retry settings is gone. You now wrap the code in a block, and the previous settings come back automatically when the block finishes. Settings also no longer leak between threads.
- You need Ruby version 2.3 or newer to use this release.
- The `timeout:` setting still works the same way, but it now prints a warning because it will be removed in version 4.0. Use your library's own timeout settings or wrap the retried code in `Timeout.timeout(...)` instead.
Must act 3 items need code or config changes
Ruby requirement changed in 3.2.0: >= 1.9.3 → >= 2.3.0.
What you must change
Breaking1
Removes Retriable.override and Retriable.reset_override in favor of block-scoped, thread-local Retriable.with_override(opts) { ... }.
Retriable.overrideRetriable.reset_overrideRetriable.with_overridePlatform1
Requires Ruby 2.3 or later.
Deprecations to plan for
Deprecated1
Deprecates the
timeout: option ahead of its removal in Retriable 4.0, emitting a warning while keeping behavior unchanged.timeout:Retriable.configureRetriable.retriableRetriable.with_overrideKernel.warnWarning[:deprecated]Warning.warnTimeout.timeoutAPI changes
Generated by DepDelta from published Ruby source. Not mixed with prose notes.
- removed:
property Retriable.config: reader - changed:
method Retriable.config() → static method Retriable.config() - changed:
method Retriable.retriable(_ = …) → static method Retriable.retriable(_ = …) - added:
const Retriable.OVERRIDE_THREAD_KEY - added:
method Kernel.retriable_with_context(_, _ = …) - added:
static method Retriable.apply_override_options(_, _) - added:
static method Retriable.available_contexts() - added:
static method Retriable.call_on_retry(_, _, _, _, _) - added:
static method Retriable.call_with_timeout(_, _) - added:
static method Retriable.can_retry?(_, _, _, _, _) - added:
static method Retriable.config_contexts() - added:
static method Retriable.context_options_for(_, _) - added:
static method Retriable.current_override() - added:
static method Retriable.execute_tries(max_tries:, interval_for:, timeout:, exception_list:, on:, retry_if:, on_retry:, elapsed_time:, max_elapsed_time:, sleep_disabled:) - added:
static method Retriable.hash_exception_match?(_, _, _) - added:
static method Retriable.interval_provider(_) - added:
static method Retriable.override_contexts() - added:
static method Retriable.retriable_exception?(_, _, _, _) - added:
static method Retriable.retry_plan(_) - added:
static method Retriable.validate_context_override_options(_, _) - added:
static method Retriable.validate_override_options(_) - added:
static method Retriable.with_context(_, _ = …) - added:
static method Retriable.with_override(_ = …)
- removed:
property Config.base_interval: accessor - removed:
property Config.intervals: accessor - removed:
property Config.max_elapsed_time: accessor - removed:
property Config.max_interval: accessor - removed:
property Config.multiplier: accessor - removed:
property Config.on: accessor - removed:
property Config.on_retry: accessor - removed:
property Config.rand_factor: accessor - removed:
property Config.sleep_disabled: accessor - removed:
property Config.timeout: accessor - removed:
property Config.tries: accessor - removed:
property ExponentialBackoff.base_interval: accessor - removed:
property ExponentialBackoff.max_interval: accessor - removed:
property ExponentialBackoff.multiplier: accessor - removed:
property ExponentialBackoff.rand_factor: accessor - removed:
property ExponentialBackoff.tries: accessor - changed:
constructor Config() → constructor Config(_ = …) - added:
const Config.ATTRIBUTES - added:
const ExponentialBackoff.ATTRIBUTES - added:
method Config.to_h() - added:
method Config.validate!() - added:
method ExponentialBackoff.interval_provider() - added:
module Validation - added:
static method Validation.unbounded_tries?(_) - added:
static property Config.timeout_deprecation_warned: accessor