1
- import { Werft } from "./util/werft" ;
1
+ import { Werft } from "./util/werft" ;
2
2
import * as Tracing from "./observability/tracing" ;
3
- import { SpanStatusCode } from "@opentelemetry/api" ;
4
- import { exec } from "./util/shell" ;
5
- import { CORE_DEV_KUBECONFIG_PATH , HARVESTER_KUBECONFIG_PATH } from "./jobs/build/const" ;
6
- import { HarvesterPreviewEnvironment , PreviewEnvironment } from "./util/preview" ;
3
+ import { SpanStatusCode } from "@opentelemetry/api" ;
4
+ import { exec } from "./util/shell" ;
5
+ import { CORE_DEV_KUBECONFIG_PATH , HARVESTER_KUBECONFIG_PATH } from "./jobs/build/const" ;
6
+ import { HarvesterPreviewEnvironment , PreviewEnvironment } from "./util/preview" ;
7
7
8
8
// for testing purposes
9
9
// if set to 'true' it shows only previews that would be deleted
@@ -184,7 +184,7 @@ async function determineStalePreviewEnvironments(options: {
184
184
185
185
werft . done ( SLICES . CHECKING_FOR_DB_ACTIVITY ) ;
186
186
187
- const previewsToDelete = previews . filter ( ( preview : PreviewEnvironment ) => {
187
+ return previews . filter ( ( preview : PreviewEnvironment ) => {
188
188
if ( ! previewNamespaceBasedOnBranches . has ( preview . namespace ) ) {
189
189
werft . log (
190
190
SLICES . DETERMINING_STALE_PREVIEW_ENVIRONMENTS ,
@@ -210,8 +210,6 @@ async function determineStalePreviewEnvironments(options: {
210
210
) ;
211
211
return false ;
212
212
} ) ;
213
-
214
- return previewsToDelete ;
215
213
}
216
214
217
215
async function removePreviewEnvironment ( previewEnvironment : PreviewEnvironment ) {
0 commit comments