Skip to content

Commit

Permalink
Augment CreateNodeEvent log message (flyteorg#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
EngHabu authored Dec 20, 2019
1 parent d6cfc58 commit 9a25e38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/manager/impl/node_execution_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ func (m *NodeExecutionManager) updateNodeExecutionWithEvent(
func (m *NodeExecutionManager) CreateNodeEvent(ctx context.Context, request admin.NodeExecutionEventRequest) (
*admin.NodeExecutionEventResponse, error) {
executionID := request.Event.Id.ExecutionId
logger.Debugf(ctx, "Received node execution event for [%+v] transitioning to phase [%v]",
executionID, request.Event.Phase)
logger.Debugf(ctx, "Received node execution event for Node Exec Id [%+v] transitioning to phase [%v], w/ Metadata [%v]",
request.Event.Id, request.Event.Phase, request.Event.ParentTaskMetadata)

_, err := util.GetExecutionModel(ctx, m.db, *executionID)
if err != nil {
Expand All @@ -167,7 +167,6 @@ func (m *NodeExecutionManager) CreateNodeEvent(ctx context.Context, request admi
nodeExecutionModel, err := m.db.NodeExecutionRepo().Get(ctx, repoInterfaces.GetNodeExecutionInput{
NodeExecutionIdentifier: *request.Event.Id,
})
phase := core.NodeExecution_Phase(core.NodeExecution_Phase_value[nodeExecutionModel.Phase])
if err != nil {
if err.(errors.FlyteAdminError).Code() != codes.NotFound {
logger.Debugf(ctx, "Failed to retrieve existing node execution with id [%+v] with err: %v",
Expand All @@ -180,6 +179,7 @@ func (m *NodeExecutionManager) CreateNodeEvent(ctx context.Context, request admi
}
m.metrics.NodeExecutionsCreated.Inc()
} else {
phase := core.NodeExecution_Phase(core.NodeExecution_Phase_value[nodeExecutionModel.Phase])
updateStatus, err := m.updateNodeExecutionWithEvent(ctx, &request, &nodeExecutionModel)
if err != nil {
return nil, err
Expand Down

0 comments on commit 9a25e38

Please sign in to comment.