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

tests: cache test directories #4601

Merged
merged 4 commits into from
Sep 23, 2020
Merged

tests: cache test directories #4601

merged 4 commits into from
Sep 23, 2020

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Sep 22, 2020

Quick hack to make our windows tests work more reliably on gha. Saves us creating lots of unwanted processes, especially because of gitpython. This is the sort of stuff that causes our tests to be flaky (esp windows is notorious for hanging on git commands).

Related to #2215, #4406

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

@efiop efiop changed the title [WIP] tests: use dulwich to git-init [WIP] tests: use pygit2 to git-init Sep 23, 2020
@efiop efiop force-pushed the fix-2215 branch 8 times, most recently from 56ae0d1 to aa4184c Compare September 23, 2020 19:36
@efiop efiop changed the title [WIP] tests: use pygit2 to git-init [WIP] tests: cache test directories Sep 23, 2020
@efiop efiop changed the title [WIP] tests: cache test directories tests: cache test directories Sep 23, 2020
@efiop efiop merged commit 688da04 into iterative:master Sep 23, 2020
@efiop efiop deleted the fix-2215 branch September 23, 2020 20:23
@efiop efiop added the build Issues/features related to building dvc install packages. label Sep 23, 2020
@efiop efiop self-assigned this Sep 23, 2020
@efiop efiop added the testing Related to the tests and the testing infrastructure label Sep 23, 2020
@efiop efiop added the p0-critical Critical issue. Needs to be fixed ASAP. label Sep 23, 2020
if not cache:
cache = tmp_path_factory.mktemp("dvc-test-cache" + worker_id)
TmpDir(cache).init(scm=scm, dvc=dvc, subdir=subdir)
CACHE[(scm, dvc, subdir)] = os.fspath(cache)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could've just = cache and use Path down below instead of listdir/os.path 🤦


cache = CACHE.get((scm, dvc, subdir))
if not cache:
cache = tmp_path_factory.mktemp("dvc-test-cache" + worker_id)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

worker_id is no longer needed most likely.

This is a bit rushed overall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues/features related to building dvc install packages. p0-critical Critical issue. Needs to be fixed ASAP. testing Related to the tests and the testing infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant