Skip to content

Commit b59dcd0

Browse files
committed
[server] Don't block soft deletion rewinds in updateDeletionEligibilityTime
Tool: gitpod/catfood.gitpod.cloud
1 parent 9b574a9 commit b59dcd0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

components/server/src/workspace/workspace-service.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,13 +568,10 @@ export class WorkspaceService {
568568
daysToLive = daysToLive * 2;
569569
}
570570
deletionEligibilityTime.setDate(deletionEligibilityTime.getDate() + daysToLive);
571-
if (
572-
workspace.deletionEligibilityTime &&
573-
workspace.deletionEligibilityTime > deletionEligibilityTime.toISOString()
574-
) {
571+
if (new Date() > deletionEligibilityTime) {
575572
log.warn(
576573
{ userId, workspaceId, instanceId: instance?.id },
577-
"[updateDeletionEligibilityTime] Prevented moving deletion eligibility time backwards",
574+
"[updateDeletionEligibilityTime] Prevented moving deletion eligibility time to the past",
578575
{
579576
hasGitChanges,
580577
timestamps: new TrustedValue({

0 commit comments

Comments
 (0)