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

repo: use is_repo_import to check for imports in outs_graph #9925

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions dvc/repo/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,9 @@ def build_outs_graph(graph, outs_trie):

outs_graph.add_nodes_from(outs_trie.values())
for stage in graph.nodes():
if stage.is_repo_import:
continue
Comment on lines +161 to +162
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this check could actually be if stage.is_import here since outs can't overlap with external dep paths now?

(But I left the check as repo imports only for now to match the original behavior, and since import-url deps won't cause the erepo git cloning issue)

for dep in stage.deps:
if dep.fs_path is None:
# RepoDependency don't have a path
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer valid since repo deps now have a dvcfs fs_path

continue
dep_key = dep.fs.path.parts(dep.fs_path)
overlapping = [n.value for n in outs_trie.prefixes(dep_key)]
if outs_trie.has_subtrie(dep_key):
Expand Down