-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add an option to delete logs from the Logs page #3964
Comments
@anna-geller I think I would need BE change for this to be feasible, as the endpoint which is doing the log removal from Executions page needs |
As I've mentioned in this issue #3961 there might be a problem when flow\executions are deleted but their logs remain. Please make sure it is possible to delete logs even when corresponding flow\task\execution has been deleted. |
don't delete executions @aku :) it's better to keep them for audit trail/history. we recommend to only delete those that are far away in the past to avoid such issues |
Unfortunately, storage space is not unlimited. In my case I had thousands or executions per day. It makes not sense to keep them for a long time. I've planned to purge them every few days to keep my S3 storage happy |
Technically speaking, Executions are stored in the database, so they shouldn't affect S3 except for the data (e.g. outputs) processed in executions. Would you like to talk to @Ben8t about your use case? I think we can find a way to manage it efficiently depending on the design of the flows and triggers |
I had sub-optimal solution using EachItem task to process a lot of data coming from kafka trigger. The flow generated thousands of child flows that stored some data (execution results?) in S3. I lost 300Gb of space in just a few hours. Now I use different strategy - processing everything in a single flow. It has helped to reduce a number of executions so S3 is not an issue now. However, I still have thousands of logs entries that I do not need. Especially, after I purged executions via built-in Purge task. |
Interesting. In that case, perhaps it is worth iterating directly with the database logs table? you can add a Postgres SQL query task to remove the logs you don't need |
I do not feel comfortable to mess directly with Kestra's DB. If it is the only option to purge leftover logs from deleted flows\executions could you please provide me with a query? I'll give it a try. Ideally, I'd like to delete all flows\tasks logs older than N days. Ability to specify log level will be a bonus. Honestly, I was hoping to get some built-in functionality to delete logs based on some criteria (level, age, flowid etc.) |
Logs didn't have a unique identifier, to be able to delete logs safely from a filter on the logs page, we would need to add an identifier (for ex autoincrement id) or duplicate the delete logic with the search logic (which is kind of strange deleting with a fulltext and a page but why not). |
Finally we decided to allow deleting logs from the Flow -> Logs tab and from the Triggers -> Log tab. |
Closed with #4438. |
Feature description
Currently, you can delete logs from the Executions page.
We should add the same functionality from the Logs page.
The text was updated successfully, but these errors were encountered: