-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Delete run feature #26275
Delete run feature #26275
Conversation
f0e8097
to
7a8a5bf
Compare
eee4acc
to
002c15d
Compare
Hey @KN4CK3R thanks for helping me. I want to ask you a few question: 1- Do we need to decrease the action_run_index? If we dont then when inserting new run actions ids will not be linear if we deleted some Run. Like so: 2- When inserting new runs there's a TaskVersion that is increased. I dont know exactly its purposes by now either if we need to do something with it when deleting. Overall the functionality is working to delete run workflows as well its jobs. By now I'll also implement a way of delete stored jobs tasks that are associate with a non-existent job ID. |
I've updated the PR now its also removing |
Signed-off-by: cassiozareck <[email protected]>
587893d
to
71b6ec6
Compare
I haven't looked at the code yet, but I think it may be an incorrect use of xorm, you could enable SQL log to debug it.
Some logic which could help:
To be honest, I don't think it's a small job. See also #24256 |
Target Issue: #26219
This PR has the aim of add a delete single workflow run feature to Gitea. It does that by:
action.Delete
.ActionRun
andActionRunJob
objects by run ID, starts a transaction and calls 2 lower-level functions atmodels/actions/run.go
:DeleteRun
andDeleteRunJobs
.This work is still in progress and I'm aware it needs more operations to really erase every remnant of the deleted Run. Also it needs to be integrated with the frontend.