Skip to content

Commit

Permalink
Fix invalid node lookup on abort/finalize (flyteorg#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
EngHabu committed Jan 14, 2020
1 parent c19abff commit 458d459
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions flytepropeller/pkg/controller/nodes/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ func (c *nodeExecutor) RecursiveNodeHandler(ctx context.Context, w v1alpha1.Exec
}

func (c *nodeExecutor) FinalizeHandler(ctx context.Context, w v1alpha1.ExecutableWorkflow, currentNode v1alpha1.ExecutableNode) error {
nodeStatus := w.GetExecutionStatus().GetNodeExecutionStatus(ctx, currentNode.GetID())
nodeStatus := w.GetNodeExecutionStatus(ctx, currentNode.GetID())

switch nodeStatus.GetPhase() {
case v1alpha1.NodePhaseFailing, v1alpha1.NodePhaseSucceeding, v1alpha1.NodePhaseRetryableFailure:
Expand Down Expand Up @@ -605,7 +605,7 @@ func (c *nodeExecutor) FinalizeHandler(ctx context.Context, w v1alpha1.Executabl
}

func (c *nodeExecutor) AbortHandler(ctx context.Context, w v1alpha1.ExecutableWorkflow, currentNode v1alpha1.ExecutableNode, reason string) error {
nodeStatus := w.GetExecutionStatus().GetNodeExecutionStatus(ctx, currentNode.GetID())
nodeStatus := w.GetNodeExecutionStatus(ctx, currentNode.GetID())

switch nodeStatus.GetPhase() {
case v1alpha1.NodePhaseRunning, v1alpha1.NodePhaseFailing, v1alpha1.NodePhaseSucceeding, v1alpha1.NodePhaseRetryableFailure, v1alpha1.NodePhaseQueued:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ func (e *PluginManager) getPodEffectiveResourceLimits(ctx context.Context, pod *
podRequestedResources[k] = qC
}
}
logger.Infof(ctx, "The resource requirement for creating Pod [%v] is [%v]\n", pod, podRequestedResources)

logger.Infof(ctx, "The resource requirement for creating Pod [%v/%v] is [%v]\n",
pod.Namespace, pod.Name, podRequestedResources)

return podRequestedResources
}
Expand Down

0 comments on commit 458d459

Please sign in to comment.