-
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
tests: cache test directories #4601
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
efiop
changed the title
[WIP] tests: use dulwich to git-init
[WIP] tests: use pygit2 to git-init
Sep 23, 2020
efiop
force-pushed
the
fix-2215
branch
8 times, most recently
from
September 23, 2020 19:36
56ae0d1
to
aa4184c
Compare
efiop
changed the title
[WIP] tests: use pygit2 to git-init
[WIP] tests: cache test directories
Sep 23, 2020
efiop
changed the title
[WIP] tests: cache test directories
tests: cache test directories
Sep 23, 2020
efiop
commented
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) |
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.
Could've just = cache
and use Path down below instead of listdir/os.path 🤦
efiop
commented
Sep 23, 2020
|
||
cache = CACHE.get((scm, dvc, subdir)) | ||
if not cache: | ||
cache = tmp_path_factory.mktemp("dvc-test-cache" + worker_id) |
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.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
❗ 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. 🙏