testkube icon indicating copy to clipboard operation
testkube copied to clipboard

Add support for retention policy of executed test results

Open abhipsnl opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. Once the test is executed, all its results are stored in MongoDB, and we can visit all our results whenever we want, but sometimes we don’t want old logs because of any reason. And at present, we don’t have that option to enable a log retention policy.

Describe the solution you'd like Add some flags, like TESTKUBE_LOG_RETENTION_PERIOD=180days # Delete the logs from DB after 180 days TESTKUBE_LOG_RETENTION_COUNT=100 # Delete the 1st log if the 101 test is executed.

Or maybe something better.

abhipsnl avatar Sep 06 '22 11:09 abhipsnl

Thanks @sharmajee1 - would this apply to arbitrary test artifacts also? (log files, videos, etc)

olensmar avatar Sep 06 '22 11:09 olensmar

Thanks @sharmajee1 - would this apply to arbitrary test artifacts also? (log files, videos, etc)

I didn't think of it, but sounds like good idea

abhipsnl avatar Sep 06 '22 11:09 abhipsnl

An ideal solution would be to implement the same retention for both logs and artifacts related to test executions. A retention period should be enough:

TESTKUBE_EXECUTION_RETENTION_PERIOD=180 # Cleanup the logs from DB and artifacts after 180 days

Being able to automate logs and artifacts cleanup is critical for running testkube at Enterprise level at scale.

swacongne avatar Jul 04 '23 13:07 swacongne

Guess, it should be in place for logs, @nicufk? For test execution in Mongo it's worth create a separate issue

vsukhin avatar Jul 04 '23 13:07 vsukhin

test result logs are stored in minio and they can be rotated. closing this issue.

TheBrunoLopes avatar Aug 15 '23 10:08 TheBrunoLopes