-
Notifications
You must be signed in to change notification settings - Fork 246
Adding idempotent label to Tron pods - TRON-2154 #4076
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
base: master
Are you sure you want to change the base?
Conversation
…o u/emanelsabban/TRON-2154
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, i'm not sure if we should document this flag in the paasta RTD or the tron one - https://paasta.readthedocs.io/en/latest/yelpsoa_configs.html#tron-clustername-yaml mentions that we only document paasta-specific stuff...but then we document some tron-only stuff anyway :p
that said: this generally looks good to me - although i'd prefer if more folks from the team would chime in on your proposal doc to make sure we're not just unilaterally picking what we want to do :p
"idempotent": { | ||
"type": "boolean", | ||
"default": false, | ||
"$comment": "This will be used to determine whether the action can be retried without side effects." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to drop:
"$comment": "This will be used to determine whether the action can be retried without side effects." | |
"$comment": If true, this action can be safely retried multiple times without unwanted side-effects." |
@@ -1046,6 +1051,9 @@ def format_tron_action_dict(action_config: TronActionConfig): | |||
limit=63, | |||
suffix=4, | |||
), | |||
"tron.yelp.com/idempotent-action": str( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd personally prefer
"tron.yelp.com/idempotent-action": str( | |
"tron.yelp.com/is-idempontent": str( |
...but i also can't really justify why, so up to you :)
This PR adds a new field in soaconfigs for "idempotent", which will help us identify which Tron actions are idempotent vs which ones are not. It also creates a pod label with its value
Testing
Label set to true for test_load_foo1 job that has it set in soaconfigs
Label set to false for other jobs that dont add idempotent key in soaconfigs