Skip to content

Commit 1038bb2

Browse files
nervghalexey-igrychev
authored andcommitted
fix(host-cleanup): enable git data cleaning
Signed-off-by: Alexandr Zaytsev <alexandr.zaytsev@flant.com>
1 parent 439d8ae commit 1038bb2

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

pkg/host_cleaning/host_cleanup.go

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,17 @@ func RunHostCleanup(ctx context.Context, backend container_backend.ContainerBack
106106
return err
107107
}
108108

109-
/*
110-
allowedLocalCacheVolumeUsagePercentage := getOptionValueOrDefault(options.AllowedLocalCacheVolumeUsagePercentage, DefaultAllowedLocalCacheVolumeUsagePercentage)
111-
allowedLocalCacheVolumeUsageMarginPercentage := getOptionValueOrDefault(options.AllowedLocalCacheVolumeUsageMarginPercentage, DefaultAllowedLocalCacheVolumeUsageMarginPercentage)
112-
113-
if err := logboek.Context(ctx).Default().LogProcess("Running GC for git data").DoError(func() error {
114-
if err := gitdata.RunGC(ctx, allowedLocalCacheVolumeUsagePercentage, allowedLocalCacheVolumeUsageMarginPercentage); err != nil {
115-
return fmt.Errorf("git repo GC failed: %w", err)
116-
}
117-
return nil
118-
}); err != nil {
119-
return err
109+
allowedLocalCacheVolumeUsagePercentage := getOptionValueOrDefault(options.AllowedLocalCacheVolumeUsagePercentage, DefaultAllowedLocalCacheVolumeUsagePercentage)
110+
allowedLocalCacheVolumeUsageMarginPercentage := getOptionValueOrDefault(options.AllowedLocalCacheVolumeUsageMarginPercentage, DefaultAllowedLocalCacheVolumeUsageMarginPercentage)
111+
112+
if err := logboek.Context(ctx).Default().LogProcess("Running GC for git data").DoError(func() error {
113+
if err := gitdata.RunGC(ctx, allowedLocalCacheVolumeUsagePercentage, allowedLocalCacheVolumeUsageMarginPercentage); err != nil {
114+
return fmt.Errorf("git repo GC failed: %w", err)
120115
}
121-
*/
116+
return nil
117+
}); err != nil {
118+
return err
119+
}
122120

123121
allowedBackendStorageVolumeUsagePercentage := getOptionValueOrDefault(options.AllowedBackendStorageVolumeUsagePercentage, DefaultAllowedBackendStorageVolumeUsagePercentage)
124122
allowedBackendStorageVolumeUsageMarginPercentage := getOptionValueOrDefault(options.AllowedBackendStorageVolumeUsageMarginPercentage, DefaultAllowedBackendStorageVolumeUsageMarginPercentage)

0 commit comments

Comments
 (0)