feat: extract lfs if the file contents has changed - #3354
Conversation
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #3354 +/- ##
==========================================
+ Coverage 75.80% 75.83% +0.03%
==========================================
Files 1172 1172
Lines 113568 113752 +184
Branches 10258 10264 +6
==========================================
+ Hits 86090 86265 +175
- Misses 24492 24497 +5
- Partials 2986 2990 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Greptile SummaryThe PR makes lazy LFS data resolution detect changed archives using per-checkout identity stamps and serialize extraction with file locks.
Confidence Score: 4/5The PR is not yet safe to merge because a failed replacement can still destroy the prior usable extraction. The reply from "" states that the prior issue was fixed, but the current implementation still removes the destination before calling Files Needing Attention: dimos/utils/data.py, dimos/utils/test_data.py Important Files Changed
Reviews (4): Last reviewed commit: "Mypy, more like my pie!" | Re-trigger Greptile |
|
fyi we had a similar pr already: #2884 The conclusion is that we can just rely on if the lfs file is a pointer or not (if we don't pull manually) to determine if it's fresh |
oh lol i see, i can do that |
|
@aclauer LFS is an extremely contentious issue. You might want to check this thread to see what you're getting into: https://discord.com/channels/1341146487186391173/1528884577412579520/1528884580394733709 😅 |
Contribution path
Problem
Previously we would only extract lfs files only if there wasn't already an extracted copy. But if the data changed, this means we would skip the extraction and continue using old data.
Solution
Now we check if the compressed copy has changed since the last time we extracted. If we request data from this file and it has in fact changed, we reextract so we have the most up to date data.
Happens lazily, so we only reextract when we need the data.
How to Test
AI assistance
Checklist