openshiftio / openshift.io

Red Hat OpenShift.io is an end-to-end development environment for planning, building and deploying modern applications.
https://openshift.io
97 stars 66 forks source link

When codebase is deleted, delete also appropriate che workspaces #3004

Open rhopp opened 6 years ago

rhopp commented 6 years ago

Currently, when user removes codebase from codebases UI, all che workspaces created for this codebase are not deleted (orphaned ;-)). I think it would make sense to delete all workspace associated with the deleted codebase.

joshuawilson commented 6 years ago

@l0rd do you know if there is an API for this?

ibuziuk commented 6 years ago

There is no API exposed on wit side yet, but there is an issue[1] for it. Basically, It was planned to do stop / delete by communicating with che server directly as a first step - https://github.com/openshiftio/openshift.io/issues/1439#issuecomment-375609892

[1] https://github.com/openshiftio/openshift.io/issues/2745

l0rd commented 6 years ago

That's for @ashumilova and team/che/plugins

qodfathr commented 6 years ago

I'd recommend reclassifying this as type/feature-request. Thoughts?

joshuawilson commented 6 years ago

I agree.

joshuawilson commented 6 years ago

ok, now that I have done that I'm having second thoughts. If the "delete" doesn't delete everything and leaves orphaned children that is a bad thing, right?

qodfathr commented 6 years ago

It's a "bad thing" but it's not a bug, because the specification never said "be sure to delete the workspaces." Defining "delete" broadly across OSIO is still an open item, and needs a lot of curation from PM, UXD and ENG.

Ultimately, this mainly a pain for the service, because it's wasting resources, but doesn't really impact users. We can probably do some scripted deletions if it becomes a large resourcing issue, until we have a more correct solution scoped and deployed.