Skip to main content

Deleting Old Outputs and Artifacts

QA-Board lets you erase old outputs after a period of time.

What data will not be deleted​

Outputs from commits that are either:

  • Recent (more info below)
  • On the project.reference_branch from qaboard.yaml.
  • Are on a commit/tag/branch listed as a project.milestones in qaboard.yaml.
  • Are a milestone defined from QA-Board's UI.

Files "Exported" from QA-Board's UI are never deleted. You can do it yourself if needed. TODO: track them at least!

warning

QA-Board will set as a commit's branch the first it was seen on. If you merge with fast-forward rebased branches, then this information will not be what you expect.

Configuring garbage collection​

Data can be erased after a period of time where the commit has no new outputs.

qaboard.yaml
storage:
garbage:
after: 1month

after: supports human-readable values like 2weeks, 1year, 3months...

caution

Data is deleted when the server runs qaboard_clean (see the server's cron jobs). It applies to all projects: without storage.garbage.after, outputs are deleted after 1month. Use qaboard_clean --help for the options (e.g. --dryrun, --project).

To also allow deleting results on the reference branch (the latest commit is kept), set storage.garbage.can_delete_reference_branch: true.

note

TODO Right now we only clean data for repositories that send their push events to QA-Board.

Deleting results from the web application​

Logged-in users can also delete results from a commit's page, in the batch's menu (see the user guide):

  • Delete Failed Outputs or Delete All Outputs of a batch.
  • With the Delete files, keep metadata switch, only the files are deleted, and the runs stay listed (they can be redone later). You can then also give a file pattern, like *.png or **/*.py, to delete only the matching files.
  • Delete multiple batches at once.

Batches that are milestones are protected: their runs can't all be deleted this way.

Recovering lost data?​

Well, you won't be able to do that. What you should try to do is make everything reproducible.

  • Define your whole environment as code. Make sure your commits contain 100% of what is needed for your code to run. Tools you can use include docker+Dockerfile, etc.
  • Make it easy to re-trigger your CI, so that it's straightforward to re-builds, re-run your tests, and uploads artifacts to QA-Board.
  • If necessary, make it also very easy to run manually something like
git checkout $hexsha
make
qa save-artifacts
qa batch my-batch

Deleting commit artifacts​

Artifacts are not deleted by default, you have to ask for it:

qaboard.yaml
storage:
garbage:
after: 1month
artifacts:
delete: true

If you want to keep some artifacts (maybe "small" coverage reports defined as coverage_report: ... in qaboard.yaml's artifacts)

storage:
garbage:
after: 1month
artifacts:
delete: true
keep:
- coverage_report
# also supports relative artifacts paths, e.g.
- build/my_binary

Notes:

  • The settings that are used are those in the latest commit of the reference_branch defined in qaboard.yaml
  • If you change those settings, artifacts for already deleted commits don't get deleted.
  • When a qa run uses a commit that was deleted, or if you upload manifests for a deleted commit, it is marked as undeleted.