Skip to content

Commit

Permalink
Remove the user-facing spinner while trying to remove remote resource…
Browse files Browse the repository at this point in the history
…s not present in Devfile

Replace with a klog message, as the spinner does not add much value to the end user.

Plus, it keeps displaying because we are regenerating the adapter which calls this function indefinitely.
  • Loading branch information
rm3l committed Mar 14, 2023
1 parent cc3003c commit afbd4d6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/devfile/adapters/kubernetes/component/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,8 @@ func (a Adapter) deleteRemoteResources(objectsToRemove []unstructured.Unstructur
resources = append(resources, fmt.Sprintf("%s/%s", u.GetKind(), u.GetName()))
}

spinner := log.Spinnerf("Deleting resources not present in the Devfile: %s", strings.Join(resources, ", "))
defer spinner.End(false)

// Delete the resources present on the cluster but not in the Devfile
klog.V(3).Infof("Deleting %d resource(s) not present in the Devfile: %s", len(resources), strings.Join(resources, ", "))
g := new(errgroup.Group)
for _, objectToRemove := range objectsToRemove {
// Avoid re-use of the same `objectToRemove` value in each goroutine closure.
Expand Down Expand Up @@ -722,7 +721,6 @@ func (a Adapter) deleteRemoteResources(objectsToRemove []unstructured.Unstructur
return err
}

spinner.End(true)
return nil
}

Expand Down

0 comments on commit afbd4d6

Please sign in to comment.