Housekeeping For Old Action Runs And Related Tables #32809
Labels
topic/gitea-actions
related to the actions of Gitea
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
Feature Description
Abstract
I would like to put forward an idea for deleting obsolete data records for discussion before starting the implementation.
From my perspective, I would offer the ability to delete obsolete action runs and associated entries from the database, if desired and configured by the administrator.
The idea is related to issue #24256.
Currently, obsolete artefacts (packages) are deleted and obsolete log entries are handled as part of a background process.
In future, the following database tables should also be taken into account:
Concept/idea
Additional logic is implemented in the existing cleanup background process in the action package (services.actions.cleanup.go). This searches for ActionTasks with outdated logs (LogsExpired=true) and which are older than a configurable period
RunTaskRetentationDays
. The search logic is almost identical toactions_model.FindOldTasksToExpire
. Based on the found ActionTasks, the associated data records are determined (TasksStep, TaskOutput, ActionRun etc.) and physically deleted.Restrictions
Benefits
Even after longer operation and many action runs, the UI with the action tab remains clear, as old actions that are no longer relevant are automatically tidied up and removed by a background process.
Notes
This is my first involvement in this project. If I have misunderstood anything, I apologise. Therefore, I am not sure whether the deletion of action task is desired.
If this idea is in the spirit of the project, I can prepare a corresponding feature branch, but I would need some support with the implementation.
Screenshots
The text was updated successfully, but these errors were encountered: