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

push/pull: support an aggregate path as a target that has multiple outputs inside #10286

Open
skshetry opened this issue Feb 7, 2024 · 2 comments
Labels
p2-medium Medium priority, should be done, but less important

Comments

@skshetry
Copy link
Member

skshetry commented Feb 7, 2024

Let's say we have the following hierarchy, where data/bar and data/foo are individual outputs.
When you do dvc push data, dvc does not know to search for outputs inside the path.

.
└── data
   ├── bar
   └── foo

At the moment, target only supports filtering subpath of an output or an exact path to the output.

So, it would work for data/foo or data/bar. And, if the data was being tracked as single output, data/bar and data/foo will work to filter the data output.


Regarding implementation, we have internal utilities to collect all outputs of a path using find_outs_by_path(recursive=True). But since it can return multiple stages, there may be assumptions that it can return only a single output/stage which have to be fixed. And, more importantly, test that it does not affect other commands, since this collect_granular is used in a lot of places.

(out,) = self.repo.find_outs_by_path(target, strict=False)

Related: #10203.

@dberenbaum
Copy link
Contributor

@skshetry Is it only about push/pull? Does it impact checkout or other commands?

@dberenbaum dberenbaum added the p2-medium Medium priority, should be done, but less important label Feb 7, 2024
@skshetry
Copy link
Member Author

skshetry commented Feb 7, 2024

Yes, it likely affects all of the commands, as most of them call collect_granular.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-medium Medium priority, should be done, but less important
Projects
None yet
Development

No branches or pull requests

2 participants