feat: history log setup #101
No reviewers
Labels
No labels
automation
backend
bug
contributor experience
data
deployment
documentation
duplicate
good first issue
help wanted
nice to have
notifications
package maintainer
performance
skin
tech debt
user story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-community/nix-security-tracker#101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/history-log"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The history log is implemented with the package 'django-pghistory', which uses pg triggers.
The summary of changes is as follows:
cve
,derivations
andstatus
fields.This constitutes the building blocks for all activity log we want to register.
This now requires a substantial rebase
The prefix should't be needed with #86
Also with #86, and similar for the other package
https://github.com/Nix-Security-WG/nix-security-tracker/pull/66/files#diff-42e2af48200a6b6083704ad7f3ceadc6138e7cfe19200e80f0229a035e18edc6R182
@RaitoBezarius Is the linked comment correct?
We don't want to snapshot everything, as that will require a lot of churn and diffing the snapshots and such. Also the DB can be expected to be large. What we need to track already:
All this indexed by user.
applied
applied
Assuming you are referring to the placement of this settings before the user settings logic, applied already.
I added tracking per field. pghistory already diffs changes, instead of snapshotting the whole row.
For the CVE and derivation addition/removal I'll need to have clear the representation to contruct the proper query, for now it tracks the field directly in the NixpkgsIssue model.
There are migration errors in main that prevent me from finishing a proper rebase. They should be fixed there first so I can rebase again.
@ -479,6 +302,11 @@ class IssueStatus(models.TextChoices):
WONTFIX = "W", _("wontfix")
We should defer the decision on how to deal with description changes to later.
This PR is in a working state again.
After much fiddling with the default admin views of
pghistory
, I don't find them very usable. Taking this as starting point, I'll now create anActivity Log
app to put there usable custom views of the different tables tracking the changes we want to summarise.Implemented in #366
Pull request closed