Skip to content

[server] Always GC snapshots for workspaces #13121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ export class WorkspaceDeletionService {
const span = TraceContext.startSpan("garbageCollectWorkspace", ctx);

try {
const deleteSnapshots = ws.softDeleted === "user";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at git history, this has been there since the initial gitpod public repo commit.

const successfulDeleted = await this.deleteWorkspaceStorage({ span }, ws, deleteSnapshots);
const successfulDeleted = await this.deleteWorkspaceStorage({ span }, ws, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a side note, this.deleteWorkspaceStorage could be refactored to not take a 3rd argument that's always true.

await this.db.trace({ span }).updatePartial(ws.id, { contentDeletedTime: new Date().toISOString() });
return successfulDeleted;
} catch (err) {
Expand Down