Repository navigation
perf: cache repository activity summaries - #1801
Conversation
Signed-off-by: Denis Ćorić <denis85@gmail.com>
Signed-off-by: Denis Ćorić <denis85@gmail.com>
Signed-off-by: Denis Ćorić <denis85@gmail.com>
Signed-off-by: Denis Ćorić <denis85@gmail.com>
Signed-off-by: Denis Ćorić <denis85@gmail.com>
✅ Deploy Preview for endearing-brigadeiros-63f9d0 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1801 +/- ##
==========================================
+ Coverage 88.01% 88.87% +0.86%
==========================================
Files 122 127 +5
Lines 6857 7092 +235
Branches 1304 1318 +14
==========================================
+ Hits 6035 6303 +268
+ Misses 510 493 -17
+ Partials 312 296 -16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Denis Ćorić <denis85@gmail.com>
Signed-off-by: Denis Ćorić <denis85@gmail.com>
Signed-off-by: Denis Ćorić <denis85@gmail.com>
Signed-off-by: Denis Ćorić <denis85@gmail.com>
Refresh against finos/main while retaining the repository activity summaries and current push diff/list behavior. Add shared sink regression coverage for detail payload preservation and list projections across review actions and activity rebuilds. Signed-off-by: Denis Ćorić <denis85@gmail.com>
|
@kriswest, a bit of context: this PR covers the repository activity optimisation from #1691. I split it out of #1795 following Juan’s suggestion to review it separately from the audit-storage changes. #1795 reduces duplicate audit data, while this PR maintains activity summaries so repository-page loads don’t need to recalculate them from the full push history. |
jescalada
left a comment
There was a problem hiding this comment.
LGTM after fixing the documentation 👍🏼
Another thing: I feel the PR description isn't easy for humans to digest - do you mind condensing the PR description into a few sentences? The "validation" section can go in a separate comment so we aren't greeted with a wall of text when revisiting the PR in the future 🙂
ValidationMoved here from the PR description.
On a local synthetic PostgreSQL history of 10,000 pushes across 10 repositories, five-run median warm reads were 2.44 ms for summaries versus 11.27 ms for the previous history query. Initial backfill took 178.51 ms. These are workload examples, not general performance guarantees. Implementation notes
|
Description
Repository pages no longer scan the full push history for push counts and recent activity. The file, MongoDB and PostgreSQL sinks keep per-repository activity summaries, updated on every push write and backfilled by a startup migration. On a 10,000-push PostgreSQL history, warm reads dropped from 11.27 ms to 2.44 ms.
Upgrade notes (MongoDB duplicate push IDs, PostgreSQL with
autoMigrate: false, rebuilding summaries) are in the newwebsite/docs/migrations.mdx. Review actions also refresh the relevant UI caches and approval/rejection timestamps are parsed consistently.Validation and implementation details: #1801 (comment)
Related Issue
Activity portion of #1691, with PostgreSQL parity for #1794. Audit storage changes are in #1795; both are needed for the agreed scope.
Checklist
No configuration schema changes.