From e1317aaa0853943d73234dde344fa5102ab41bd8 Mon Sep 17 00:00:00 2001 From: Victor Colombo Date: Fri, 13 Oct 2023 10:58:35 -0300 Subject: [PATCH] feat: Unused images are cleaned even without -a flag (#1551) ## Description: ## Is this change user facing? YES ## References (if applicable): Closes #1523 --- cli/cli/commands/clean/clean.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/cli/cli/commands/clean/clean.go b/cli/cli/commands/clean/clean.go index 79238e84d5..34da387113 100644 --- a/cli/cli/commands/clean/clean.go +++ b/cli/cli/commands/clean/clean.go @@ -89,21 +89,8 @@ func run( }, } - executeOnlyIfAllFlagIsEnabled := map[string]bool{ - oldEngineCleaningPhaseTitle: false, - enclavesCleaningPhaseTitle: false, - unusedImagesPhaseTitle: true, - } - phasesWithErrors := []string{} for phaseTitle, cleaningFunc := range cleaningPhaseFunctions { - onlyIfAllFlag, found := executeOnlyIfAllFlagIsEnabled[phaseTitle] - if !found { - return stacktrace.NewError("Couldn't find phase %s in executeOnlyIfAllFlagIsEnabled. This is a bug in Kurtosis", phaseTitle) - } - if onlyIfAllFlag && !shouldCleanAll { - continue - } logrus.Infof("Cleaning %v...", phaseTitle) successfullyRemovedArtifactUuids, removalErrors, err := cleaningFunc() if err != nil {