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

Update suspended cleaning command #10195

Merged
merged 12 commits into from
Feb 14, 2025
Merged

Update suspended cleaning command #10195

merged 12 commits into from
Feb 14, 2025

Conversation

etiennejouan
Copy link
Contributor

@etiennejouan etiennejouan commented Feb 13, 2025

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR introduces a refined three-stage workspace cleanup process with improved handling of inactive workspaces.

  • Added soft deletion phase between notification and permanent deletion in .env.example, with timeframes of 7 days (notification), 14 days (soft delete), and 21 days (permanent delete)
  • Modified UserWorkspace entity to use @DeleteDateColumn for proper TypeORM soft delete functionality
  • Added withDeleted: true option in workspace queries to ensure processing of both active and soft-deleted suspended workspaces
  • Added dryRun parameter and improved error handling in cleaner service for safer testing and execution
  • Fixed critical logical error in CleanSuspendedWorkspacesCommand where incorrect variable is passed to batchWarnOrCleanSuspendedWorkspaces

8 file(s) reviewed, 10 comment(s)
Edit PR Review Bot Settings | Greptile

@etiennejouan etiennejouan changed the title update suspended cleaning command Update suspended cleaning command Feb 13, 2025
@etiennejouan etiennejouan enabled auto-merge (squash) February 14, 2025 15:43
@etiennejouan etiennejouan merged commit db52677 into main Feb 14, 2025
32 checks passed
@etiennejouan etiennejouan deleted the ej/382 branch February 14, 2025 15:49
Copy link
Contributor

Thanks @etiennejouan for your contribution!
This marks your 23rd PR on the repo. You're top 2% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

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.

Update cleaning command
3 participants