You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RetryPolicy accepts values that fail later: timedelta durations, fractional counts and huge durations #89
RetryPolicy(base_delay=timedelta(milliseconds=10)) raises TypeError ('<' not supported): client.py validates through seconds() but keeps the unconverted value. With both delays as timedelta, the policy constructs, and every client using it fails at connect with ConfigurationError: must be real number, not datetime.timedelta.
max_attempts=2.5 and Client(batch_concurrency=2.5) pass construction and fail at the first call.
Huge but finite durations pass validation, then panic in the core: timeout=1e20, RetryPolicy(base_delay=1e300, max_delay=1e300) and wait_until_active(timeout=1e19) raise DynamoxyError: internal error: a dynamoxy task panicked (Duration::from_secs_f64 above about 1.8e19 seconds, and Instant + timeout overflow; crates/dynamoxy-core/src/config.rs, retry.rs, client.rs).
Fix: convert durations when validating, require integers for counts, and bound durations (or saturate them) in config.rs.
Found in a review of the library for bugs (fctl session); the fixes that fit in its ten pull requests are #61 to #65, #67 to #70 and #72.
Activity
fix(client): retry policies and client options refuse values that wou…