Skip to content

Commit

Permalink
feat: Unused images are cleaned even without -a flag (#1551)
Browse files Browse the repository at this point in the history
## Description:
<!-- Describe this change, how it works, and the motivation behind it.
-->

## Is this change user facing?
YES
<!-- If yes, please add the "user facing" label to the PR -->
<!-- If yes, don't forget to include docs changes where relevant -->

## References (if applicable):
<!-- Add relevant Github Issues, Discord threads, or other helpful
information. -->
Closes #1523
  • Loading branch information
victorcolombo authored Oct 13, 2023
1 parent 686e191 commit e1317aa
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions cli/cli/commands/clean/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e1317aa

Please sign in to comment.