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

Request: Allow user to delete individual resources without having to delete their workflow run first #996

Open
JoyfulGen opened this issue Jun 26, 2023 · 8 comments · May be fixed by #1007
Assignees
Labels
Rodan Client Issues pertaining to Rodan client

Comments

@JoyfulGen
Copy link
Contributor

When in the "Resources" list, the option to delete an individual resource is not available--the button "Delete" just isn't clickable. If a user wants to delete a resource, they have to:

  1. Find the Workflow run that produced that resource;
  2. Delete that Workflow run;
  3. Go to the "Resources" list and find the offending resource;
  4. Delete the resource.

Demo (wherein you can see that I can't delete the resource at first; it only works when I delete the workflow run):

Resource.deletion.process.mov

I have two requests related to this:

  1. If a user deletes a workflow run, all of the resources it produced are automatically deleted also. (This is kiiiind of related to this issue rodan allows files that don't exist to appear in avaibable input port resources (idiot-proofing request) #625)
  2. Allow individual resources to be deleted both from the "Resources" list and from a workflow run, without the entire workflow run needing to be being deleted.

I think both these things would save users' time, and also be more intuitive.

@malajvan malajvan self-assigned this Jun 30, 2023
@malajvan
Copy link
Contributor

After further investigation this seems like a pure rodan-client, frontend issue. I found that the Delete button is indeed disabled if there's a workflow run attached to it. This is in rodan-client/code/src/js/Views/Master/Main/Resource/Individual/ViewResource.js
image

@malajvan malajvan assigned cadagong and jackyyzhang03 and unassigned malajvan Jun 30, 2023
@malajvan malajvan added the Rodan Client Issues pertaining to Rodan client label Jun 30, 2023
@jackyyzhang03
Copy link
Contributor

It appears that this is not only a frontend issue. Deletion of resources is protected in the backend model so raises an exception if the user tries to delete a resource without deleting the associated workflow run. We could remove the protection but it also seems like deleting resources from workflow runs could be potentially problematic. For example, what if a resource was deleted while the workflow is running?

@JoyfulGen
Copy link
Contributor Author

Would it be possible to enable deleting a resource only when the workflow run is finished? (Sorry if this is a dumb question.)

If not, I think the most useful thing anyway would be for a workflow run's resources to delete when the workflow run is deleted. That alone would save a lot of time!

@jackyyzhang03
Copy link
Contributor

I took a deeper look at the code and I think it is possible to do this theoretically, but it seems that it might not be worth it as there would be a lot of concerns and edge cases to consider (including workflow cancellation, retrying, redoing run job tree, etc.). I am also not sure if it makes sense to keep around workflow runs with arbitrary missing resources.

If it is not that important, I propose that we leave out this feature in favour of automatically deleting resources when workflow runs are deleted.

@jackyyzhang03 jackyyzhang03 linked a pull request Jul 5, 2023 that will close this issue
2 tasks
@jackyyzhang03 jackyyzhang03 linked a pull request Jul 5, 2023 that will close this issue
2 tasks
@kyrieb-ekat
Copy link

Related to this, when you want to delete a workflow or workflow run the button immediately visible is the 'delete project' button, which makes it very easy to accidentally nuke your project while trying to delete a messed up workflow. Possible to either move it nearer to project label, or add a popup window asking user to confirm if they want to delete whole project?

@JoyfulGen
Copy link
Contributor Author

@kyrieb-ekat I made an issue about that a while ago when that exact thing happened to me: #1079! It was a difficult time.

@kyrieb-ekat
Copy link

Oh word!! I'm sorry, I must not have seen it, my bad! Yeah I fully deleted my project once and even then almost accidentally did it again (whups...).

@kyrieb-ekat
Copy link

@homework36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rodan Client Issues pertaining to Rodan client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants