Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: bump dvc-data to 0.26.0 #8566

Merged
merged 2 commits into from
Nov 17, 2022
Merged

deps: bump dvc-data to 0.26.0 #8566

merged 2 commits into from
Nov 17, 2022

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Nov 15, 2022

Co-authored-by: Peter Rowlands peter@iterative.ai

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Base: 94.32% // Head: 94.34% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (1402cb2) compared to base (fdc6899).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8566      +/-   ##
==========================================
+ Coverage   94.32%   94.34%   +0.02%     
==========================================
  Files         430      430              
  Lines       32835    32847      +12     
  Branches     4583     4584       +1     
==========================================
+ Hits        30970    30989      +19     
+ Misses       1447     1440       -7     
  Partials      418      418              
Impacted Files Coverage Δ
tests/func/test_import.py 100.00% <100.00%> (ø)
tests/func/experiments/test_experiments.py 99.72% <0.00%> (+<0.01%) ⬆️
tests/unit/test_analytics.py 100.00% <0.00%> (+1.42%) ⬆️
dvc/commands/experiments/ls.py 96.77% <0.00%> (+20.91%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@efiop efiop changed the title deps: bump dvc-data to 0.26.0 [WIP] deps: bump dvc-data to 0.26.0 Nov 15, 2022
@efiop efiop marked this pull request as draft November 15, 2022 22:55
@pmrowla
Copy link
Contributor

pmrowla commented Nov 17, 2022

@efiop test failures aren't a sync issue. The problem is that in a lot of tests we do remove(dvc.odb.local.path) to clean the cache directory, but the odb._dirs set will not be cleared afterwards. So we never do makedirs() again to re-populate the cache.

This only shows up in the import tests because in the import tests we immediately try to re-import files and eventually call odb.add() again which generates FileNotFoundError due to the parent dirs not being mkdir'd (since they are still in odb._dirs).

Most of the other tests where we clear the cache we are checking for FileNotFoundErrors afterwards expecting missing cache files, but the dvc-objects change is now generating FileNotFoundError due to the missing parent directories so those tests just happen to pass (but the raised FileNotFoundError is not really the exception we are looking for)

@pmrowla
Copy link
Contributor

pmrowla commented Nov 17, 2022

I'm not sure a user would ever hit this problem, so we could just add a test helper method that does something like

clean_odb(odb):
    remove(odb.path)
    odb._dirs.clear()

and use clean_odb(dvc.odb.local) in the tests instead of the current remove() calls

@efiop
Copy link
Contributor Author

efiop commented Nov 17, 2022

@pmrowla Great points! We also have odb.clear() these days that we could consider using instead (we use it in a few places, but clearly this one was missed).

Co-authored-by: Peter Rowlands <peter@iterative.ai>
@efiop efiop changed the title [WIP] deps: bump dvc-data to 0.26.0 deps: bump dvc-data to 0.26.0 Nov 17, 2022
@efiop efiop marked this pull request as ready for review November 17, 2022 08:41
@efiop efiop merged commit b36861a into main Nov 17, 2022
@efiop efiop deleted the efiop-patch-1 branch November 17, 2022 08:56
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.

None yet

3 participants