Bug 1336423 - Reduce warnings for SETA; r?jmaher draft
authorRob Wood <rwood@mozilla.com>
Fri, 03 Feb 2017 11:04:21 -0500
changeset 470372 4aaa2438e1306ec08b0fff347e852d54a09aa465
parent 470370 06c3be84254cd996a4b3830e23b3bc49e8cd1b63
child 544452 6f36c5a03318c77f1a67740c020f473aa81772dc
push id44001
push userrwood@mozilla.com
push dateFri, 03 Feb 2017 16:06:31 +0000
reviewersjmaher
bugs1336423
milestone54.0a1
Bug 1336423 - Reduce warnings for SETA; r?jmaher MozReview-Commit-ID: 5npX51kX2hB
taskcluster/taskgraph/util/seta.py
--- a/taskcluster/taskgraph/util/seta.py
+++ b/taskcluster/taskgraph/util/seta.py
@@ -42,17 +42,16 @@ class SETA(object):
         if len(task_tuple) != 3:
             return ' '.join(task_tuple)
 
         return 'test-%s/%s-%s' % (task_tuple[0], task_tuple[1], task_tuple[2])
 
     def query_low_value_tasks(self, project):
         # Request the set of low value tasks from the SETA service.  Low value tasks will be
         # optimized out of the task graph.
-        logger.debug("Querying SETA service for low-value tasks on {}".format(project))
         low_value_tasks = []
 
         url = SETA_ENDPOINT % project
         # Try to fetch the SETA data twice, falling back to an empty list of low value tasks.
         # There are 10 seconds between each try.
         try:
             logger.debug("Retrieving low-value jobs list from SETA")
             response = retry(requests.get, attempts=2, sleeptime=10,
@@ -116,17 +115,16 @@ class SETA(object):
         # if we already tried to retrieve the datetime for this pushid
         # before and the json-push request failed, don't try it again
         if prev_push_id in self.failed_json_push_calls:
             return min_between_pushes
 
         url = PUSH_ENDPOINT % (project, cur_push_id - 2, prev_push_id)
 
         try:
-            logger.debug("Retrieving datetime of previous push")
             response = retry(requests.get, attempts=2, sleeptime=10,
                              args=(url, ),
                              kwargs={'timeout': 5, 'headers': headers})
             prev_push_date = json.loads(response.content).get(str(prev_push_id), {}).get('date', 0)
 
             # cache it for next time
             self.push_dates[project].update({prev_push_id: prev_push_date})
 
@@ -161,17 +159,16 @@ class SETA(object):
             logger.warning(error)
             self.failed_json_push_calls.append(prev_push_id)
 
         return min_between_pushes
 
     def is_low_value_task(self, label, project, pushlog_id, push_date):
         # marking a task as low_value means it will be optimized out by tc
         if project not in SETA_PROJECTS:
-            logger.debug("SETA is not enabled for project `{}`".format(project))
             return False
 
         schedule_all_every = PROJECT_SCHEDULE_ALL_EVERY_PUSHES.get(project, 5)
         # on every Nth push, want to run all tasks
         if int(pushlog_id) % schedule_all_every == 0:
             return False
 
         # Nth push, so time to call seta based on number of pushes; however