File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
test/infrastructure/docker/internal/controllers/backends/inmemory Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,32 @@ var (
75
75
)
76
76
77
77
func updateNodeProvisionedTime (machine * infrav1.DevMachine ) {
78
+ klog .Infof ("DEBUG: machineName: %s" , machine .Name )
79
+
80
+ // current status structure
78
81
for i := range machine .Status .Conditions {
82
+ klog .Infof ("DEBUG: current status structure, found %d conditions" , len (machine .Status .Conditions ))
79
83
if machine .Status .Conditions [i ].Type == string (infrav1 .NodeProvisionedCondition ) {
84
+ klog .Infof ("DEBUG: NodeProvisionedCondition in current status structure, updating LastTransitionTime" )
80
85
machine .Status .Conditions [i ].LastTransitionTime = metav1 .Now ()
81
- break
86
+ return
82
87
}
83
88
}
89
+
90
+ // deprecated status structure
91
+ if machine .Status .Deprecated != nil && machine .Status .Deprecated .V1Beta1 != nil {
92
+ klog .Infof ("DEBUG: deprecated status structure, found %d conditions" , len (machine .Status .Deprecated .V1Beta1 .Conditions ))
93
+ for i := range machine .Status .Deprecated .V1Beta1 .Conditions {
94
+ klog .Infof ("DEBUG: Checking condition type: %s" , machine .Status .Deprecated .V1Beta1 .Conditions [i ].Type )
95
+ if machine .Status .Deprecated .V1Beta1 .Conditions [i ].Type == infrav1 .NodeProvisionedCondition {
96
+ klog .Infof ("DEBUG: NodeProvisionedCondition in deprecated status structure, updating LastTransitionTime" )
97
+ machine .Status .Deprecated .V1Beta1 .Conditions [i ].LastTransitionTime = metav1 .Now ()
98
+ return
99
+ }
100
+ }
101
+ }
102
+
103
+ klog .Infof ("DEBUG: NodeProvisionedCondition not found in status structure for machine %s" , machine .Name )
84
104
}
85
105
86
106
func init () {
You can’t perform that action at this time.
0 commit comments