-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
remote with relpath breaks get #2756
Comments
The solution could be to make |
Hello, I will take a look into this /cc @efiop |
@tizoc Sounds great! Please let us know if you'll have any questions :) |
Will do! So far what I have found out is that (unlike git) dvc is making non-absolute paths in the config relative to the
git:
If I manually change the path to be relative to the root of the repository the So, before going forward, my question is: Is this (paths relative to the |
@tizoc We actually transform it relative to the config file location, which by default is So yes, it is expected behaviour. In get, when we clone external repo, we need to resolve that remote path relative to the original location of that repo. Please see _set_upstream in |
Got it! after stepping the code with the debugger I see the issue now, this is what the url for the remote entry looks like for the temporary cloned repo: 'url': '/private/var/folders/sy/4w247kq176z5n2k37nn3lblw0000gn/T/tmp5_g92ir8dvc-erepo/.dvc/../../storage' Thanks for the pointer. |
Fixed in #3378 Still have to write a func test, and probably split that function into two. |
- use `tmp_dir` fixture - commit config file changes
* erepo: fix relative urls for remotes (#2756) * erepo: add test case for relative path remotes (#2756) * Remove unused argument * erepo: move handling of relative remotes to a separate method (#2756) * erepo: don't manually build paths on test (#2756) * erepo: refactor handling of missing or relative upstream (#2756) * erepo: move handling of source repo resource to `_fix_upstream` (#2756) * erepo: improve relative remote tests (#2756) - use `tmp_dir` fixture - commit config file changes * erepo: Remove comment (#2756) * erepo: use scm_add to commit too, no need for separate scm.commit call (#2756) * erepo: minor refactoring in `_fix_upstream` (#2756) * erepo: add comment explaining that old relative paths are restored (#2756)
This should be solved now that #3378 was merged. |
Will work just fine, but when we will use relpath to point to storage (as in commented line)
we will get warnings that cache files do not exist and
data
will not be created.It is happening, because, in
external_repo
we clone url to/tmp
and therefore, relative path to cache cannot be resolved properly.The text was updated successfully, but these errors were encountered: