@@ -123,6 +123,7 @@ func (p *stepProcessor) Run(ctx context.Context, namespacer namespacer.Namespace
123
123
if ! cleaner .Empty () {
124
124
cleanupReport := & model.OperationReport {
125
125
Name : "cleanup" ,
126
+ Type : model .OperationTypeDelete ,
126
127
StartTime : time .Now (),
127
128
}
128
129
if errs := cleaner .Run (ctx ); len (errs ) != 0 {
@@ -402,6 +403,7 @@ func (p *stepProcessor) applyOperation(id int, namespacer namespacer.Namespacer,
402
403
Id : id ,
403
404
ResourceId : i + 1 ,
404
405
},
406
+ model .OperationTypeApply ,
405
407
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
406
408
timeout := timeout .Get (op .Timeout , p .timeouts .Apply .Duration )
407
409
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -448,6 +450,7 @@ func (p *stepProcessor) assertOperation(id int, namespacer namespacer.Namespacer
448
450
Id : id ,
449
451
ResourceId : i + 1 ,
450
452
},
453
+ model .OperationTypeAssert ,
451
454
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
452
455
timeout := timeout .Get (op .Timeout , p .timeouts .Assert .Duration )
453
456
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -483,6 +486,7 @@ func (p *stepProcessor) commandOperation(id int, namespacer namespacer.Namespace
483
486
OperationInfo {
484
487
Id : id ,
485
488
},
489
+ model .OperationTypeCommand ,
486
490
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
487
491
timeout := timeout .Get (op .Timeout , p .timeouts .Exec .Duration )
488
492
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -524,6 +528,7 @@ func (p *stepProcessor) createOperation(id int, namespacer namespacer.Namespacer
524
528
Id : id ,
525
529
ResourceId : i + 1 ,
526
530
},
531
+ model .OperationTypeCreate ,
527
532
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
528
533
timeout := timeout .Get (op .Timeout , p .timeouts .Apply .Duration )
529
534
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -583,6 +588,7 @@ func (p *stepProcessor) deleteOperation(id int, namespacer namespacer.Namespacer
583
588
Id : id ,
584
589
ResourceId : i + 1 ,
585
590
},
591
+ model .OperationTypeDelete ,
586
592
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
587
593
timeout := timeout .Get (op .Timeout , p .timeouts .Delete .Duration )
588
594
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -620,6 +626,7 @@ func (p *stepProcessor) describeOperation(id int, namespacer namespacer.Namespac
620
626
OperationInfo {
621
627
Id : id ,
622
628
},
629
+ model .OperationTypeCommand ,
623
630
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
624
631
timeout := timeout .Get (op .Timeout , p .timeouts .Exec .Duration )
625
632
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -667,6 +674,7 @@ func (p *stepProcessor) errorOperation(id int, namespacer namespacer.Namespacer,
667
674
Id : id ,
668
675
ResourceId : i + 1 ,
669
676
},
677
+ model .OperationTypeError ,
670
678
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
671
679
timeout := timeout .Get (op .Timeout , p .timeouts .Error .Duration )
672
680
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -702,6 +710,7 @@ func (p *stepProcessor) getOperation(id int, namespacer namespacer.Namespacer, o
702
710
OperationInfo {
703
711
Id : id ,
704
712
},
713
+ model .OperationTypeCommand ,
705
714
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
706
715
timeout := timeout .Get (op .Timeout , p .timeouts .Exec .Duration )
707
716
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -744,6 +753,7 @@ func (p *stepProcessor) logsOperation(id int, namespacer namespacer.Namespacer,
744
753
OperationInfo {
745
754
Id : id ,
746
755
},
756
+ model .OperationTypeCommand ,
747
757
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
748
758
timeout := timeout .Get (op .Timeout , p .timeouts .Exec .Duration )
749
759
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -794,6 +804,7 @@ func (p *stepProcessor) patchOperation(id int, namespacer namespacer.Namespacer,
794
804
Id : id ,
795
805
ResourceId : i + 1 ,
796
806
},
807
+ model .OperationTypePatch ,
797
808
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
798
809
timeout := timeout .Get (op .Timeout , p .timeouts .Apply .Duration )
799
810
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -832,6 +843,7 @@ func (p *stepProcessor) proxyOperation(id int, namespacer namespacer.Namespacer,
832
843
OperationInfo {
833
844
Id : id ,
834
845
},
846
+ model .OperationTypeCommand ,
835
847
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
836
848
timeout := timeout .Get (op .Timeout , p .timeouts .Exec .Duration )
837
849
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -874,6 +886,7 @@ func (p *stepProcessor) scriptOperation(id int, namespacer namespacer.Namespacer
874
886
OperationInfo {
875
887
Id : id ,
876
888
},
889
+ model .OperationTypeScript ,
877
890
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
878
891
timeout := timeout .Get (op .Timeout , p .timeouts .Exec .Duration )
879
892
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -903,6 +916,7 @@ func (p *stepProcessor) sleepOperation(id int, op v1alpha1.Sleep) operation {
903
916
OperationInfo {
904
917
Id : id ,
905
918
},
919
+ model .OperationTypeSleep ,
906
920
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
907
921
return opsleep .New (op ), nil , tc , nil
908
922
},
@@ -926,6 +940,7 @@ func (p *stepProcessor) updateOperation(id int, namespacer namespacer.Namespacer
926
940
Id : id ,
927
941
ResourceId : i + 1 ,
928
942
},
943
+ model .OperationTypeUpdate ,
929
944
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
930
945
timeout := timeout .Get (op .Timeout , p .timeouts .Apply .Duration )
931
946
if tc , _ , err := setupContextData (ctx , tc , contextData {
@@ -964,6 +979,7 @@ func (p *stepProcessor) waitOperation(id int, namespacer namespacer.Namespacer,
964
979
OperationInfo {
965
980
Id : id ,
966
981
},
982
+ model .OperationTypeCommand ,
967
983
func (ctx context.Context , tc engine.Context ) (operations.Operation , * time.Duration , engine.Context , error ) {
968
984
// make sure timeout is set to populate the command flag
969
985
op .Timeout = & metav1.Duration {Duration : * timeout .Get (op .Timeout , p .timeouts .Exec .Duration )}
0 commit comments