Skip to content

Conversation

@AhmedSoliman
Copy link
Contributor

@AhmedSoliman AhmedSoliman commented Sep 4, 2025

@github-actions
Copy link

github-actions bot commented Sep 4, 2025

Test Results

  7 files  ±0    7 suites  ±0   2m 42s ⏱️ -4s
 52 tests ±0   51 ✅ ±0  1 💤 ±0  0 ❌ ±0 
213 runs  ±0  210 ✅ ±0  3 💤 ±0  0 ❌ ±0 

Results for commit ea7c6b3. ± Comparison against base commit 7048a51.

♻️ This comment has been updated with latest results.

Introduces a crate for time utilities (`serde-time-util`). The crate currently provides a trait `DurationExt` which provides a `friendly()` method for formatting a `Duration` as a human-readable string. It also allows parsing a human-friendly duration into a string.


Additionally, this removes the helpers from `DurationString` and keeps `restate-serde-util`'s DurationString as a serialization helper only.

Minor but relevant changes:
- Fixed parsing "0" as a duration. Previously, it was required to write "0s" to parse a zero duration.
- Some debug traces that reported the response latency now use the `to_seconds_span()` since it's cheaper to compute.
- Fixed typos in restate CLI service config commands
- More efficient serialization for DurationString that avoids an extra String allocation.
- Used jiff's native span rounding feature to round a duration to "days" instead of the manual calculation.
- Added a `negated()` method to the time span types to support "ago" formatting.
- Migrateed all uses of `DurationString` to `DurationExt::friendly()` including in CLI argument parsing.
@AhmedSoliman AhmedSoliman merged commit 3447c6d into main Sep 5, 2025
16 checks passed
@AhmedSoliman AhmedSoliman deleted the pr3743 branch September 5, 2025 14:35
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants