@@ -46,7 +46,7 @@ func TestReportMetrics_NoCompletedNode_NoOP(t *testing.T) {
46
46
},
47
47
Status : workflowapi.WorkflowStatus {
48
48
Nodes : map [string ]workflowapi.NodeStatus {
49
- "node-1" : workflowapi. NodeStatus {
49
+ "node-1" : {
50
50
ID : "node-1" ,
51
51
TemplateName : "template-1" ,
52
52
Phase : workflowapi .NodeRunning ,
@@ -72,7 +72,7 @@ func TestReportMetrics_NoRunID_NoOP(t *testing.T) {
72
72
},
73
73
Status : workflowapi.WorkflowStatus {
74
74
Nodes : map [string ]workflowapi.NodeStatus {
75
- "node-1" : workflowapi. NodeStatus {
75
+ "node-1" : {
76
76
ID : "node-1" ,
77
77
Phase : workflowapi .NodeSucceeded ,
78
78
},
@@ -99,7 +99,7 @@ func TestReportMetrics_NoArtifact_NoOP(t *testing.T) {
99
99
},
100
100
Status : workflowapi.WorkflowStatus {
101
101
Nodes : map [string ]workflowapi.NodeStatus {
102
- "node-1" : workflowapi. NodeStatus {
102
+ "node-1" : {
103
103
ID : "node-1" ,
104
104
TemplateName : "template-1" ,
105
105
Phase : workflowapi .NodeSucceeded ,
@@ -127,7 +127,7 @@ func TestReportMetrics_NoMetricsArtifact_NoOP(t *testing.T) {
127
127
},
128
128
Status : workflowapi.WorkflowStatus {
129
129
Nodes : map [string ]workflowapi.NodeStatus {
130
- "node-1" : workflowapi. NodeStatus {
130
+ "node-1" : {
131
131
ID : "node-1" ,
132
132
TemplateName : "template-1" ,
133
133
Phase : workflowapi .NodeSucceeded ,
@@ -156,7 +156,7 @@ func TestReportMetrics_Succeed(t *testing.T) {
156
156
},
157
157
Status : workflowapi.WorkflowStatus {
158
158
Nodes : map [string ]workflowapi.NodeStatus {
159
- "node-1" : workflowapi. NodeStatus {
159
+ "node-1" : {
160
160
ID : "node-1" ,
161
161
TemplateName : "template-1" ,
162
162
Phase : workflowapi .NodeSucceeded ,
@@ -220,7 +220,7 @@ func TestReportMetrics_EmptyArchive_Fail(t *testing.T) {
220
220
},
221
221
Status : workflowapi.WorkflowStatus {
222
222
Nodes : map [string ]workflowapi.NodeStatus {
223
- "node-1" : workflowapi. NodeStatus {
223
+ "node-1" : {
224
224
ID : "node-1" ,
225
225
TemplateName : "template-1" ,
226
226
Phase : workflowapi .NodeSucceeded ,
@@ -262,7 +262,7 @@ func TestReportMetrics_MultipleFilesInArchive_Fail(t *testing.T) {
262
262
},
263
263
Status : workflowapi.WorkflowStatus {
264
264
Nodes : map [string ]workflowapi.NodeStatus {
265
- "node-1" : workflowapi. NodeStatus {
265
+ "node-1" : {
266
266
ID : "MY_NAME-template-1-1" ,
267
267
TemplateName : "template-1" ,
268
268
Phase : workflowapi .NodeSucceeded ,
@@ -306,7 +306,7 @@ func TestReportMetrics_InvalidMetricsJSON_Fail(t *testing.T) {
306
306
},
307
307
Status : workflowapi.WorkflowStatus {
308
308
Nodes : map [string ]workflowapi.NodeStatus {
309
- "node-1" : workflowapi. NodeStatus {
309
+ "node-1" : {
310
310
ID : "node-1" ,
311
311
TemplateName : "template-1" ,
312
312
Phase : workflowapi .NodeSucceeded ,
@@ -349,15 +349,15 @@ func TestReportMetrics_InvalidMetricsJSON_PartialFail(t *testing.T) {
349
349
},
350
350
Status : workflowapi.WorkflowStatus {
351
351
Nodes : map [string ]workflowapi.NodeStatus {
352
- "node-1" : workflowapi. NodeStatus {
352
+ "node-1" : {
353
353
ID : "node-1" ,
354
354
TemplateName : "template-1" ,
355
355
Phase : workflowapi .NodeSucceeded ,
356
356
Outputs : & workflowapi.Outputs {
357
357
Artifacts : []workflowapi.Artifact {{Name : "mlpipeline-metrics" }},
358
358
},
359
359
},
360
- "node-2" : workflowapi. NodeStatus {
360
+ "node-2" : {
361
361
ID : "node-2" ,
362
362
TemplateName : "template-2" ,
363
363
Phase : workflowapi .NodeSucceeded ,
@@ -400,12 +400,12 @@ func TestReportMetrics_InvalidMetricsJSON_PartialFail(t *testing.T) {
400
400
expectedMetricsRequest := & api.ReportRunMetricsRequest {
401
401
RunId : "run-1" ,
402
402
Metrics : []* api.RunMetric {
403
- & api. RunMetric {
403
+ {
404
404
Name : "accuracy" ,
405
405
NodeId : "MY_NAME-template-2-2" ,
406
406
Value : & api.RunMetric_NumberValue {NumberValue : 0.77 },
407
407
},
408
- & api. RunMetric {
408
+ {
409
409
Name : "logloss" ,
410
410
NodeId : "MY_NAME-template-2-2" ,
411
411
Value : & api.RunMetric_NumberValue {NumberValue : 1.2 },
@@ -432,7 +432,7 @@ func TestReportMetrics_CorruptedArchiveFile_Fail(t *testing.T) {
432
432
},
433
433
Status : workflowapi.WorkflowStatus {
434
434
Nodes : map [string ]workflowapi.NodeStatus {
435
- "node-1" : workflowapi. NodeStatus {
435
+ "node-1" : {
436
436
ID : "node-1" ,
437
437
TemplateName : "template-1" ,
438
438
Phase : workflowapi .NodeSucceeded ,
@@ -473,7 +473,7 @@ func TestReportMetrics_MultiplMetricErrors_TransientErrowWin(t *testing.T) {
473
473
},
474
474
Status : workflowapi.WorkflowStatus {
475
475
Nodes : map [string ]workflowapi.NodeStatus {
476
- "node-1" : workflowapi. NodeStatus {
476
+ "node-1" : {
477
477
ID : "node-1" ,
478
478
TemplateName : "template-1" ,
479
479
Phase : workflowapi .NodeSucceeded ,
@@ -498,19 +498,19 @@ func TestReportMetrics_MultiplMetricErrors_TransientErrowWin(t *testing.T) {
498
498
})
499
499
pipelineFake .StubReportRunMetrics (& api.ReportRunMetricsResponse {
500
500
Results : []* api.ReportRunMetricsResponse_ReportRunMetricResult {
501
- & api. ReportRunMetricsResponse_ReportRunMetricResult {
501
+ {
502
502
MetricNodeId : "node-1" ,
503
503
MetricName : "accuracy" ,
504
504
Status : api .ReportRunMetricsResponse_ReportRunMetricResult_OK ,
505
505
},
506
506
// Invalid argument error triggers permanent error
507
- & api. ReportRunMetricsResponse_ReportRunMetricResult {
507
+ {
508
508
MetricNodeId : "node-1" ,
509
509
MetricName : "log loss" ,
510
510
Status : api .ReportRunMetricsResponse_ReportRunMetricResult_INVALID_ARGUMENT ,
511
511
},
512
512
// Internal error triggers transient error
513
- & api. ReportRunMetricsResponse_ReportRunMetricResult {
513
+ {
514
514
MetricNodeId : "node-1" ,
515
515
MetricName : "accuracy" ,
516
516
Status : api .ReportRunMetricsResponse_ReportRunMetricResult_INTERNAL_ERROR ,
@@ -537,7 +537,7 @@ func TestReportMetrics_Unauthorized(t *testing.T) {
537
537
},
538
538
Status : workflowapi.WorkflowStatus {
539
539
Nodes : map [string ]workflowapi.NodeStatus {
540
- "node-1" : workflowapi. NodeStatus {
540
+ "node-1" : {
541
541
ID : "node-1" ,
542
542
TemplateName : "template-1" ,
543
543
Phase : workflowapi .NodeSucceeded ,
0 commit comments