Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arg to tronctl retry for waiting for dependencies #867

Merged
merged 8 commits into from
Apr 13, 2022

Conversation

kawaiwanyelp
Copy link
Contributor

Description

This PR gives tronctl retry a new option, --wait-for-deps that, if set, will make tronctl wait for all upstream triggers and required actions to complete before attempting to retry a given action. An arg can be passed to the option specifying a timeout, including "infinity" (i.e. never timeout), for how long to wait before giving up.

By default, the behavior of not waiting before retrying is preserved. However, I've made it so that even with the default timeout of 0 (i.e. don't want), we check to make sure all dependencies are done, because the current behavior is to issue a retry, to which the server will respond with an OK, even if the retry will fail anyway because dependencies are not done.

Testing

make test
manual testing on an example cluster, using a job with an action that has both upstream triggers and required actions

Copy link
Member

@nemacysts nemacysts left a comment

Choose a reason for hiding this comment

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

i mostly just have some nits that you can ignore if you'd like - but there are a couple questions in my review comments as well :)

tron/commands/retry.py Outdated Show resolved Hide resolved
bin/tronctl Show resolved Hide resolved
bin/tronctl Show resolved Hide resolved
bin/tronctl Outdated Show resolved Hide resolved
tron/commands/retry.py Show resolved Hide resolved
tron/commands/retry.py Outdated Show resolved Hide resolved
tron/commands/retry.py Outdated Show resolved Hide resolved
tron/commands/retry.py Outdated Show resolved Hide resolved
tron/commands/retry.py Outdated Show resolved Hide resolved
tron/commands/retry.py Outdated Show resolved Hide resolved
@kawaiwanyelp kawaiwanyelp force-pushed the u/kawaiwan/retry-honors-triggers branch 2 times, most recently from 7b6b023 to 5e3a1aa Compare April 12, 2022 20:46
@kawaiwanyelp kawaiwanyelp force-pushed the u/kawaiwan/retry-honors-triggers branch from 5e3a1aa to 169bbde Compare April 12, 2022 20:57
@kawaiwanyelp kawaiwanyelp merged commit 8d7126f into master Apr 13, 2022
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