Skip to content

Commit

Permalink
fix(vm): do not detect vmclass specification changes if vmclass is no…
Browse files Browse the repository at this point in the history
…t found (#660)

do not detect vmclass specification changes if vmclass is not found

Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat authored Jan 23, 2025
1 parent f4ac772 commit c5a7aeb
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ func (h *SyncKvvmHandler) Handle(ctx context.Context, s state.VirtualMachineStat
if !changes.IsEmpty() {
allChanges.Add(changes.GetAll()...)
}
classChanges := h.detectClassSpecChanges(ctx, &class.Spec, lastClassAppliedSpec)
if !classChanges.IsEmpty() {
allChanges.Add(classChanges.GetAll()...)
classChanged = true
if class != nil {
classChanges := h.detectClassSpecChanges(ctx, &class.Spec, lastClassAppliedSpec)
if !classChanges.IsEmpty() {
allChanges.Add(classChanges.GetAll()...)
classChanged = true
}
}
}

Expand Down

0 comments on commit c5a7aeb

Please sign in to comment.