Skip to content

Commit

Permalink
fix: fixed subscriber startTime issue (#4087)
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Kumar Das <amit.das@harness.io>
  • Loading branch information
amityt committed Jul 13, 2023
1 parent 351d0ba commit b0ba3fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chaoscenter/subscriber/pkg/events/chaosengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func chaosEventHandler(obj interface{}, eventType string, stream chan types.Work
return
}

if workflowObj.ObjectMeta.CreationTimestamp.Unix() < startTime {
if workflowObj.ObjectMeta.CreationTimestamp.UnixMilli() < startTime {
return
}

Expand Down
4 changes: 2 additions & 2 deletions chaoscenter/subscriber/pkg/events/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ func WorkflowEventHandler(workflowObj *v1alpha1.Workflow, eventType string, star
return types.WorkflowEvent{}, nil
}

if workflowObj.ObjectMeta.CreationTimestamp.Unix() < startTime {
return types.WorkflowEvent{}, nil
if workflowObj.ObjectMeta.CreationTimestamp.UnixMilli() < startTime {
return types.WorkflowEvent{}, errors.New("startTime of subscriber is greater than experiment creation timestamp")
}

cfg, err := k8s.GetKubeConfig()
Expand Down

0 comments on commit b0ba3fa

Please sign in to comment.