Skip to content

Commit 907531c

Browse files
committed
fix: skip empty node name in local snapshot info after pause finalization
1 parent c1ab095 commit 907531c

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

cmd/ateapi/internal/controlapi/workflow_pause.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,14 @@ func (s *FinalizePausedStep) Execute(ctx context.Context, input *PauseInput, sta
208208
}
209209
// TODO(dberkov) - what if InProgressSnapshot is empty? That shouldn't be possible.
210210
if latestActor.InProgressSnapshot != "" {
211+
localInfo := &ateapipb.LocalSnapshotInfo{
212+
SnapshotPrefix: latestActor.InProgressSnapshot,
213+
}
214+
if nodeName != "" {
215+
localInfo.NodeVmsWithLocalSnapshots = []string{nodeName}
216+
}
211217
latestActor.LatestSnapshotInfo = &ateapipb.SnapshotInfo{
212-
Data: &ateapipb.SnapshotInfo_Local{
213-
Local: &ateapipb.LocalSnapshotInfo{
214-
SnapshotPrefix: latestActor.InProgressSnapshot,
215-
NodeVmsWithLocalSnapshots: []string{nodeName},
216-
},
217-
},
218+
Data: &ateapipb.SnapshotInfo_Local{Local: localInfo},
218219
}
219220
latestActor.InProgressSnapshot = ""
220221
}

0 commit comments

Comments
 (0)