-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
get.go
588 lines (537 loc) · 19.2 KB
/
get.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
package commands
import (
"bytes"
"encoding/json"
"fmt"
"log"
"os"
"strings"
"text/tabwriter"
"github.com/argoproj/pkg/errors"
"github.com/argoproj/pkg/humanize"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"sigs.k8s.io/yaml"
"github.com/argoproj/argo-workflows/v3/cmd/argo/commands/client"
workflowpkg "github.com/argoproj/argo-workflows/v3/pkg/apiclient/workflow"
wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
argoutil "github.com/argoproj/argo-workflows/v3/util"
"github.com/argoproj/argo-workflows/v3/util/printer"
"github.com/argoproj/argo-workflows/v3/workflow/util"
)
const onExitSuffix = "onExit"
type getFlags struct {
output string
nodeFieldSelectorString string
// Only used for backwards compatibility
status string
}
func (g getFlags) shouldPrint(node wfv1.NodeStatus) bool {
if g.status != "" {
// Adapt --status to a node field selector for compatibility
if g.nodeFieldSelectorString != "" {
log.Fatalf("cannot use both --status and --node-field-selector")
}
g.nodeFieldSelectorString = statusToNodeFieldSelector(g.status)
}
if g.nodeFieldSelectorString != "" {
selector, err := fields.ParseSelector(g.nodeFieldSelectorString)
if err != nil {
log.Fatalf("selector is invalid: %s", err)
}
return util.SelectorMatchesNode(selector, node)
}
return true
}
func NewGetCommand() *cobra.Command {
var getArgs getFlags
command := &cobra.Command{
Use: "get WORKFLOW...",
Short: "display details about a workflow",
Example: `# Get information about a workflow:
argo get my-wf
# Get the latest workflow:
argo get @latest
`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
cmd.HelpFunc()(cmd, args)
os.Exit(1)
}
ctx, apiClient := client.NewAPIClient()
serviceClient := apiClient.NewWorkflowServiceClient()
namespace := client.Namespace()
for _, name := range args {
wf, err := serviceClient.GetWorkflow(ctx, &workflowpkg.WorkflowGetRequest{
Name: name,
Namespace: namespace,
})
errors.CheckError(err)
printWorkflow(wf, getArgs)
}
},
}
command.Flags().StringVarP(&getArgs.output, "output", "o", "", "Output format. One of: json|yaml|wide")
command.Flags().BoolVar(&noColor, "no-color", false, "Disable colorized output")
command.Flags().BoolVar(&noUtf8, "no-utf8", false, "Use plain 7-bits ascii characters")
command.Flags().StringVar(&getArgs.status, "status", "", "Filter by status (Pending, Running, Succeeded, Skipped, Failed, Error)")
command.Flags().StringVar(&getArgs.nodeFieldSelectorString, "node-field-selector", "", "selector of node to display, eg: --node-field-selector phase=abc")
return command
}
func statusToNodeFieldSelector(status string) string {
return fmt.Sprintf("phase=%s", status)
}
func printWorkflow(wf *wfv1.Workflow, getArgs getFlags) {
switch getArgs.output {
case "name":
fmt.Println(wf.ObjectMeta.Name)
case "json":
outBytes, _ := json.MarshalIndent(wf, "", " ")
fmt.Println(string(outBytes))
case "yaml":
outBytes, _ := yaml.Marshal(wf)
fmt.Print(string(outBytes))
case "wide", "":
fmt.Print(printWorkflowHelper(wf, getArgs))
default:
log.Fatalf("Unknown output format: %s", getArgs.output)
}
}
func printWorkflowHelper(wf *wfv1.Workflow, getArgs getFlags) string {
const fmtStr = "%-20s %v\n"
out := ""
out += fmt.Sprintf(fmtStr, "Name:", wf.ObjectMeta.Name)
out += fmt.Sprintf(fmtStr, "Namespace:", wf.ObjectMeta.Namespace)
serviceAccount := wf.Spec.ServiceAccountName
if serviceAccount == "" {
serviceAccount = "default"
}
out += fmt.Sprintf(fmtStr, "ServiceAccount:", serviceAccount)
out += fmt.Sprintf(fmtStr, "Status:", printer.WorkflowStatus(wf))
if wf.Status.Message != "" {
out += fmt.Sprintf(fmtStr, "Message:", wf.Status.Message)
}
if len(wf.Status.Conditions) > 0 {
out += wf.Status.Conditions.DisplayString(fmtStr, workflowConditionIconMap)
}
out += fmt.Sprintf(fmtStr, "Created:", humanize.Timestamp(wf.ObjectMeta.CreationTimestamp.Time))
if !wf.Status.StartedAt.IsZero() {
out += fmt.Sprintf(fmtStr, "Started:", humanize.Timestamp(wf.Status.StartedAt.Time))
}
if !wf.Status.FinishedAt.IsZero() {
out += fmt.Sprintf(fmtStr, "Finished:", humanize.Timestamp(wf.Status.FinishedAt.Time))
}
if !wf.Status.StartedAt.IsZero() {
out += fmt.Sprintf(fmtStr, "Duration:", humanize.RelativeDuration(wf.Status.StartedAt.Time, wf.Status.FinishedAt.Time))
}
if wf.Status.Phase == wfv1.WorkflowRunning {
if wf.Status.EstimatedDuration > 0 {
out += fmt.Sprintf(fmtStr, "EstimatedDuration:", humanize.Duration(wf.Status.EstimatedDuration.ToDuration()))
}
}
out += fmt.Sprintf(fmtStr, "Progress:", wf.Status.Progress)
if !wf.Status.ResourcesDuration.IsZero() {
out += fmt.Sprintf(fmtStr, "ResourcesDuration:", wf.Status.ResourcesDuration)
}
if len(wf.Spec.Arguments.Parameters) > 0 {
out += fmt.Sprintf(fmtStr, "Parameters:", "")
for _, param := range wf.Spec.Arguments.Parameters {
if param.Value == nil {
continue
}
out += fmt.Sprintf(fmtStr, " "+param.Name+":", *param.Value)
}
}
if wf.Status.Outputs != nil {
if len(wf.Status.Outputs.Parameters) > 0 {
out += fmt.Sprintf(fmtStr, "Output Parameters:", "")
for _, param := range wf.Status.Outputs.Parameters {
out += fmt.Sprintf(fmtStr, " "+param.Name+":", *param.Value)
}
}
if len(wf.Status.Outputs.Artifacts) > 0 {
out += fmt.Sprintf(fmtStr, "Output Artifacts:", "")
for _, art := range wf.Status.Outputs.Artifacts {
if art.S3 != nil {
out += fmt.Sprintf(fmtStr, " "+art.Name+":", art.S3.String())
} else if art.Artifactory != nil {
out += fmt.Sprintf(fmtStr, " "+art.Name+":", art.Artifactory.String())
}
}
}
}
printTree := true
if wf.Status.Nodes == nil {
printTree = false
} else if _, ok := wf.Status.Nodes[wf.ObjectMeta.Name]; !ok {
printTree = false
}
if printTree {
writerBuffer := new(bytes.Buffer)
w := tabwriter.NewWriter(writerBuffer, 0, 0, 2, ' ', 0)
out += "\n"
// apply a dummy FgDefault format to align tab writer with the rest of the columns
if getArgs.output == "wide" {
_, _ = fmt.Fprintf(w, "%s\tTEMPLATE\tPODNAME\tDURATION\tARTIFACTS\tMESSAGE\tRESOURCESDURATION\tNODENAME\n", ansiFormat("STEP", FgDefault))
} else {
_, _ = fmt.Fprintf(w, "%s\tTEMPLATE\tPODNAME\tDURATION\tMESSAGE\n", ansiFormat("STEP", FgDefault))
}
// Convert Nodes to Render Trees
roots := convertToRenderTrees(wf)
// Print main and onExit Trees
mainRoot := roots[wf.ObjectMeta.Name]
if mainRoot == nil {
panic("failed to get the entrypoint node")
}
mainRoot.renderNodes(w, wf, 0, " ", " ", getArgs)
onExitID := wf.NodeID(wf.ObjectMeta.Name + "." + onExitSuffix)
if onExitRoot, ok := roots[onExitID]; ok {
_, _ = fmt.Fprintf(w, "\t\t\t\t\t\n")
onExitRoot.renderNodes(w, wf, 0, " ", " ", getArgs)
}
_ = w.Flush()
out += writerBuffer.String()
}
return out
}
type nodeInfoInterface interface {
getID() string
getNodeStatus(wf *wfv1.Workflow) wfv1.NodeStatus
getStartTime(wf *wfv1.Workflow) metav1.Time
}
type nodeInfo struct {
id string
}
func (n *nodeInfo) getID() string {
return n.id
}
func (n *nodeInfo) getNodeStatus(wf *wfv1.Workflow) wfv1.NodeStatus {
return wf.Status.Nodes[n.id]
}
func (n *nodeInfo) getStartTime(wf *wfv1.Workflow) metav1.Time {
return wf.Status.Nodes[n.id].StartedAt
}
// Interface to represent Nodes in render form types
type renderNode interface {
// Render this renderNode and its children
renderNodes(w *tabwriter.Writer, wf *wfv1.Workflow, depth int, nodePrefix string, childPrefix string, getArgs getFlags)
nodeInfoInterface
}
// Currently this is Pod or Resource Nodes
type executionNode struct {
nodeInfo
}
// Currently this is the step groups or retry nodes
type nonBoundaryParentNode struct {
nodeInfo
children []renderNode // Can be boundaryNode or executionNode
}
// Currently this is the virtual Template node
type boundaryNode struct {
nodeInfo
boundaryContained []renderNode // Can be nonBoundaryParent or executionNode or boundaryNode
}
func isBoundaryNode(node wfv1.NodeType) bool {
return (node == wfv1.NodeTypeDAG) || (node == wfv1.NodeTypeSteps)
}
func isNonBoundaryParentNode(node wfv1.NodeType) bool {
return (node == wfv1.NodeTypeStepGroup) || (node == wfv1.NodeTypeRetry)
}
func isExecutionNode(node wfv1.NodeType) bool {
return (node == wfv1.NodeTypePod) || (node == wfv1.NodeTypeSkipped) || (node == wfv1.NodeTypeSuspend)
}
func insertSorted(wf *wfv1.Workflow, sortedArray []renderNode, item renderNode) []renderNode {
insertTime := item.getStartTime(wf)
var index int
for index = 0; index < len(sortedArray); index++ {
existingItem := sortedArray[index]
t := existingItem.getStartTime(wf)
if insertTime.Before(&t) {
break
} else if insertTime.Equal(&t) {
// If they are equal apply alphabetical order so we
// get some consistent printing
insertName := item.getNodeStatus(wf).DisplayName
equalName := existingItem.getNodeStatus(wf).DisplayName
// If they are both elements of a list (e.g. withParams, withSequence, etc.) order by index number instead of
// alphabetical order
insertIndex := argoutil.RecoverIndexFromNodeName(insertName)
equalIndex := argoutil.RecoverIndexFromNodeName(equalName)
if insertIndex >= 0 && equalIndex >= 0 {
if insertIndex < equalIndex {
break
}
} else {
if insertName < equalName {
break
}
}
}
}
sortedArray = append(sortedArray, nil)
copy(sortedArray[index+1:], sortedArray[index:])
sortedArray[index] = item
return sortedArray
}
// Attach render node n to its parent based on what has been parsed previously
// In some cases add it to list of things that still needs to be attached to parent
// Return if I am a possible root
func attachToParent(wf *wfv1.Workflow, n renderNode,
nonBoundaryParentChildrenMap map[string]*nonBoundaryParentNode, boundaryID string,
boundaryNodeMap map[string]*boundaryNode, parentBoundaryMap map[string][]renderNode) bool {
// Check first if I am a child of a nonBoundaryParent
// that implies I attach to that instead of my boundary. This was already
// figured out in Pass 1
if nonBoundaryParent, ok := nonBoundaryParentChildrenMap[n.getID()]; ok {
nonBoundaryParent.children = insertSorted(wf, nonBoundaryParent.children, n)
return false
}
// If I am not attached to a nonBoundaryParent and I have no Boundary ID then
// I am a possible root
if boundaryID == "" {
return true
}
if parentBoundary, ok := boundaryNodeMap[boundaryID]; ok {
parentBoundary.boundaryContained = insertSorted(wf, parentBoundary.boundaryContained, n)
} else {
// put ourselves to be added by the parent when we get to it later
if _, ok := parentBoundaryMap[boundaryID]; !ok {
parentBoundaryMap[boundaryID] = make([]renderNode, 0)
}
parentBoundaryMap[boundaryID] = append(parentBoundaryMap[boundaryID], n)
}
return false
}
// This takes the map of NodeStatus and converts them into a forrest
// of trees of renderNodes and returns the set of roots for each tree
func convertToRenderTrees(wf *wfv1.Workflow) map[string]renderNode {
renderTreeRoots := make(map[string]renderNode)
// Used to store all boundary nodes so future render children can attach
// Maps node Name -> *boundaryNode
boundaryNodeMap := make(map[string]*boundaryNode)
// Used to store children of a boundary node that has not been parsed yet
// Maps boundary Node name -> array of render Children
parentBoundaryMap := make(map[string][]renderNode)
// Used to store Non Boundary Parent nodes so render children can attach
// Maps non Boundary Parent Node name -> *nonBoundaryParentNode
nonBoundaryParentMap := make(map[string]*nonBoundaryParentNode)
// Used to store children which have a Non Boundary Parent from rendering perspective
// Maps non Boundary render Children name -> *nonBoundaryParentNode
nonBoundaryParentChildrenMap := make(map[string]*nonBoundaryParentNode)
// We have to do a 2 pass approach because anything that is a child
// of a nonBoundaryParent and also has a boundaryID we may not know which
// parent to attach to if we didn't see the nonBoundaryParent earlier
// in a 1 pass strategy
// 1st Pass Process enough of nonBoundaryParent nodes to know all their children
for id, status := range wf.Status.Nodes {
if status.Type == "" {
log.Fatal("Missing node type in status node. Cannot get workflows created with Argo <= 2.0 using the default or wide output option.")
return nil
}
if isNonBoundaryParentNode(status.Type) {
n := nonBoundaryParentNode{nodeInfo: nodeInfo{id: id}}
nonBoundaryParentMap[id] = &n
for _, child := range status.Children {
nonBoundaryParentChildrenMap[child] = &n
}
}
}
// 2nd Pass process everything
for id, status := range wf.Status.Nodes {
switch {
case isBoundaryNode(status.Type):
n := boundaryNode{nodeInfo: nodeInfo{id: id}}
boundaryNodeMap[id] = &n
// Attach to my parent if needed
if attachToParent(wf, &n, nonBoundaryParentChildrenMap,
status.BoundaryID, boundaryNodeMap, parentBoundaryMap) {
renderTreeRoots[n.getID()] = &n
}
// Attach nodes who are in my boundary already seen before me to me
for _, val := range parentBoundaryMap[id] {
n.boundaryContained = insertSorted(wf, n.boundaryContained, val)
}
case isNonBoundaryParentNode(status.Type):
nPtr, ok := nonBoundaryParentMap[id]
if !ok {
log.Fatal("Unable to lookup node " + id)
return nil
}
// Attach to my parent if needed
if attachToParent(wf, nPtr, nonBoundaryParentChildrenMap,
status.BoundaryID, boundaryNodeMap, parentBoundaryMap) {
renderTreeRoots[nPtr.getID()] = nPtr
}
// All children attach directly to the nonBoundaryParents since they are already created
// in pass 1 so no need to do that here
case isExecutionNode(status.Type):
n := executionNode{nodeInfo: nodeInfo{id: id}}
// Attach to my parent if needed
if attachToParent(wf, &n, nonBoundaryParentChildrenMap,
status.BoundaryID, boundaryNodeMap, parentBoundaryMap) {
renderTreeRoots[n.getID()] = &n
}
// Execution nodes don't have other render nodes as children
}
}
return renderTreeRoots
}
// This function decides if a Node will be filtered from rendering and returns
// two things. First argument tells if the node is filtered and second argument
// tells whether the children need special indentation due to filtering
// Return Values: (is node filtered, do children need special indent)
func filterNode(node wfv1.NodeStatus, getArgs getFlags) (bool, bool) {
if node.Type == wfv1.NodeTypeRetry && len(node.Children) == 1 {
return true, false
} else if node.Type == wfv1.NodeTypeStepGroup {
return true, true
} else if node.Type == wfv1.NodeTypeSkipped && node.Phase == wfv1.NodeOmitted {
return true, false
} else if !getArgs.shouldPrint(node) {
return true, false
}
return false, false
}
// Render the child of a given node based on information about the parent such as:
// whether it was filtered and does this child need special indent
func renderChild(w *tabwriter.Writer, wf *wfv1.Workflow, nInfo renderNode, depth int,
nodePrefix string, childPrefix string, parentFiltered bool,
childIndex int, maxIndex int, childIndent bool, getArgs getFlags) {
var part, subp string
if noUtf8 {
if parentFiltered && childIndent {
if maxIndex == 0 {
part = "--"
subp = " "
} else if childIndex == 0 {
part = "+-"
subp = "| "
} else if childIndex == maxIndex {
part = "`-"
subp = " "
} else {
part = "|-"
subp = "| "
}
} else if !parentFiltered {
if childIndex == maxIndex {
part = "`-"
subp = " "
} else {
part = "|-"
subp = "| "
}
}
} else {
if parentFiltered && childIndent {
if maxIndex == 0 {
part = "──"
subp = " "
} else if childIndex == 0 {
part = "┬─"
subp = "│ "
} else if childIndex == maxIndex {
part = "└─"
subp = " "
} else {
part = "├─"
subp = "│ "
}
} else if !parentFiltered {
if childIndex == maxIndex {
part = "└─"
subp = " "
} else {
part = "├─"
subp = "│ "
}
}
}
var childNodePrefix, childChldPrefix string
if !parentFiltered {
depth = depth + 1
childNodePrefix = childPrefix + part
childChldPrefix = childPrefix + subp
} else {
if childIndex == 0 {
childNodePrefix = nodePrefix + part
} else {
childNodePrefix = childPrefix + part
}
childChldPrefix = childPrefix + subp
}
nInfo.renderNodes(w, wf, depth, childNodePrefix, childChldPrefix, getArgs)
}
// Main method to print information of node in get
func printNode(w *tabwriter.Writer, node wfv1.NodeStatus, nodePrefix string, getArgs getFlags) {
nodeName := fmt.Sprintf("%s %s", jobStatusIconMap[node.Phase], node.DisplayName)
if node.IsActiveSuspendNode() {
nodeName = fmt.Sprintf("%s %s", nodeTypeIconMap[node.Type], node.DisplayName)
}
templateName := ""
if node.TemplateRef != nil {
templateName = fmt.Sprintf("%s/%s", node.TemplateRef.Name, node.TemplateRef.Template)
} else if node.TemplateName != "" {
templateName = node.TemplateName
}
var args []interface{}
duration := humanize.RelativeDurationShort(node.StartedAt.Time, node.FinishedAt.Time)
if node.Type == wfv1.NodeTypePod {
args = []interface{}{nodePrefix, nodeName, templateName, node.ID, duration, node.Message, ""}
} else {
args = []interface{}{nodePrefix, nodeName, templateName, "", "", node.Message, ""}
}
if getArgs.output == "wide" {
msg := args[len(args)-2]
args[len(args)-2] = getArtifactsString(node)
args[len(args)-1] = msg
args = append(args, node.ResourcesDuration, "")
if node.Type == wfv1.NodeTypePod {
args[len(args)-1] = node.HostNodeName
}
_, _ = fmt.Fprintf(w, "%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", args...)
} else {
_, _ = fmt.Fprintf(w, "%s%s\t%s\t%s\t%s\t%s\t%s\n", args...)
}
}
// renderNodes for each renderNode Type
// boundaryNode
func (nodeInfo *boundaryNode) renderNodes(w *tabwriter.Writer, wf *wfv1.Workflow, depth int, nodePrefix string, childPrefix string, getArgs getFlags) {
filtered, childIndent := filterNode(nodeInfo.getNodeStatus(wf), getArgs)
if !filtered {
printNode(w, nodeInfo.getNodeStatus(wf), nodePrefix, getArgs)
}
for i, nInfo := range nodeInfo.boundaryContained {
renderChild(w, wf, nInfo, depth, nodePrefix, childPrefix, filtered, i,
len(nodeInfo.boundaryContained)-1, childIndent, getArgs)
}
}
// nonBoundaryParentNode
func (nodeInfo *nonBoundaryParentNode) renderNodes(w *tabwriter.Writer, wf *wfv1.Workflow, depth int, nodePrefix string, childPrefix string, getArgs getFlags) {
filtered, childIndent := filterNode(nodeInfo.getNodeStatus(wf), getArgs)
if !filtered {
printNode(w, nodeInfo.getNodeStatus(wf), nodePrefix, getArgs)
}
for i, nInfo := range nodeInfo.children {
renderChild(w, wf, nInfo, depth, nodePrefix, childPrefix, filtered, i,
len(nodeInfo.children)-1, childIndent, getArgs)
}
}
// executionNode
func (nodeInfo *executionNode) renderNodes(w *tabwriter.Writer, wf *wfv1.Workflow, _ int, nodePrefix string, _ string, getArgs getFlags) {
filtered, _ := filterNode(nodeInfo.getNodeStatus(wf), getArgs)
if !filtered {
printNode(w, nodeInfo.getNodeStatus(wf), nodePrefix, getArgs)
}
}
func getArtifactsString(node wfv1.NodeStatus) string {
if node.Outputs == nil {
return ""
}
var artNames []string
for _, art := range node.Outputs.Artifacts {
artNames = append(artNames, art.Name)
}
return strings.Join(artNames, ",")
}