-
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
dvc.api.DVCFileSystem
not working with rev=...
#8705
Comments
Hi, @rlamy I would like to work on this issue. I have set up everything and reproduced the error. So far I think it is a file full path-related problem. |
@karanjakhar I'm investigating this as well, but feel free to send a PR, as I probably won't have time to fix this before the holidays. So the issue happens in That wrong value comes from from dvc.repo import Repo
repo = Repo(rev="HEAD")
odb = repo.odb._odb["repo"]
print(odb.fs, odb.path) Result:
|
@rlamy why |
@rlamy so far I can't find any bug or problem with the process, I think we need to pass the full path in the initialization of ODBManger in case the rev parameter is used. |
@rlamy Should FileSystem be gitfs or path should be absolute? |
@karanjakhar sorry for the delay, got lost in notifications.
He meant that it is "formally" correct, because the root of the repo in gitfs is
That sounds correct.
gitfs. From DvcFileSystem perspective it's root is |
@efiop So when "rev" is passed. odb.fs should be gitfs right? |
@karanjakhar Ah, looks like I misunderstood you. odb.fs should be localfs, not gitfs and odb.path should be an absolute local path, not gitfs path. |
As odb is renamed to cache. To reproduce this issue now: from dvc.repo import Repo
repo = Repo(rev="HEAD")
odb = repo.cache._odb["repo"]
print(odb.fs, odb.path) |
Setting default values is very untypical for all other applications and the info config has is not enough to make a decision on the default cache dir, especially when dealing with gitfs. Fixes iterative#8705
Setting default values is very untypical for all other applications and the info config has is not enough to make a decision on the default cache dir, especially when dealing with gitfs. Fixes iterative#8705
Setting default values is very untypical for all other applications and the info config has is not enough to make a decision on the default cache dir, especially when dealing with gitfs. Fixes iterative#8705
Setting default values is very untypical for all other applications and the info config has is not enough to make a decision on the default cache dir, especially when dealing with gitfs. Fixes iterative#8705
Setting default values is very untypical for all other applications and the info config has is not enough to make a decision on the default cache dir, especially when dealing with gitfs. Fixes iterative#8705
Setting default values is very untypical for all other applications and the info config has is not enough to make a decision on the default cache dir, especially when dealing with gitfs. Fixes iterative#8705
Setting default values is very untypical for all other applications and the info config has is not enough to make a decision on the default cache dir, especially when dealing with gitfs. Fixes iterative#8705
Setting default values is very untypical for all other applications and the info config has is not enough to make a decision on the default cache dir, especially when dealing with gitfs. Fixes #8705
Bug Report
Description
I am unable to use the
dvc.api.DVCFileSystem(".", rev="da6..")
if I setref=...
.Reproduce
then use the following script
main.py
:python main.py
works fine for me butpython main.py <any revision from git log>
yields:Environment information
Output of
dvc doctor
:The text was updated successfully, but these errors were encountered: