augur icon indicating copy to clipboard operation
augur copied to clipboard

repo_deps_scorecard - store new score values each run instead of overwriting

Open cdolfi opened this issue 1 year ago • 3 comments

For the repo_deps_libyear does it create new rows for the scorecard values each time it runs for each repo or does it overwrite the last time? To note repo_deps_libyear stores each time

I realized that the query for the 8Knot visualization assumes there will only be one set of scores for each repo, but I see (and have had security folks verbalize) the value of seeing the scores over time.

If it is already set to create new rows, let me know and ill put in the fix to 8Knot.

If not, open to the discussion of the pro/cons of this change. thanks!

cdolfi avatar Oct 16 '24 20:10 cdolfi

Capturing data for only the most recent scan right now. Will add this history as a feature request.

sgoggins avatar Oct 21 '24 14:10 sgoggins

ah yep, it looks like this table is using repo_id and name as the natural key/unique constraint https://github.com/chaoss/augur/blob/4221cba76e6ce93e8d4e2f2676f1525bfeacc8ca/augur/application/db/models/augur_data.py#L1996

It looks like maybe https://github.com/chaoss/augur/commit/b26fb371a8dd6b1649c36b560c53aa7e04d3b99b was made to, in part, change this constraint by including the collection date in the list of keys to use for conflict resolution, but the table schema was not updated to match.

@sgoggins do you think simply updating this table constraint (and generating a new migration for it) would fix this?

MoralCode avatar Oct 31 '25 14:10 MoralCode