You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test: checkout --unstaged test is flaky. I have not been able to reproduce the failure (yet) on my laptop, but it is currently breaking Travis CI builds on Go 1.6.
/cc @orivej could you please take a look at these test and see if you can figure out what's causing them to fail in that particular environment? Thanks!
Meanwhile, you should disable git diff-files checks in the checkout --unstaged test as they are only meant to differentiate checkout and checkout --unstaged functionality, and the actual output of git diff-files is not interesting to the user.
Is git diff-files supposed to be empty, and therefore also not contain the string file1.dat? If the name is not supposed to be there, grep in that case is going to exit 1 and by set -e the test fails. I don't know why it passes sometimes - perhaps git diff-files completes so-fast with no output that bash doesn't even bother to create the pipe and start grep?
I may be totally misunderstanding the sense of the test - please confirm whether diff-files should be empty (exits 0), and therefore the grep should also fail.
The test checks the behaviour of checkout --unstaged command that performs checkout skipping git update-index. Therefore large files should be present only in the working copy and not in the index, and git diff-files will show the difference between the working copy and the index. Normally during this test git diff-files outputs:
:100644 100644 5731942191cb145b334b73f1a2a5ae4346041780 0000000000000000000000000000000000000000 M file1.dat
However, due to interaction with the smudge filter that I don't yet understand, after performing some git commands in the checkout, e.g. git status, large files appear to be indexed (and future git diff-files output nothing). Ideally after checkout --unstagedgit status and other commands will not affect the apparent state of the index. (Or, even better but unlikely, it is possible to achieve the same result as with checkout without doing git update-index.)
I have not yet reproduced test failure locally, even with the version of git used in Travis.
No, Travis output reveals that the test fails because git diff-files outputs nothing, and that's it. The test also does not fail in the quay.io/travisci/travis-go docker image (with go1.6).
My first priority is to understand why after git statusgit diff-files outputs nothing, then I expect to be able change git-lfs such that running git status does not affect the state of the index, and then hopefully the test will pass, and also file1.dat will be mentioned by git status.
My guess is that it's timestamp / git version sensitive. The git update-index call is made to ensure that all the cached values in the index are corrected, because of efforts to avoid the 'racy clean' problem in git can make it unreliable if you don't. Given the problems I've seen around this in the past I'm not sure the --unstaged option as added can ever be 100% guaranteed to provide a clean state.
Last I recall this test was failing in my sandbox build. So if there's debug code or that could be added to diagnose, send it over, although I guess that could equally be added and run in Travis.
Activity
orivej commentedon Jun 29, 2016
Still investigating…
Meanwhile, you should disable
git diff-fileschecks in thecheckout --unstagedtest as they are only meant to differentiatecheckoutandcheckout --unstagedfunctionality, and the actual output ofgit diff-filesis not interesting to the user.javabrett commentedon Jun 30, 2016
Is
git diff-filessupposed to be empty, and therefore also not contain the string file1.dat? If the name is not supposed to be there,grepin that case is going to exit 1 and byset -ethe test fails. I don't know why it passes sometimes - perhapsgit diff-filescompletes so-fast with no output thatbashdoesn't even bother to create the pipe and startgrep?I may be totally misunderstanding the sense of the test - please confirm whether
diff-filesshould be empty (exits 0), and therefore the grep should also fail.orivej commentedon Jun 30, 2016
The test checks the behaviour of
checkout --unstagedcommand that performscheckoutskippinggit update-index. Therefore large files should be present only in the working copy and not in the index, andgit diff-fileswill show the difference between the working copy and the index. Normally during this testgit diff-filesoutputs:However, due to interaction with the smudge filter that I don't yet understand, after performing some git commands in the checkout, e.g.
git status, large files appear to be indexed (and futuregit diff-filesoutput nothing). Ideally aftercheckout --unstagedgit statusand other commands will not affect the apparent state of the index. (Or, even better but unlikely, it is possible to achieve the same result as withcheckoutwithout doinggit update-index.)I have not yet reproduced test failure locally, even with the version of git used in Travis.
ttaylorr commentedon Jun 30, 2016
@orivej I haven't been able to reproduce it locally either :-(. Are you able to debug from the output of one of the failing tests I listed above?
orivej commentedon Jun 30, 2016
No, Travis output reveals that the test fails because
git diff-filesoutputs nothing, and that's it. The test also does not fail in thequay.io/travisci/travis-godocker image (with go1.6).My first priority is to understand why after
git statusgit diff-filesoutputs nothing, then I expect to be able changegit-lfssuch that runninggit statusdoes not affect the state of the index, and then hopefully the test will pass, and alsofile1.datwill be mentioned bygit status.sinbad commentedon Jul 4, 2016
This test is failing on my PR too, stopping it from being merged: https://travis-ci.org/github/git-lfs/jobs/142187444
My guess is that it's timestamp / git version sensitive. The
git update-indexcall is made to ensure that all the cached values in the index are corrected, because of efforts to avoid the 'racy clean' problem in git can make it unreliable if you don't. Given the problems I've seen around this in the past I'm not sure the--unstagedoption as added can ever be 100% guaranteed to provide a clean state.javabrett commentedon Jul 4, 2016
Last I recall this test was failing in my sandbox build. So if there's debug code or that could be added to diagnose, send it over, although I guess that could equally be added and run in Travis.