-
Notifications
You must be signed in to change notification settings - Fork 496
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
Adding total timeout to task #313
base: main
Are you sure you want to change the base?
Adding total timeout to task #313
Conversation
5be9986
to
95851be
Compare
95851be
to
039e8af
Compare
@@ -202,6 +202,9 @@ public boolean isRetriable() { | |||
@ProtoField(id = 42) | |||
private boolean subworkflowChanged; | |||
|
|||
@ProtoField(id = 43) | |||
private long firstStartTime; |
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.
should be added to equals
, hashcode
and toString
?
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.
Actually, I think we should change the hashCode to be aware of the task's PK -- which is taskName. Thoughts @jmigueprieto
/** | ||
* @return the total timeout in seconds | ||
*/ | ||
public long getTotalTimeoutSeconds() { |
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.
equals
& hashCode
?
@@ -142,11 +146,17 @@ public TaskDef(String name, String description) { | |||
this.description = description; | |||
} | |||
|
|||
public TaskDef(String name, String description, int retryCount, long timeoutSeconds) { | |||
public TaskDef( |
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.
Can a new constructor be added instead of changing the signature of this one?
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.
+1
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.
- There are changes to backend and client v4 - split this PR.
- The client changes are breaking changes. Do NOT modify the signature of existing constructors. They might be in use by someone and adding a property should NOT break existing code.
Pull Request type
NOTE: Please remember to run
./gradlew spotlessApply
to fix any format violations.Changes in this PR
Added new parameter total task timeout to taskmodel and task def. This will be useful to timeout task if it exceeds total timeout value (including timeout in retry as well), this PR is only for model changes. Core service changes will be in another PR.
Describe the new behavior from this PR, and why it's needed
Issue #
Alternatives considered
Describe alternative implementation you have considered