Skip to content

Automatic resource cleanup #4504

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

Closed
ammario opened this issue Oct 12, 2022 · 10 comments
Closed

Automatic resource cleanup #4504

ammario opened this issue Oct 12, 2022 · 10 comments
Labels
enterprise Enterprise-license / premium functionality roadmap https://coder.com/roadmap. Only humans may set this.

Comments

@ammario
Copy link
Member

ammario commented Oct 12, 2022

As a Coder deployment administrator, I want to avoid the tedious and error-prone job of cleaning up old workspaces. I propose we let admins define an automatic resource cleanup policy. It could work like this:

  • Lock threshold (optional) — after this period of inactivity the workspace is locked and only unlockable by the template admin. The user can delete their workspace at this point, or escalate to a template admin. This is the "safety" period where a user knows their workspace is pending deletion.
  • Delete threshold — after the lock threshold + this period, the workspace is deleted

Note: This is something we are still considering for our roadmap, feedback is welcome. Feel free to leave a comment in this issue or contact us

@ammario ammario added the enterprise Enterprise-license / premium functionality label Oct 12, 2022
@f0ssel
Copy link
Contributor

f0ssel commented Oct 12, 2022

I don't think we should do a lock stage, but maybe just present a warning to the user that they are X days away from this workspace being deleted + some button to extend it. I think this would be a good fit for an enterprise feature to help control static costs.

@ammario
Copy link
Member Author

ammario commented Oct 12, 2022

I don't think we should do a lock stage, but maybe just present a warning to the user that they are X days away from this workspace being deleted + some button to extend it. I think this would be a good fit for an enterprise feature to help control static costs.

The lock feature comes from #4501, which we should be able to cheaply reuse here. A banner is necessary in any world too.

@ammario
Copy link
Member Author

ammario commented Dec 4, 2022

Related #5265

Also: lock is unnecessary for MVP.

@github-actions
Copy link

github-actions bot commented Mar 5, 2023

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Mar 5, 2023
@kconley-sq
Copy link
Contributor

Responding to the stale bot, we would still love to have this feature as we're currently manually monitoring unused workspaces and reaching out to their owners to ask if we can reap them. 🙏

@github-actions github-actions bot removed the stale This issue is like stale bread. label Mar 7, 2023
@bpmct bpmct added roadmap https://coder.com/roadmap. Only humans may set this. roadmap-maybe Ideas we're considering! Only humans may set this. labels Mar 27, 2023
@dcarrion87
Copy link
Contributor

dcarrion87 commented Mar 28, 2023

Per #5815 I just want an option to stop on fail so it kills the resources and also allows users to review the logs to see that it stopped because of XYZ reason. Doing too much bottom cleaning right now.

If there was also a scheduled cleanup stopped workspaces that would be a bonus.

@matifali
Copy link
Member

@bpmct May be we can do something like https://cast.ai/

@dcarrion87
Copy link
Contributor

Is this related to: #5815 (comment)

And is this actually only going to be an Enterprise feature?

@ammario
Copy link
Member Author

ammario commented Jun 21, 2023

@dcarrion87 — as the feature is primarily to address scale needs and outside of the developer experience, it's planned for enterprise.

@bpmct bpmct removed the roadmap-maybe Ideas we're considering! Only humans may set this. label Nov 17, 2023
@ammario
Copy link
Member Author

ammario commented Apr 1, 2024

Docs on the new feature here: https://coder.com/docs/v2/latest/templates/schedule#failure-cleanup.

@ammario ammario closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enterprise Enterprise-license / premium functionality roadmap https://coder.com/roadmap. Only humans may set this.
Projects
None yet
Development

No branches or pull requests

7 participants