Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: appengine/findit/waterfall/process_swarming_task_result_pipeline.py

Issue 1778153002: [Findit] Strip platform from step_name before triggering try job. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: . Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | appengine/findit/waterfall/run_try_job_for_reliable_failure_pipeline.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from collections import defaultdict 5 from collections import defaultdict
6 import datetime 6 import datetime
7 import logging 7 import logging
8 import time 8 import time
9 9
10 from common.http_client_appengine import HttpClientAppengine as HttpClient 10 from common.http_client_appengine import HttpClientAppengine as HttpClient
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 assert task_id 78 assert task_id
79 timeout_hours = waterfall_config.GetSwarmingSettings().get( 79 timeout_hours = waterfall_config.GetSwarmingSettings().get(
80 'task_timeout_hours') 80 'task_timeout_hours')
81 deadline = time.time() + timeout_hours * 60 * 60 81 deadline = time.time() + timeout_hours * 60 * 60
82 server_query_interval_seconds = waterfall_config.GetSwarmingSettings().get( 82 server_query_interval_seconds = waterfall_config.GetSwarmingSettings().get(
83 'server_query_interval_seconds') 83 'server_query_interval_seconds')
84 84
85 task_started = False 85 task_started = False
86 task_completed = False 86 task_completed = False
87 tests_statuses = {} 87 tests_statuses = {}
88 step_name_no_platform = None
88 89
89 while not task_completed: 90 while not task_completed:
90 # Keeps monitoring the swarming task, waits for it to complete. 91 # Keeps monitoring the swarming task, waits for it to complete.
91 data = swarming_util.GetSwarmingTaskResultById( 92 data = swarming_util.GetSwarmingTaskResultById(
92 task_id, self.HTTP_CLIENT) 93 task_id, self.HTTP_CLIENT)
93 task_state = data['state'] 94 task_state = data['state']
95 step_name_no_platform = swarming_util.GetTagValue(
96 data.get('tags', {}), 'ref_name')
94 if task_state not in swarming_util.STATES_RUNNING: 97 if task_state not in swarming_util.STATES_RUNNING:
95 task_completed = True 98 task_completed = True
96 task = WfSwarmingTask.Get( 99 task = WfSwarmingTask.Get(
97 master_name, builder_name, build_number, step_name) 100 master_name, builder_name, build_number, step_name)
98 if task_state == swarming_util.STATE_COMPLETED: 101 if task_state == swarming_util.STATE_COMPLETED:
99 outputs_ref = data.get('outputs_ref') 102 outputs_ref = data.get('outputs_ref')
100 output_json = swarming_util.GetSwarmingTaskFailureLog( 103 output_json = swarming_util.GetSwarmingTaskFailureLog(
101 outputs_ref, self.HTTP_CLIENT) 104 outputs_ref, self.HTTP_CLIENT)
102 tests_statuses = _CheckTestsRunStatuses(output_json) 105 tests_statuses = _CheckTestsRunStatuses(output_json)
103 106
(...skipping 29 matching lines...) Expand all
133 break # Stops the loop and return. 136 break # Stops the loop and return.
134 137
135 # Update swarming task metadate. 138 # Update swarming task metadate.
136 task = WfSwarmingTask.Get( 139 task = WfSwarmingTask.Get(
137 master_name, builder_name, build_number, step_name) 140 master_name, builder_name, build_number, step_name)
138 task.created_time = _ConvertDateTime(data.get('created_ts')) 141 task.created_time = _ConvertDateTime(data.get('created_ts'))
139 task.started_time = _ConvertDateTime(data.get('started_ts')) 142 task.started_time = _ConvertDateTime(data.get('started_ts'))
140 task.completed_time = _ConvertDateTime(data.get('completed_ts')) 143 task.completed_time = _ConvertDateTime(data.get('completed_ts'))
141 task.put() 144 task.put()
142 145
143 return step_name, task.classified_tests 146 return step_name, (step_name_no_platform, task.classified_tests)
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/waterfall/run_try_job_for_reliable_failure_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698