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

Add buildscripts/fetch_test_lifecycle.py script for checking out appropriate version of etc/test_lifecycle.yml

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.11
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • Fully Compatible
    • TIG 2017-07-31, TIG 2017-08-21

      After some discussion around not having a bot automatically creating and resolving SERVER tickets, we've decided to move the etc/test_lifecycle.yml file to a separate https://github.com/mongodb/mongo-test-metadata GitHub repository. This impacts how we get the version of the etc/test_lifecycle.yml file corresponding to the mongodb/mongo commit the Evergreen task is running.

      Per the description of SERVER-29645, every commit on the etc/test_lifecycle.yml file in the mongodb/mongo-test-metadata repository will also update the references.yml file with the corresponding commit of the mongodb/mongo repository. In order to get the corresponding version of etc/test_lifecycle.yml, we'll want to use the following algorithm:

      For each revision <commit_metadata> that modifying etc/test_lifecycle.yml:
      (Effectively: git rev-list HEAD -- etc/test_lifecycle.yml)
      
          Get the version of references.yml at that commit.
          (Effectively: git cat-file blob <commit_metadata>:etc/test_lifecycle.yml)
      
          Parse the references.yml file to get <commit_mongodb_mongo_master>.
      
          If the commit of the Evergreen task ${revision} comes after <commit_mongodb_mongo_master>, then break.
          (Effectively: if git merge-base --is-ancestor <commit_mongodb_mongo_master> ${revision} returns 0, the break)
      

      The etc/test_lifecycle.yml from the mongodb/mongo-test-metadata repository should be added to the artifacts.tgz tarball as part of the compile task so that the test metadata doesn't need to be re-fetched when executing subsequent tasks. This also has the benefit that even if the subsequent tasks are restarted, they will continue use the same version of the etc/test_lifecycle.yml file as they did originally.

      Note: This ticket should remove the etc/test_lifecycle.yml file in the mongodb/mongo repository.

            Assignee:
            yves.duhem Yves Duhem
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: