Kitware / CDash

An open source, web-based software testing server
http://www.cdash.org/
Other
208 stars 75 forks source link

Revamp how CDash removes old data #2093

Open zackgalbreath opened 3 months ago

zackgalbreath commented 3 months ago

Feature Request

How can we make CDash better?

PRs #1655, #1656, and #1657 added foreign keys to many of CDash's tables, helping to protect our data integrity & make sure that old data gets deleted automatically when it is no longer referenced.

I audited the rest of CDash's tables and came up with the following list of recommendations.

Unused tables we could probably drop without impacting existing functionality

Tables that would benefit from foreign keys

Tables whose rows contain a timestamp that could be used for periodic deletion

It's worth noting here that the following tables are already cleaned up in addDailyChanges():

Shared data that could be deleted by periodic NOT IN (...) queries:

Many of these tables are already being handled through clever queries in remove_builds() but if a row somehow "slips through the cracks" it currently requires manual intervention to delete it later on.

Functionality to more generally reconsider:

williamjallen commented 3 months ago

It's worth noting that some tables like the banner table contain "global" rows (using the project ID 0, for example), which makes it more difficult than it initially appears.

Great work putting together this list though! I'll gradually work though it as I have time.