Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3343

Race condition in "fetch source" function in Evergreen build

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • Labels:

      The fetch source function in the C driver's Evergreen configuration retrieves the archive file uploaded by the upload build function. However, in the case of a commit-triggered build, fetch source retrieves an archive file identified by the version latest instead of an actual version (as is the case for patch builds). As a result, if a commit-triggered build is in process and another commit is pushed (thereby triggering the start of a new build), the upload build function of the new commit's build will upload a new archive that becomes latest. Any tasks from previous builds still in progress that call fetch source after the subsequent build uploads its archive will retrieve a source tarball that corresponds to a commit other than the commit for which that task is running.

      To guard against this sort of race condition, the fetch source function should always retrieve the source file based on the commit being built.

            roberto.sanchez@mongodb.com Roberto Sanchez
            roberto.sanchez@mongodb.com Roberto Sanchez
            0 Vote for this issue
            3 Start watching this issue