For a given release, we need to apply the rules of file ownership to a given file to determine its owners at the time of release. Assume that we have checked out the Chromium Git tree to a given release, and then need to iterate over each filepath to determine the owners. The release number will also be a given.
To get the release_filepaths, we use git ls-tree in this script. Let's also only look at source code files, which can be found in our ReleaseFilepath model here
Follow the rules of Chromium OWNERS found here to determine who owns which file.
If the file has * as the owner, then the owner should be marked ALL, and we'll handle it differently. Otherwise, we need email addresses
Should be a standalone script. Doesn't need to be aware of the Rails environment
Doesn't really need to use Git - we can just assume we're checked out at the proper revision and we can traverse the source tree recursively in Ruby
The script will run on each source code file, and then parse the relevant OWNERS files. There are about 15,000-22,000 source code files in each release, and about 884 OWNERS files - so it might run for a while and have around 50,000 lines in each CSV.
For a given release, we need to apply the rules of file ownership to a given file to determine its owners at the time of release. Assume that we have checked out the Chromium Git tree to a given release, and then need to iterate over each filepath to determine the owners. The release number will also be a given.
To get the release_filepaths, we use
git ls-tree
in this script. Let's also only look at source code files, which can be found in ourReleaseFilepath
model hereFollow the rules of Chromium OWNERS found here to determine who owns which file.
If the file has
*
as the owner, then the owner should be markedALL
, and we'll handle it differently. Otherwise, we need email addressesHere's an example: