From 928db7f6c88e83fd28618b37d7d6a13621b7b00b Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Tue, 12 Sep 2017 16:23:39 -0400 Subject: [PATCH] First attempt to uniquefy try build's root message --- lib/config.json | 2 +- master.cfg | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/config.json b/lib/config.json index a5b1b4f..2b4c3d3 100644 --- a/lib/config.json +++ b/lib/config.json @@ -366,7 +366,7 @@ "Fedora-i686" ] }, - { "type" : "Try_Jobdir", "name" : "try_ssh", + { "type" : "GDB_Try_Jobdir", "name" : "try_ssh", "jobdir" : "try_ssh_jobdir", "builderNames" : [ "Fedora-x86_64-m64", "Fedora-x86_64-m32", diff --git a/master.cfg b/master.cfg index aa489f4..b705d90 100644 --- a/master.cfg +++ b/master.cfg @@ -24,6 +24,7 @@ from gdbcommand import CopyOldGDBSumFile, GdbCatSumfileCommand from fsdb import SaveGDBResults from racyanalyze import GDBAnalyzeRacyTests from urllib import quote +from time import strftime from sumfiles import DejaResults, set_web_base, get_web_base import os @@ -147,7 +148,8 @@ def make_try_build_lockfile_name (rev): def SendRootMessageGDBTesters (branch, change, rev, istrysched = False, try_to = None, - try_count = "0"): + try_count = "0", + try_msgid = ""): global GDB_MAIL_TO, GDB_MAIL_FROM if istrysched: @@ -203,7 +205,7 @@ def SendRootMessageGDBTesters (branch, change, rev, else: mail['To'] = try_to mailto = try_to - mail['Message-Id'] = "<%s-try@gdb-build>" % rev + mail['Message-Id'] = try_msgid s = smtplib.SMTP ('localhost') s.sendmail (GDB_MAIL_FROM, [ mailto ], mail.as_string ()) @@ -437,12 +439,13 @@ send to the gdb-testers mailing list.""" properties = build.getProperties () isrebuild = properties.getProperty ('isRebuild') try_count = properties.getProperty ('try_count') + try_msgid = properties.getProperty ('root_message_id') try_to = build.getReason ().strip ("'try' job by user ") # Sending the root message to gdb-testers. SendRootMessageGDBTesters (branch, cur_change, properties.getProperty ('revision'), istrysched = True, try_to = try_to, - try_count = try_count) + try_count = try_count, try_msgid = try_msgid) # Subject subj = "Try Build #%s on %s, branch %s" % (try_count, name, branch) @@ -600,7 +603,7 @@ mn_try = MyMailNotifier(fromaddr = GDB_MAIL_FROM, lookup = LookupEmailTryBuild (), tags = [ "MAIL", "TRY" ], extraHeaders = { 'X-GDB-Buildbot' : '1', - 'In-Reply-To' : util.Interpolate ("<%(prop:got_revision)s-try@gdb-build>")}) + 'In-Reply-To' : util.Interpolate ("%(prop:root_message_id)s")}) c['status'].append (mn) c['status'].append (mn_try) @@ -1240,6 +1243,15 @@ def prioritizeTryBuilds (builder, requests): return r return requests[0] + +class GDB_Try_Jobdir (Try_Jobdir): + def parseJob (self, f): + ret = Try_Jobdir.parseJob (self, f) + root_msgid = "<%s-%s-try@gdb-build>" % (ret['baserev'], + strftime ("%H-%M-%S")) + ret['root_message_id'] = root_msgid + return ret + ############################### #### Configuration loading #### ############################### @@ -1264,7 +1276,7 @@ def load_config (c): c['schedulers'] = [] for s in config['schedulers']: # Ugh :-/. There should be no special case here... - if s['type'] != 'Nightly' and s['type'] != 'Try_Jobdir': + if s['type'] != 'Nightly' and s['type'] != 'GDB_Try_Jobdir': s['treeStableTimer'] = None s['fileIsImportant'] = DefaultGDBfileIsImportant elif s['type'] == 'Nightly': @@ -1282,7 +1294,7 @@ def load_config (c): pass s['onlyIfChanged'] = False s['branch'] = 'master' - elif s['type'] == 'Try_Jobdir': + elif s['type'] == 'GDB_Try_Jobdir': s['properties'] = { 'isTrySched' : 'yes' } if "change_filter" in s: s['change_filter'] = globals ()[s['change_filter']]