Skip to content

Conversation

@GreenHatHG
Copy link
Contributor

@GreenHatHG GreenHatHG commented Dec 25, 2025

Related

Summary

Add logging to gc() function to display paths of objects that would be removed during a dry run. This provides users with visibility into what will be deleted before executing the actual cleanup.

@codecov
Copy link

codecov bot commented Dec 25, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.56%. Comparing base (e38c8c2) to head (5a42dd9).
⚠️ Report is 66 commits behind head on main.

Files with missing lines Patch % Lines
src/dvc_data/hashfile/gc.py 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #650      +/-   ##
==========================================
+ Coverage   72.42%   73.56%   +1.13%     
==========================================
  Files          67       65       -2     
  Lines        5132     5315     +183     
  Branches      605      619      +14     
==========================================
+ Hits         3717     3910     +193     
+ Misses       1227     1212      -15     
- Partials      188      193       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GreenHatHG
Copy link
Contributor Author

Codecov Report

❌ Patch coverage is 0% with 20 lines in your changes missing coverage. Please review. ✅ Project coverage is 73.53%. Comparing base (e38c8c2) to head (7ea1358). ⚠️ Report is 65 commits behind head on main.
Files with missing lines Patch % Lines
src/dvc_data/hashfile/gc.py 0.00% 20 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:

Hi maintainers,

I've refactored the gc function by abstracting its core logic into a new iter_garbage generator.

As you can see, the patch coverage is 0%. I've confirmed this is because the tests for this logic reside in the main dvc repository as integration tests. The dvc-data CI runs standalone and doesn't execute them, so it correctly reports the new function as untested within this library's context.

To make dvc-data more robust and independently verifiable, I propose adding unit tests for the gc.py module directly in this PR. This will resolve the coverage issue and improve the library's overall quality.

Let me know if you agree with this approach, and I'll proceed with writing the tests.

@skshetry
Copy link
Collaborator

skshetry commented Jan 7, 2026

@GreenHatHG, do you mind creating a new PR with cherry-picked changes from cf348ab? Isn't that enough?

@GreenHatHG GreenHatHG force-pushed the feat/gc-dry-detailed-output branch from cf348ab to 5a42dd9 Compare January 7, 2026 11:32
@GreenHatHG GreenHatHG changed the title gc: refactor to expose garbage object iteration for dry-run gc: log paths during dry-run Jan 7, 2026
@GreenHatHG
Copy link
Contributor Author

@GreenHatHG, do you mind creating a new PR with cherry-picked changes from cf348ab? Isn't that enough?

Hi.
Oops, I actually missed your earlier comment and had already force-pushed before seeing it. 😅
Now the PR is down to a single minimal commit and the changes are the same.
Does this look good now? Ready for review/merge?

@skshetry skshetry merged commit 6301414 into treeverse:main Jan 7, 2026
23 of 24 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in DVC Jan 7, 2026
@skshetry
Copy link
Collaborator

skshetry commented Jan 7, 2026

Released dvc-data 3.18.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants