Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1086 +/- ##
==========================================
+ Coverage 70.79% 70.81% +0.02%
==========================================
Files 87 87
Lines 15028 15081 +53
==========================================
+ Hits 10639 10680 +41
- Misses 3348 3355 +7
- Partials 1041 1046 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the recommendation caching system by renaming cache keys for consistency and introducing digest-based cache validation to track configuration changes. The changes consolidate various offline recommendation cache keys under a unified Recommend namespace and add digest tracking to detect when recommendation configurations have changed.
Key Changes
- Renamed cache constants from
OfflineRecommend*toRecommend*and similar naming improvements for consistency - Modified recommender functions to return digests alongside scores for cache validation
- Added new
util.MD5()function that computes order-independent hashes of strings
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| storage/cache/database.go | Consolidated and renamed cache key constants for recommendations, added digest constants for all recommender types |
| logics/recommend.go | Updated all recommender functions to return digests, added external recommender support with recommendExternal() |
| logics/recommend_test.go | Added test coverage for digest returns in all recommender functions and new external recommender test |
| worker/worker.go | Integrated digest capture and storage when generating recommendations |
| worker/worker_test.go | Updated all tests to use new cache key names and added digest validation test |
| config/config.go | Refactored Hash() to use new util.MD5() for order-independent digest computation |
| common/util/util.go | Added new MD5() utility function for computing order-independent hashes |
| server/rest.go | Updated REST endpoints to use new cache key names |
| server/rest_test.go | Updated test assertions to use new cache key names |
| master/tasks.go | Added digest storage for non-personalized recommenders |
| master/tasks_test.go | Added digest validation tests for item-to-item and user-to-user recommenders |
| master/rest.go | Updated REST endpoints to use new cache key names and handle digest returns |
| client/client_test.go | Updated test to use new recommend cache key name |
| .github/workflows/dockerhub-description.yml | Added checkout step before resolving images in README |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.