On Tue, 3 Sep 2019 at 08:46, Axel Lebourhis axel.lebourhis@linaro.org wrote:
Hi all,
I have an issue which is certainly related to bad configuration. I run xTS test job with LAVA to test Android images, so it makes a lot of results for SQUAD to process and store (around 500k per build). My db backups start to take some space, so I want to clean old results. But when I try to delete a build, the connection is reset by SQUAD. I guess this is due to worker timeout, so how can I fix this ?
This sounds familiar. Did you try to delete the results from web admin interface? It will likely time out as query takes a lot of time. There is one or possibly two options you can use: 1. delete old data from django shell This works and I used this approach before. Depending on the level you want to delete the data it might look sth like this squad-admin shell $> from squad.core.models import Build $> b = Build.objects.get(version="<your version goes here>", project__slug="<project slug goes here>") # this should return only 1 build $> b.delete() This will perform cascade delete on all results related to this build, but it won't remove test jobs (I'm not 100% about that). So you might need to do a similar thing for the test jobs separately.
2. delete old data using REST API I'm not 100% sure this is possible and I never tried that.
milosz
Best regards, Axel _______________________________________________ Squad-dev mailing list Squad-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/squad-dev