-
Notifications
You must be signed in to change notification settings - Fork 63
Update startedAt timestamp only if not set #567
Conversation
Signed-off-by: pmahindrakar-oss <[email protected]>
Signed-off-by: pmahindrakar-oss <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #567 +/- ##
==========================================
+ Coverage 58.46% 59.95% +1.49%
==========================================
Files 168 168
Lines 16154 13216 -2938
==========================================
- Hits 9444 7924 -1520
+ Misses 5871 4453 -1418
Partials 839 839
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Integration tests failing on unrelated changes to this PR. Previous PR's aswell failing on the same issue |
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.
An alternative solution that would fix the existing conditional rather than just add another is to update this line to something like:
if existingTaskPhase != core.TaskExecution_RUNNING.String() && taskExecutionModel.StartedAt == nil {
I am OK with either fix.
@hamersaw the one i implemented i found it more unit testable aswell as since we are using this function at multiple places so wanted to make sure we define the behavior in the function itself to avoid any future calls causing the same regression
I will use the current approach for that reason. Let me know if you disagree |
* Update startedAt timestamp only if not set Signed-off-by: pmahindrakar-oss <[email protected]> * sort imports Signed-off-by: pmahindrakar-oss <[email protected]> --------- Signed-off-by: pmahindrakar-oss <[email protected]>
TL;DR
Updation of the startedAt timestamp for same taskExecution happens in case of map tasks.
So when propeller send the TaskExecutionEvents for each mappedTask, admin records the event and if it finds it to be Running, then calls the addTaskStartedState function which update the startedAt timestamp.
This is fine to do in case of regular task but incase of mapped task, each mappedTask status causes an update to startedAt which is incorrect.
This PR fixes it by guarding it with if the values is not set
Type
Are all requirements met?
Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
Tracking Issue
fixes flyteorg/flyte#3702
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/