-
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
import-url: use dvc-data index.save()
for fetching imports
#8249
Conversation
1fb0279
to
c0008ac
Compare
a112ab8
to
7220b8c
Compare
@@ -514,6 +515,23 @@ def index_key(self) -> Tuple[str, "DataIndexKey"]: | |||
key = self.fs.path.parts(no_drive)[1:] | |||
return workspace, key | |||
|
|||
def get_entry(self) -> "DataIndexEntry": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if this should be backwards: data index is getting filled up first and then output gets info from it. SInce we want to work directly with index during operations (e.g. add/checkout/etc), it means that it should be the source of truth that is used during serializing into dvcfiles. Obviously we could try to propagate the changes back into outputs (like we do right now in cloud versioning), but I wonder if that's actually a wrong way to approach it. WDYT?
7220b8c
to
9632787
Compare
Some product questions:
|
9632787
to
29ca5a6
Compare
29ca5a6
to
ecebfcc
Compare
Yes
By default it will not automatically capture the version ID on a versioned container when the URL does not contain a version. But this PR adds
The end result here would be that DVC imports the latest/current version of |
index.save()
for fetching importsindex.save()
for fetching imports
@dberenbaum I think the last open question for this was whether to re-use |
I seem to be missing something with pulling from source or else it's not working as expected. Here's a repro script:
Pull fails for me when running it. Other comments:
|
That script works for me in 2.31.0. For the final command I get
There is no docs issue yet, I'll open a PR.
For this do you mean on For chained |
π€ Here's the verbose output from
I'll add a follow-up ticket to track the other issues. |
One more thing: If I do
|
Might be something off with your virtualenv? In a fresh venv on macos I get
|
Thanks, @pmrowla. I'm able to get it working on a clean environment. What about the directory behavior? |
The directory behavior looks like a bug, I'll look into it and open a separate issue |
β 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. π
import-url
--version-aware
flag is provided (regardless of whether or not the bucket/container has versioning enabled).--version-aware
flag, DVC will capture the latest/current version of the imported file.DataSourceChangedError
(same as whenimport-url --no-download
data source has changed)workspace
Β #8435