Skip to content

Conversation

@Marpond
Copy link

@Marpond Marpond commented Oct 24, 2025

What changed?
Introduces an abstraction of resetting timers via ResettableTimer in x/resettabletimer.

Why?
Simplifies common timer patterns where timers need to be updated or extended. Previously, we had to manually cancel the existing timer context, handle CanceledError, and create a new timer. With ResettableTimer, a single Reset() call handles this automatically.

How did you test it?
Added workflow unit tests to ensure functional correctness and deterministic replay behavior.

Potential risks
Low risk. Does not alter current timer behavior, only adds a user-friendly interface built on existing timer primitives.

Copy link
Member

@jakobht jakobht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Added a few suggestions.

I think lets put this in the x/resettabletimer package since it's on top of the basic client

@Marpond Marpond force-pushed the master branch 2 times, most recently from 8750ebf to 3b6e271 Compare November 4, 2025 13:06
@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@a709d3c). Learn more about missing BASE report.

Files with missing lines Coverage Δ
x/resettabletimer/resettable_timer.go 100.00% <100.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 a709d3c...8648fd4. Read the comment docs.

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

@Marpond Marpond force-pushed the master branch 2 times, most recently from e599e0b to 0706785 Compare November 6, 2025 09:41
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.

2 participants