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

TST: test_partial_unlocked: Document and avoid recent git-annex failure #5639

Merged
merged 1 commit into from May 5, 2021

Conversation

kyleam
Copy link
Contributor

@kyleam kyleam commented May 4, 2021

git-annex's 424bef6b6 (smudge: check for known annexed inodes before
checking annex.largefiles, 2021-05-03) fixed a case where an unchanged
unlocked annexed file that does not match annex.largefiles gets sent
to git.

That change leads to a racy failure of test_partial_unlocked. The
test unlocks a file and then configures .gitattributes so that the
file doesn't match annex.largefiles. Before 424bef6b6, providing that
file as a pathspec to git commit (as datalad save does) results in
a commit where the file changes to being tracked by git. With
424bef6b6, the above sometimes doesn't happen; instead the commit
includes the link to a pointer file change, and the change to being
tracked by git remains in the index.

This issue has been reported upstream. For now, document it, and
adjust the test to avoid the intermittent failure.

Closes #5637

[1] https://git-annex.branchable.com/bugs/case_where_using_pathspec_with_git-commit_leaves_s/

git-annex's 424bef6b6 (smudge: check for known annexed inodes before
checking annex.largefiles, 2021-05-03) fixed a case where an unchanged
unlocked annexed file that does not match annex.largefiles gets sent
to git.

That change leads to a racy failure of test_partial_unlocked.  The
test unlocks a file and then configures .gitattributes so that the
file doesn't match annex.largefiles.  Before 424bef6b6, providing that
file as a pathspec to `git commit` (as `datalad save` does) results in
a commit where the file changes to being tracked by git.  With
424bef6b6, the above sometimes doesn't happen; instead the commit
includes the link to a pointer file change, and the change to being
tracked by git remains in the index.

This issue has been reported upstream.  For now, document it, and
adjust the test to avoid the intermittent failure.

Closes datalad#5637

[1] https://git-annex.branchable.com/bugs/case_where_using_pathspec_with_git-commit_leaves_s/
@yarikoptic
Copy link
Member

I am proud of our testing battery ;)

@codecov
Copy link

codecov bot commented May 4, 2021

Codecov Report

Merging #5639 (501c9d0) into maint (63f7ba0) will decrease coverage by 0.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##            maint    #5639      +/-   ##
==========================================
- Coverage   90.20%   90.19%   -0.02%     
==========================================
  Files         299      299              
  Lines       42247    42262      +15     
==========================================
+ Hits        38111    38120       +9     
- Misses       4136     4142       +6     
Impacted Files Coverage Δ
datalad/core/local/tests/test_save.py 96.53% <33.33%> (-0.79%) ⬇️
datalad/plugin/tests/test_plugins.py 91.05% <0.00%> (-0.98%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63f7ba0...501c9d0. Read the comment docs.

@kyleam kyleam merged commit 8dc1c56 into datalad:maint May 5, 2021
@kyleam kyleam deleted the test-adjust-partial-unlocked branch May 5, 2021 13:30
@yarikoptic yarikoptic added semver-patch Increment the patch version when merged tests Add or improve existing tests and removed semver-patch Increment the patch version when merged labels Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Add or improve existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants