Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357566

Summary: Cleanup deleted projects
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ServerAssignee: Project Inbox <orion.server-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: ahunter.eclipse, mamacdon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2011-09-13 17:21:20 EDT
Currently deleting a project in orion simply unlinks the the content from the workspace but leaves the project contents intact. This has resulted in "orphan" projects that belong to no workspace.

- We need a script to clean up orphan projects on current servers

- Consider deleting project contents when a project is deleted. For those running local Orion servers on their desktop this is often *not* what the user wants. On the other hand, on a remote server there isn't much value keeping the contents because there is no way to recreate a project based on existing contents.
Comment 1 Susan McCourt CLA 2012-05-10 11:00:38 EDT
This issue really bit me last night.  I got into a very funky state with git where it was giving me reject warnings on my push but the push succeeded.  I also had a "deleted file" change stuck in my unstaged list that I could not get rid of (probably a reset hard head would have worked).  At any rate, somewhere along the way I decided to delete the clone and reclone the orion client repository.  I kept working.

My mistake was that I never recreated a self hosting site on the new clone.  But I didn't realize this because the self hosting site was pointing at the undeleted content.  So some sanity checks that I did on some pages were not on the right code.

All this was my user error, of course, but if the content had been deleted, then my site would have been gone, and I would have figured out what was going on right away.

From my point of view, deleting the content was exactly what I had wanted in order to clean up my git state.
Comment 2 Susan McCourt CLA 2012-05-10 13:41:49 EDT
Another point in the "delete and reclone" cycle.
You end up with favorites pointing to your old clone.  Kind of like the old "I didn't realize I was editing someone else's file" problem.
Comment 3 John Arthorne CLA 2012-05-10 14:49:06 EDT
The main complication here is that deleting project content on disk could be really bad for the localhost server case. I'd hate to add an "also delete project contents" checkbox but I'm not sure how else to handle it.

For favorites: presumably if the contents were really gone, then your favorite would be a broken link, which is also not great. Note when a project is removed the permissions are removed so you can't accidentally edit a project after you remove it.
Comment 4 Anthony Hunter CLA 2014-06-06 17:49:02 EDT
(In reply to John Arthorne from comment #0)
> - Consider deleting project contents when a project is deleted. For those
> running local Orion servers on their desktop this is often *not* what the
> user wants. On the other hand, on a remote server there isn't much value
> keeping the contents because there is no way to recreate a project based on
> existing contents.

When you currently delete a project we are deleting the project contents. Seems like this is a change from earlier versions of Orion and it may be a problem(?). I am making this major to seek clarification.
Comment 5 John Arthorne CLA 2014-06-09 13:22:35 EDT
What I would like us to do is delete automatically when in "default" location, but leave it alone when in non-default location. This mimics symlink semantics and I think will handle both self-hosting and multi-user scenarios nicely.
Comment 6 John Arthorne CLA 2015-05-05 14:42:15 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html