MCPcopy
hub / github.com/argoproj/argo-workflows / updateAgentPodStatus

Method updateAgentPodStatus

workflow/controller/agent.go:48–54  ·  view source on GitHub ↗
(ctx context.Context, pod *apiv1.Pod)

Source from the content-addressed store, hash-verified

46}
47
48func (woc *wfOperationCtx) updateAgentPodStatus(ctx context.Context, pod *apiv1.Pod) {
49 woc.log.Info(ctx, "updateAgentPodStatus")
50 newPhase, message := assessAgentPodStatus(ctx, pod)
51 if newPhase == wfv1.NodeFailed || newPhase == wfv1.NodeError {
52 woc.markTaskSetNodesError(ctx, fmt.Errorf(`agent pod failed with reason:"%s"`, message))
53 }
54}
55
56func assessAgentPodStatus(ctx context.Context, pod *apiv1.Pod) (wfv1.NodePhase, string) {
57 var newPhase wfv1.NodePhase

Callers 2

podReconciliationMethod · 0.95
reconcileAgentPodMethod · 0.95

Calls 3

markTaskSetNodesErrorMethod · 0.95
assessAgentPodStatusFunction · 0.85
InfoMethod · 0.65

Tested by

no test coverage detected