Skip to content

Commit

Permalink
address: ineffectual assignment to upToDate (ineffassign)
Browse files Browse the repository at this point in the history
Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Dec 24, 2023
1 parent ff3aedc commit 004db30
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pkg/controller/plan/adapter/openstack/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -833,13 +833,12 @@ func (r *Client) ensureImageUpToDate(vm *libclient.VM, image *libclient.Image) (
inventoryImage := &model.Image{}
err = r.Context.Source.Inventory.Find(inventoryImage, ref.Ref{ID: image.ID})
if err != nil {
if !errors.As(err, &model.NotFoundError{}) {
return
if errors.As(err, &model.NotFoundError{}) {
err = nil
r.Log.Info("the image does not exist in the inventory, waiting...",
"vm", vm.Name, "image", image.Name, "properties", image.Properties)
}
r.Log.Info("the image does not exist in the inventory, waiting...",
"vm", vm.Name, "image", image.Name, "properties", image.Properties)
upToDate = false
err = nil
return
}
upToDate = true
if _, ok := inventoryImage.Properties[forkliftPropertyOriginalVolumeID]; !ok {
Expand Down

0 comments on commit 004db30

Please sign in to comment.