-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2236 from cms-sw/prepare-process-pr-test-files
Add files needed for testing process_pr.py; modify existing tests …
- Loading branch information
Showing
70 changed files
with
14,055 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import github | ||
|
||
dryRun = False | ||
actions = [] | ||
extra_data = "" | ||
|
||
github__issuecomment__edit = github.IssueComment.IssueComment.edit | ||
|
||
|
||
def comment__edit(self, body): | ||
actions.append({"type": "edit-comment", "data": body}) | ||
if dryRun: | ||
print("DRY RUN: Updating existing comment with text") | ||
print(body.encode("ascii", "ignore").decode()) | ||
else: | ||
return github__issuecomment__edit(self, body) | ||
|
||
|
||
github.IssueComment.IssueComment.edit = comment__edit | ||
|
||
|
||
github__issue__create_comment = github.Issue.Issue.create_comment | ||
|
||
|
||
def issue__create_comment(self, body): | ||
actions.append({"type": "create-comment", "data": body}) | ||
if dryRun: | ||
print("DRY RUN: Creating comment with text") | ||
print(body.encode("ascii", "ignore").decode()) | ||
else: | ||
github__issue__create_comment(self, body) | ||
|
||
|
||
github.Issue.Issue.create_comment = issue__create_comment | ||
|
||
|
||
github__commit__create_status = github.Commit.Commit.create_status | ||
|
||
|
||
def commit__create_status(self, state, target_url=None, description=None, context=None): | ||
actions.append( | ||
{ | ||
"type": "status", | ||
"data": { | ||
"commit": commit.sha, | ||
"state": state, | ||
"target_url": target_url, | ||
"description": description, | ||
"context": context, | ||
}, | ||
} | ||
) | ||
|
||
if target_url is None: | ||
target_url = github.GithubObject.NotSet | ||
|
||
if description is None: | ||
description = github.GithubObject.NotSet | ||
|
||
if context is None: | ||
context = github.GithubObject.NotSet | ||
|
||
if not dryRun: | ||
github__commit__create_status.create_status( | ||
self, state, target_url=target_url, description=description, context=context | ||
) | ||
else: | ||
print( | ||
"DRY RUN: set commit status state={0}, target_url={1}, description={2}, context={3}".format( | ||
state, target_url, description, context | ||
) | ||
) |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
# A ridicously long mapping for categories. Good enough for now. | ||
from categories_map import CMSSW_CATEGORIES, CMSSW_LABELS | ||
from cms_static import GH_CMSDIST_REPO as gh_cmsdist | ||
from cms_static import GH_CMSSW_ORGANIZATION as gh_user | ||
from cms_static import GH_CMSSW_REPO as gh_cmssw | ||
from releases import SPECIAL_RELEASE_MANAGERS | ||
from repo_config import CMSBUILD_USER | ||
|
||
authors = {} | ||
# Any Githib user whose comments/requests should be ignored | ||
GITHUB_BLACKLIST_AUTHORS = [] | ||
# CMS Offline Release Planning managers | ||
CMSSW_L1 = ["iarspider"] | ||
# CMS-SDT members who has admin rights to various github organizations and repositories. | ||
# They are also reposionsible to sign for externals | ||
CMS_SDT = ["iarspider"] | ||
# List of gh users who can approve a release build request | ||
APPROVE_BUILD_RELEASE = list(set(["smuzaffar"] + CMSSW_L1 + SPECIAL_RELEASE_MANAGERS)) | ||
# List of gh users who can request to build a release. | ||
REQUEST_BUILD_RELEASE = APPROVE_BUILD_RELEASE | ||
# List og gh users who are allowed to trigger Pull Request testing | ||
TRIGGER_PR_TESTS = list( | ||
set( | ||
[ | ||
"felicepantaleo", | ||
"rovere", | ||
"lgray", | ||
"bsunanda", | ||
"VinInn", | ||
"kpedro88", | ||
"makortel", | ||
"wddgit", | ||
"mtosi", | ||
"gpetruc", | ||
"gartung", | ||
"nsmith-", | ||
"mmusich", | ||
"Sam-Harper", | ||
"sroychow", | ||
"silviodonato", | ||
"slava77", | ||
] | ||
+ REQUEST_BUILD_RELEASE | ||
+ [a for a in authors if authors[a] > 10 and a not in GITHUB_BLACKLIST_AUTHORS] | ||
) | ||
) | ||
# List of on additional release managers | ||
PR_HOLD_MANAGERS = ["kpedro88"] | ||
|
||
COMMON_CATEGORIES = ["orp", "tests", "code-checks"] | ||
EXTERNAL_CATEGORIES = ["externals"] | ||
EXTERNAL_REPOS = ["cms-data", "cms-externals", gh_user, "iarspider-cmssw"] | ||
|
||
CMSSW_REPOS = [gh_user + "/" + gh_cmssw] | ||
CMSDIST_REPOS = [gh_user + "/" + gh_cmsdist] | ||
CMSSW_ISSUES_TRACKERS = list(set(CMSSW_L1 + ["smuzaffar", "Dr15Jones", "makortel"])) | ||
COMPARISON_MISSING_MAP = ["slava77"] | ||
|
||
# CMS L2's and the CMSSW categories they are responsible for. They can also request to start pull requests testing | ||
CMSSW_L2 = { | ||
"Dr15Jones": ["core", "visualization", "geometry"], | ||
"Martin-Grunewald": ["hlt"], | ||
"mmusich": ["hlt"], | ||
"AdrianoDee": ["pdmv"], | ||
"alberto-sanchez": ["generators"], | ||
"alja": ["visualization"], | ||
"bbilin": ["generators"], | ||
"civanch": ["simulation", "geometry", "fastsim"], | ||
"bsunanda": ["geometry"], | ||
"davidlange6": ["operations"], | ||
"emeschi": ["daq"], | ||
"vlimant": ["xpog"], | ||
"hqucms": ["xpog"], | ||
"fwyzard": ["heterogeneous"], | ||
"GurpreetSinghChahal": ["generators"], | ||
"jfernan2": ["reconstruction"], | ||
"kskovpen": ["pdmv"], | ||
"sunilUIET": ["pdmv"], | ||
"miquork": ["pdmv", "jetmet-pog"], | ||
"makortel": ["heterogeneous", "core", "visualization", "geometry"], | ||
"mandrenguyen": ["reconstruction"], | ||
"mdhildreth": ["simulation", "geometry", "fastsim"], | ||
"mkirsano": ["generators"], | ||
"menglu21": ["generators"], | ||
"rappoccio": ["operations"], | ||
"antoniovilela": ["operations"], | ||
"epalencia": ["l1"], | ||
"aloeliger": ["l1"], | ||
"rvenditti": ["dqm"], | ||
"syuvivida": ["dqm"], | ||
"tjavaid": ["dqm"], | ||
"nothingface0": ["dqm"], | ||
"antoniovagnerini": ["dqm"], | ||
"sbein": ["fastsim"], | ||
"SiewYan": ["generators"], | ||
"smorovic": ["daq"], | ||
"smuzaffar": ["core"], | ||
"srimanob": ["upgrade"], | ||
"subirsarkar": ["upgrade"], | ||
"ssekmen": ["fastsim"], | ||
"francescobrivio": ["db"], | ||
"tvami": ["analysis"], | ||
"saumyaphor4252": ["alca", "db"], | ||
"perrotta": ["alca", "db"], | ||
"consuegs": ["alca", "db"], | ||
CMSBUILD_USER: ["tests"], | ||
# dpgs | ||
"connorpa": ["trk-dpg"], | ||
"sroychow": ["trk-dpg"], | ||
"wang0jin": ["ecal-dpg"], | ||
"thomreis": ["ecal-dpg"], | ||
"wang-hui": ["hcal-dpg"], | ||
"jhakala": ["hcal-dpg"], | ||
"abdoulline": ["hcal-dpg"], | ||
"igv4321": ["hcal-dpg"], | ||
"mileva": ["muon-dpg"], | ||
"battibass": ["muon-dpg", "dt-dpg"], | ||
"fcavallo": ["dt-dpg"], | ||
"namapane": ["dt-dpg"], | ||
"ptcox": ["csc-dpg"], | ||
"jhgoh": ["rpc-dpg"], | ||
"andresib": ["rpc-dpg"], | ||
"pavlov": ["rpc-dpg"], | ||
"kamon": ["gem-dpg"], | ||
"jshlee": ["gem-dpg"], | ||
"watson-ij": ["gem-dpg"], | ||
"fabferro": ["ctpps-dpg"], | ||
"jan-kaspar": ["ctpps-dpg"], | ||
"vavati": ["ctpps-dpg"], | ||
"rovere": ["hgcal-dpg"], | ||
"cseez": ["hgcal-dpg"], | ||
"pfs": ["hgcal-dpg"], | ||
"felicepantaleo": ["hgcal-dpg"], | ||
"fabiocos": ["mtd-dpg", "operations"], | ||
"MartinaMalberti": ["mtd-dpg"], | ||
"parbol": ["mtd-dpg"], | ||
# pogs | ||
"bellan": ["pf"], | ||
"kdlong": ["pf"], | ||
"swagata87": ["pf"], | ||
"a-kapoor": ["egamma-pog"], | ||
"RSalvatico": ["egamma-pog"], | ||
"kirschen": ["jetmet-pog"], | ||
"alkaloge": ["jetmet-pog"], | ||
"knollejo": ["lumi-pog"], | ||
"cschwick": ["lumi-pog"], | ||
"gkaratha": ["muon-pog"], | ||
"JanFSchulte": ["muon-pog"], | ||
"SWuchterl": ["btv-pog"], | ||
"mondalspandan": ["btv-pog"], | ||
"michael-pitt": ["proton-pog"], | ||
"kshcheli": ["proton-pog"], | ||
"cardinia": ["tau-pog"], | ||
"danielwinterbottom": ["tau-pog"], | ||
"slava77": ["tracking-pog"], | ||
"kskovpen": ["tracking-pog"], | ||
# PPD | ||
"malbouis": ["ppd"], | ||
"jordan-martins": ["ppd"], | ||
# ML | ||
"valsdav": ["ml"], | ||
"wpmccormack": ["ml"], | ||
} | ||
|
||
# All CMS_SDT members can sign externals ( e.g Pull Requests in cms-sw/cmsdist , cms-data and cms-externals | ||
for user in CMS_SDT: | ||
if user not in CMSSW_L2: | ||
CMSSW_L2[user] = ["externals"] | ||
elif "externals" not in CMSSW_L2[user]: | ||
CMSSW_L2[user].append("externals") | ||
|
||
# All CMSSW L1 can sign for ORP | ||
for user in CMSSW_L1: | ||
if user not in CMSSW_L2: | ||
CMSSW_L2[user] = ["orp"] | ||
else: | ||
CMSSW_L2[user].append("orp") | ||
|
||
USERS_TO_TRIGGER_HOOKS = set(TRIGGER_PR_TESTS + CMSSW_ISSUES_TRACKERS + list(CMSSW_L2.keys())) | ||
CMS_REPOS = set(CMSDIST_REPOS + CMSSW_REPOS + EXTERNAL_REPOS) | ||
|
||
for user in CMSSW_L2: | ||
for cat in CMSSW_L2[user]: | ||
if cat not in CMSSW_CATEGORIES: | ||
CMSSW_CATEGORIES[cat] = [] | ||
|
||
|
||
def external_to_package(repo_fullname): | ||
org, repo = repo_fullname.split("/", 1) | ||
if org == "cms-data": | ||
return repo.replace("-", "/") | ||
return "" | ||
|
||
|
||
# extra labels which bot cn add via 'type label' comment | ||
def get_dpg_pog(): | ||
groups = ["pf", "l1t", "castor"] | ||
for user in CMSSW_L2: | ||
for cat in CMSSW_L2[user]: | ||
if "-" not in cat: | ||
continue | ||
grp, ctype = cat.split("-", 1) | ||
if ctype in ["pog", "dpg"]: | ||
groups.append(grp) | ||
return list(set(groups)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Map between github username and the list of cmssw categories to watch e.g. alca, db, core etc. | ||
# valid categories are available here http://cms-sw.github.io/categories.html | ||
tocheng: | ||
- alca | ||
mmusich: | ||
- alca | ||
- db | ||
silviodonato: | ||
- hlt | ||
PonIlya: | ||
- db | ||
yuanchao: | ||
- alca | ||
- db | ||
rsreds: | ||
- alca | ||
- db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
tracking-pog: | ||
- VinInn | ||
- mtosi | ||
- JanFSchulte | ||
- mmusich | ||
- VourMa | ||
btv-pog: | ||
- JyothsnaKomaragiri | ||
- emilbols | ||
- andrzejnovak | ||
- demuller | ||
- AlexDeMoor | ||
- AnnikaStein | ||
- Ming-Yan | ||
- Senphy | ||
ecal-offline: | ||
- wang0jin | ||
- thomreis | ||
- ReyerBand | ||
pixel-offline: | ||
- dkotlins | ||
- ferencek | ||
- tvami | ||
- mroguljic | ||
trk-dqm: | ||
- arossi83 | ||
- sroychow | ||
tau-pog: | ||
- mbluj | ||
- azotz | ||
muon-reco: | ||
- CeliaFernandez | ||
- andrea21z |
Oops, something went wrong.