From 458d45936f6660f2e06427fcaafedad1ee8970eb Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Mon, 13 Jan 2020 18:49:42 -0800 Subject: [PATCH] Fix invalid node lookup on abort/finalize (#56) --- flytepropeller/pkg/controller/nodes/executor.go | 4 ++-- .../pkg/controller/nodes/task/k8s/plugin_manager.go | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/flytepropeller/pkg/controller/nodes/executor.go b/flytepropeller/pkg/controller/nodes/executor.go index 3079060e2d..73c069db35 100644 --- a/flytepropeller/pkg/controller/nodes/executor.go +++ b/flytepropeller/pkg/controller/nodes/executor.go @@ -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: @@ -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: diff --git a/flytepropeller/pkg/controller/nodes/task/k8s/plugin_manager.go b/flytepropeller/pkg/controller/nodes/task/k8s/plugin_manager.go index 8d364008a6..7e4c49dddd 100644 --- a/flytepropeller/pkg/controller/nodes/task/k8s/plugin_manager.go +++ b/flytepropeller/pkg/controller/nodes/task/k8s/plugin_manager.go @@ -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 }