[SERVER-30210] Add buildscripts/fetch_test_lifecycle.py script for checking out appropriate version of etc/test_lifecycle.yml Created: 18/Jul/17  Updated: 30/Oct/23  Resolved: 30/Jul/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.5.11

Type: New Feature Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Yves Duhem
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: TIG 2017-07-31, TIG 2017-08-21
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 28/Jul/17 ]

Author:

{'email': 'yves.duhem@mongodb.com', 'username': 'syev', 'name': 'Yves Duhem'}

Message: SERVER-30210 Script to fetch the test lifecycle tags
Branch: master
https://github.com/mongodb/mongo/commit/2318942c2ec98c0107a83d72f352d2878490ce09

Generated at Thu Feb 08 04:23:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.