test: add regression test for --pull path nesting bug (#11005)#11025
Open
hiba-q wants to merge 1 commit intotreeverse:mainfrom
Open
test: add regression test for --pull path nesting bug (#11005)#11025hiba-q wants to merge 1 commit intotreeverse:mainfrom
hiba-q wants to merge 1 commit intotreeverse:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11025 +/- ##
==========================================
- Coverage 90.68% 88.58% -2.11%
==========================================
Files 504 503 -1
Lines 39795 41014 +1219
Branches 3141 3243 +102
==========================================
+ Hits 36087 36331 +244
- Misses 3042 3999 +957
- Partials 666 684 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why?
This PR adds a failing regression test to
tests/func/test_import.pyto capture a path-resolution bug reported in Issue #11005.Currently, running
dvc exp run --pullon a repository where data was imported usingdvc import --no-downloadbehaves correctly the first time. However, if the local target directory is deleted, a subsequent--pullcommand improperly nests the source directory inside the target (creatingtarget/source/...instead oftarget/...). This changes the directory structure and MD5 hash, breaking reproducibility.How it was implemented:
I added a test using
pytestand DVC'serepo_dirfixture that programmatically reproduces the exact workflow:dvc import --no-download.dvc exp run --pull.dvc exp run --pullagain.data/directory does not exist.Note: I am submitting this failing test first to provide a reproducible baseline while I continue investigating the ImportStage path mapping logic for a full fix.
References #11005
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏