Skip to content

Commit

Permalink
Release build issue testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed Aug 6, 2019
1 parent eb1a272 commit 7abea1e
Show file tree
Hide file tree
Showing 80 changed files with 22 additions and 3,304 deletions.
65 changes: 9 additions & 56 deletions categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,79 +7,32 @@

authors = {}
GITHUB_BLACKLIST_AUTHORS = []
CMSSW_L1 = ["davidlange6", "fabiocos", "kpedro88"]
APPROVE_BUILD_RELEASE = list(set([ "smuzaffar", "slava77" ] + CMSSW_L1))
REQUEST_BUILD_RELEASE = APPROVE_BUILD_RELEASE
TRIGGER_PR_TESTS = list(set([ "lgray", "bsunanda", "VinInn", "kpedro88", "makortel", "wddgit", "mtosi", "gpetruc", "gartung", "nsmith-"] + REQUEST_BUILD_RELEASE + [ a for a in authors if authors[a]>10 and not a in GITHUB_BLACKLIST_AUTHORS ]))
PR_HOLD_MANAGERS = [ "kpedro88" ]
CMSSW_L1 = ['gartung']
APPROVE_BUILD_RELEASE = list(set([ 'gartung' ] + CMSSW_L1))
REQUEST_BUILD_RELEASE = list(set(['gartung'] + APPROVE_BUILD_RELEASE))
TRIGGER_PR_TESTS = list(set([ "gartung"] + REQUEST_BUILD_RELEASE + [ a for a in authors if authors[a]>10 and not a in GITHUB_BLACKLIST_AUTHORS ]))
PR_HOLD_MANAGERS = [ "gartung" ]

COMMON_CATEGORIES = [ "orp", "tests", "code-checks" ]
EXTERNAL_CATEGORIES = [ "externals" ]
EXTERNAL_REPOS = [ "cms-data", "cms-externals", gh_user]

CMSSW_REPOS = [ gh_user+"/"+gh_cmssw ]
CMSDIST_REPOS = [ gh_user+"/"+gh_cmsdist ]
CMSSW_ISSUES_TRACKERS = list(set(CMSSW_L1 + [ "smuzaffar", "Dr15Jones" ]))
COMPARISON_MISSING_MAP = [ "slava77" ]
CMSSW_ISSUES_TRACKERS = list(set(CMSSW_L1 + [ 'gartung' ]))
COMPARISON_MISSING_MAP = [ "gartung" ]

CMSSW_L2 = {
"Dr15Jones": ["core", "visualization", "geometry"],
"Martin-Grunewald": ["hlt"],
"alberto-sanchez": ["generators"],
"agrohsje": ["generators"],
"alja": ["visualization"],
"andrius-k": ["dqm"],
"benkrikler": ["l1"],
"civanch": ["simulation", "geometry", "fastsim"],
"cmsdoxy": ["docs"],
"cvuosalo": ["geometry"],
"davidlange6": ["operations"],
"efeyazgan": ["generators"],
"emeschi": ["daq"],
"fabiocos": ["operations"],
"fgolf": ["xpog"],
"franzoni": ["operations", "alca"],
"fwyzard": ["hlt"],
"ggovi": ["db"],
"gudrutis": ["externals"],
"ianna": ["geometry"],
"jfernan2": ["dqm"],
"kmaeshima": ["dqm"],
"fioriNTU": ["dqm"],
"kpedro88": ["upgrade"],
"lveldere": ["fastsim"],
"mdhildreth": ["simulation", "geometry", "fastsim"],
"mommsen": ["daq"],
"mrodozov": ["externals"],
"perrotta": ["reconstruction"],
"peruzzim": ["xpog"],
"pgunnell": ["pdmv"],
"pohsun": ["alca"],
"prebello": ["pdmv"],
"qliphy": ["generators"],
"rekovic": ["l1"],
"santocch": ["analysis"],
"sbein": ["fastsim"],
"schneiml": ["dqm"],
"slava77": ["reconstruction"],
"smuzaffar": ["core", "externals"],
"ssekmen": ["fastsim"],
"tlampen": ["alca"],
"tocheng": ["alca"],
"zhenhu": ["pdmv"],
"christopheralanwest": ["alca"],
"gartung": ["larsoft","larsoftobj"],
CMSBUILD_USER: ["tests" ],
}

USERS_TO_TRIGGER_HOOKS = set(TRIGGER_PR_TESTS + CMSSW_ISSUES_TRACKERS + list(CMSSW_L2.keys()))
CMS_REPOS = set(CMSDIST_REPOS + CMSSW_REPOS + EXTERNAL_REPOS)
from datetime import datetime
COMMENT_CONVERSION = {}
COMMENT_CONVERSION['kpedro88']={'comments_before': datetime.strptime('2018-07-13','%Y-%m-%d'), 'comments':[('+1', '+upgrade')]}


def external_to_package(repo_fullname):
org, repo = repo_fullname.split("/",1)
if org == "cms-data":
return repo.replace('-','/')
return ''
return repo
2 changes: 1 addition & 1 deletion cms_static.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GH_CMSSW_ORGANIZATION = 'LArSoft'
GH_CMSSW_REPO = 'larsoft'
GH_CMSDIST_REPO = 'cmsdist'
BUILD_REL = '^[Bb]uild[ ]+LArSoft[ ]+v(_[0-9]*)*'
BUILD_REL = '^[Bb]uild[ ]+(LArSoft[ ]+)(v[0-9]+_[0-9]+_[0-9]+)'
NEW_ISSUE_PREFIX = 'A new Issue was created by '
NEW_PR_PREFIX = 'A new Pull Request was created by '
ISSUE_SEEN_MSG = '^A new (Pull Request|Issue) was created by '
Expand Down
1 change: 1 addition & 0 deletions config.map
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SCRAM_ARCH=slc7_amd64_gcc700;PKGTOOLS_TAG=V00-32-XX;CMSDIST_TAG=IB/CMSSW_11_0_X/gcc700;RELEASE_BRANCH=master;RELEASE_QUEUE=v08_00_X;BUILD_PATCH_RELEASE=1;ADDITIONAL_TESTS=HLT,baseline,static-checks,fwlite,valgrind,igprof-mp,igprof-pp,iwyu,lizard,flawfinder,check-headers,cfipython,gpu,python3,invalid-includes;PR_TESTS=1;PROD_ARCH=1;ENABLE_DEBUG=1;PRS_TEST_CLANG=1;DOCKER_IMG=cmssw/cc7:latest;
SCRAM_ARCH=slc7_amd64_gcc700;PKGTOOLS_TAG=V00-32-XX;CMSDIST_TAG=IB/CMSSW_11_0_X/gcc700;RELEASE_BRANCH=master;RELEASE_QUEUE=CMSSW_11_0_X;BUILD_PATCH_RELEASE=1;ADDITIONAL_TESTS=HLT,baseline,static-checks,fwlite,valgrind,igprof-mp,igprof-pp,iwyu,lizard,flawfinder,check-headers,cfipython,gpu,python3,invalid-includes;PR_TESTS=1;PROD_ARCH=1;ENABLE_DEBUG=1;PRS_TEST_CLANG=1;DOCKER_IMG=cmssw/cc7:latest;
SCRAM_ARCH=slc7_amd64_gcc700;PKGTOOLS_TAG=V00-32-XX;CMSDIST_TAG=IB/CMSSW_11_0_X/geant104;RELEASE_BRANCH=master;RELEASE_QUEUE=CMSSW_11_0_GEANT104_X;DOCKER_IMG=cmssw/cc7:latest;BUILD_HOUR=24;
SCRAM_ARCH=slc7_amd64_gcc820;PKGTOOLS_TAG=V00-32-XX;CMSDIST_TAG=IB/CMSSW_11_0_X/gcc820;RELEASE_BRANCH=master;RELEASE_QUEUE=CMSSW_11_0_X;DOCKER_IMG=cmssw/cc7:latest;BUILD_HOUR=23;
Expand Down
18 changes: 10 additions & 8 deletions process-build-release-request
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ NOT_AUTHORIZED_MSG = 'You are not authorized to request the build of a release.'
CONFIG_MAP_FILE = CMS_BOT_DIR+'/config.map'
NO_ARCHS_FOUND_MSG = 'No architecures to build found for {rel_name}. Please check that you entered a ' \
'valid release name or that the IBs are currently enabled for {queue}'
RELEASE_BASE_URL = 'https://github.com/cms-sw/cmssw/releases/tag/%s'
BASE_BRANCH_URL = ' https://github.com/cms-sw/cmssw/tree/%s'
RELEASE_BASE_URL = 'https://github.com/LArSoft/larsoft/releases/tag/%s'
BASE_BRANCH_URL = ' https://github.com/LArSoft/larsoft/tree/%s'
RELEASE_CREATED_MSG = 'Release created: {rel_name}. The tag was created on top of branch: {base_branch}'
RELEASE_CREATION_FAIL_MSG = 'There was an error while attempting to create {rel_name}. ' \
'Please check if it already exists https://github.com/cms-sw/cmssw/releases'
'Please check if it already exists https://github.com/LArSoft/larsoft/releases'
WRONG_RELEASE_NAME_MSG = 'The release name is malformed. Please check for typos.'
ACK_MSG = 'Request received. I will start to build the release after one of the following approve ' \
'the issue: {approvers_list}. You can do this by writing "+1" in a ' \
Expand Down Expand Up @@ -86,7 +86,7 @@ PROD_ARCH_NOT_READY_MSG = 'ATTENTION!!! The production architecture ({prod_arch}
'This needs to be checked before asking me to generate the release notes.\n'\
'When the production architecture is installed successfully, I will generate the release notes.'\
' You don\'t need to write the command again.'
REL_NAME_REGEXP="(v_[0-9]+_[0-9]+)_[0-9]+(_SLHC[0-9]*|)(_pre[0-9]+|_[a-zA-Z]*patch[0-9]+|)(_[^_]*|)"
REL_NAME_REGEXP="(v[0-9]+)(_[0-9]+)(_[0-9]+)(_SLHC[0-9]*|)(_pre[0-9]+|_[a-zA-Z]*patch[0-9]+|)(_[^_]*|)"
UPLOAD_COMMENT = 'upload %s'
UPLOAD_ALL_COMMENT = '^[uU]pload all$'
ABORT_COMMENT = '^[Aa]bort$'
Expand All @@ -107,7 +107,7 @@ ANNOUNCEMENT_TEMPLATE = 'Hi all,\n\n' \
'{production_arch} (production)\n'\
'{rest_of_archs}'\
'The release notes of what changed with respect to {prev_release} can be found at:\n\n'\
'https://github.com/cms-sw/cmssw/releases/{rel_name}\n'\
'https://github.com/LArSoft/larsoft/releases/{rel_name}\n'\
'{description}'\
'Cheers,\n'\
'cms-bot'
Expand Down Expand Up @@ -370,7 +370,7 @@ def delete_release_github( release_name ):
return "Release %s not found." % release_name

releaseId = matchingRelease[0]
url = "https://api.github.com/repos/cms-sw/cmssw/releases/%s" % releaseId
url = "https://api.github.com/repos/LArSoft/larsoft/releases/%s" % releaseId
request = Request( url, headers={"Authorization" : "token " + GH_TOKEN })
request.get_method = lambda: 'DELETE'

Expand Down Expand Up @@ -803,7 +803,9 @@ if __name__ == "__main__":
print('This is a pull request, ignoring.')
exit( 0 )

print(issue.title)
title_match = re.match(BUILD_REL, issue.title)
assert(title_match)

# 2. Is this issue meant to build a release?
if not title_match:
Expand All @@ -813,14 +815,14 @@ if __name__ == "__main__":
ALL_LABELS = [ l.name for l in cmssw_repo.get_labels() ]
print("All labels:",ALL_LABELS)
comments = [ c for c in issue.get_comments( ) ]

release_name = title_match.group(1)
release_name = title_match.groups()[1]
# Get the release queue from the release name.
print(release_name)

issue_body = issue.body.encode("ascii", "ignore").strip()
release_queue = None
rel_name_match = re.match( REL_NAME_REGEXP, release_name )
assert(rel_name_match)
if "RELEASE_QUEUE:" in issue_body:
release_queue = issue_body.split("RELEASE_QUEUE:",1)[1].split("\n",1)[0].strip()
print("Found forces release queue:",release_queue)
Expand Down
Loading

0 comments on commit 7abea1e

Please sign in to comment.