Skip to content
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

[server] Don't block soft deletion rewinds in updateDeletionEligibilityTime #20569

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

filiptronicek
Copy link
Member

Description

Reverts a behavior we introduced in #20271 that prevented shifting the deletionEligibilityTime of a workspace backwards. This was problematic because workspaces with git changes are meant to live twice as long, but this change it made it so that "any workspace that ever had git changes" lived twice as long.

Related Issue(s)

Fix CLC-1070

/hold

@filiptronicek
Copy link
Member Author

Here's the relevant logs from server when I started a workspace, created a file (git change) and then removed it again (we see the deletion eligibility time jump form 2025/02/13 to 2025/02/27 and then back to the 13th).

{"component":"server","severity":"INFO","time":"2025-01-30T17:52:53.997Z","context":{"requestId":"fc32140e-f04b-4f29-8962-fa8e634eacb3","requestKind":"jsonrpc","requestMethod":"updateGitStatus","traceId":"","subjectId":"user_9314a52c-6454-47e6-9d78-0d0a475c5bcc","userId":"9314a52c-6454-47e6-9d78-0d0a475c5bcc","contextTimeMs":22.98247000016272,"workspaceId":"[redacted:md5:638cd60bcfd82e952a95fce8f5a8a414]","instanceId":"558bd9b1-5443-4bd2-8ddf-0705d511d845"},"message":"[updateDeletionEligibilityTime] Updating deletion eligibility time for regular workspace","payload":{"hasGitChanges":false,"timestamps":{"deletionEligibilityTime":"2025-02-13T17:52:53.997Z","instanceStartedTime":"2025-01-30T17:52:49.340Z","instanceCreationTime":"2025-01-30T17:52:46.555Z","workspaceCreationTime":"2025-01-30T17:52:46.488Z","lastActive":"2025-01-30T17:52:49.340Z"}}}
{"component":"server","severity":"INFO","time":"2025-01-30T17:53:44.001Z","context":{"requestId":"6c1d3da1-e1ce-49b8-82ac-94cfe9988ba5","requestKind":"jsonrpc","requestMethod":"updateGitStatus","traceId":"","subjectId":"user_9314a52c-6454-47e6-9d78-0d0a475c5bcc","userId":"9314a52c-6454-47e6-9d78-0d0a475c5bcc","contextTimeMs":30.784508999902755,"workspaceId":"[redacted:md5:638cd60bcfd82e952a95fce8f5a8a414]","instanceId":"558bd9b1-5443-4bd2-8ddf-0705d511d845"},"message":"[updateDeletionEligibilityTime] Updating deletion eligibility time for regular workspace","payload":{"hasGitChanges":1,"timestamps":{"deletionEligibilityTime":"2025-02-27T17:53:44.001Z","instanceStartedTime":"2025-01-30T17:52:49.340Z","instanceCreationTime":"2025-01-30T17:52:46.555Z","workspaceCreationTime":"2025-01-30T17:52:46.488Z","lastActive":"2025-01-30T17:52:49.340Z"}}}
{"component":"server","severity":"INFO","time":"2025-01-30T17:53:53.997Z","context":{"requestId":"f44814e3-532b-4e18-9f67-f993074e7040","requestKind":"jsonrpc","requestMethod":"updateGitStatus","traceId":"","subjectId":"user_9314a52c-6454-47e6-9d78-0d0a475c5bcc","userId":"9314a52c-6454-47e6-9d78-0d0a475c5bcc","contextTimeMs":26.760228999890387,"workspaceId":"[redacted:md5:638cd60bcfd82e952a95fce8f5a8a414]","instanceId":"558bd9b1-5443-4bd2-8ddf-0705d511d845"},"message":"[updateDeletionEligibilityTime] Updating deletion eligibility time for regular workspace","payload":{"hasGitChanges":false,"timestamps":{"deletionEligibilityTime":"2025-02-13T17:53:53.997Z","instanceStartedTime":"2025-01-30T17:52:49.340Z","instanceCreationTime":"2025-01-30T17:52:46.555Z","workspaceCreationTime":"2025-01-30T17:52:46.488Z","lastActive":"2025-01-30T17:52:49.340Z"}}}

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

Code LGTM if this comment is addressed. ✔️

Co-authored-by: Gero Posmyk-Leinemann <[email protected]>
@filiptronicek filiptronicek self-assigned this Jan 31, 2025
@roboquat roboquat merged commit 71e2b01 into main Jan 31, 2025
18 checks passed
@roboquat roboquat deleted the ft/dont-block-rewinding-ws-deletion-eligibility-time branch January 31, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants