Skip to content

Fix tronctl retry never timing out with --deps-timeout of a day or more - #1138

Open
bardrop wants to merge 1 commit into
Yelp:masterfrom
bardrop-oss:fix-retry-deps-timeout-one-day
Open

bardrop wants to merge 1 commit into
Yelp:masterfrom
bardrop-oss:fix-retry-deps-timeout-one-day

Conversation

@bardrop

@bardrop bardrop commented Nov 24, 2026

Copy link
Copy Markdown

RetryAction.wait_for_deps() compares self._elapsed.seconds with the timeout. timedelta.seconds leaves out whole days, so it goes back to 0 after 24 hours. With --deps-timeout 1d or more, the loop never ends if the dependencies do not finish, and tronctl retry keeps polling until it is killed.

Both uses are now total_seconds(). int(deps_timeout_s - ...) gives the same value as before for shorter timeouts.

The new test uses a 25 hour timeout with 1 hour polls. Before the fix it asks for a 27th check (25 hourly checks and the final one were expected). tests/commands passes: 83 passed.

wait_for_deps() compared timedelta.seconds, which drops whole days, with
the timeout. It wraps to 0 after 24 hours, so a timeout of one day or
more was never reached.
@bardrop
bardrop requested a review from a team as a code owner November 24, 2026 05:50
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.

1 participant