Skip to content

Conversation

@skshetry
Copy link
Collaborator

The subrepos were not removed from getting traversed, due to which it was causing race conditions, as we were expecting
different directories to be traversed but as subrepos were still there, next(repo_walk) could consume from the subrepo instead of the expected directories.

This was too hard to debug 😥.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@skshetry skshetry added the bugfix fixes bug label Aug 31, 2020
@skshetry skshetry requested review from efiop, pared and pmrowla August 31, 2020 13:13
@skshetry skshetry self-assigned this Aug 31, 2020


@pytest.mark.parametrize("traverse_subrepos", [True, False])
def test_walk_nested_subrepos(tmp_dir, dvc, scm, traverse_subrepos):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The tests setup is a bit lengthy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could not reduce it. Tell me if it's confusing.

@skshetry skshetry changed the title tree.repo: fix race condition when walking nested subrepos tree.repo: fix race condition when walking subrepos Aug 31, 2020
@skshetry
Copy link
Collaborator Author

To clarify: the bug might affect any directory that contains at least a sub-repo and other files/dirs when walk-ing.

@efiop efiop merged commit 747cb64 into treeverse:master Sep 1, 2020
@skshetry skshetry deleted the fix-repotree-walk branch September 1, 2020 04:15
@efiop
Copy link
Contributor

efiop commented Sep 1, 2020

Good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix fixes bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants