Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30634

Git detects all files as having changed on Windows causing burn_in_tests task to time out in Evergreen



    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
    • Backport Requested:
      v3.6, v3.4
    • Sprint:
      TIG 2017-10-23, TIG 2017-11-13, TIG 2017-12-04


      See this Evergreen task timeout as an example.

      My initial suspicion was that core.autocrlf wasn't being set to true when we cloned repositories in Evergreen on Windows, so I tried out the following patch in an Evergreen patch build. Had I tested it out locally, I would have immediately found out that specifying the --name-only to git diff causes it to ignore the --ignore-space-at-eol option and still display the names of files whose only changes are LF -> CRLF. (git diff --ignore-space-at-eol correctly generates no output though.)

      diff --git a/buildscripts/burn_in_tests.py b/buildscripts/burn_in_tests.py
      index a78c905f97..4251a11c07 100644
      --- a/buildscripts/burn_in_tests.py
      +++ b/buildscripts/burn_in_tests.py
      @@ -175,7 +175,13 @@ def find_changed_tests(branch_name, base_commit, max_revisions, buildvariant, ch
                     "the --maxRevisions option."
               return changed_tests
      -    changed_files = callo(["git", "diff", "--name-only", base_commit]).splitlines()
      +    changed_files = callo(["git",
      +                           "diff",
      +                           "--name-only",
      +                           # We specify --ignore-space-at-eol to avoid considering a file changed on
      +                           # Windows simply because core.autocrlf isn't set to true.
      +                           "--ignore-space-at-eol",
      +                           base_commit]).splitlines()
           # New files ("untracked" in git terminology) won't show up in the git diff results.
           untracked_files = callo(["git", "status", "--porcelain"]).splitlines()

      Further investigation is still needed, but I'm filing this ticket so that we can temporarily disable the burn_in_tests task on the "Windows 2008R2 DEBUG" builder rather than reverting the changes from SERVER-30565. The changes from SERVER-30565 are still desirable to avoid causing the compile task to fail when the Evergreen API server isn't available.


          Issue Links



              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: