Fix WAIT task is not working properly (after v3.13.0)#3639
Fix WAIT task is not working properly (after v3.13.0)#3639v1r3n merged 6 commits intoNetflix:mainfrom
Conversation
| ? taskModel.getWaitTimeout() + 1 | ||
| : workflowOffsetTimeout; | ||
| if (taskModel.getTaskType().equals(TaskType.TASK_TYPE_WAIT)) { | ||
| long deltaInSeconds = |
There was a problem hiding this comment.
what happens if the wait task has no timeout? This can happen if the WAIT is configured to wait for an external trigger without a timeout value.
There was a problem hiding this comment.
I didn't take that case into account because it didn't seem to me that the Wait class allowed it, as it requires the use of duration or until. The only way to have a zero timeout is by setting the until parameter to the start of the epoch, January 1, 1970, at 0 hours.
However, I imagine it might be possible in another way that I'm not aware of.
Would you like me to share a code snippet that takes that case into account?
There was a problem hiding this comment.
I'm not sure how to update the code. Should I create another Pull Request?
There was a problem hiding this comment.
I also updated the branch in the same way.
There was a problem hiding this comment.
Hi @yohanyflores , I see that when deltaInSeconds <= 0 shouldn't we mark the postponeDuration to 0 instead of 1 because there is no point in waiting for 1 more second?
There was a problem hiding this comment.
@manan164 Thanks for the change you suggest, you are right!
There was a problem hiding this comment.
@manan164 I updated the branch with the changes and tests.
…g-properly Fix WAIT task is not working properly (after v3.13.0)
Pull Request type
./gradlew generateLock saveLockto refresh dependencies)NOTE: Please remember to run
./gradlew spotlessApplyto fix any format violations.Changes in this PR
Issue #3402
Alternatives considered