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

Side by Side Diff: scripts/slave/recipes/findit/chromium/compile.py

Issue 1881223002: [Findit] Set culprit and infra failure explicitly. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 8 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 | scripts/slave/recipes/findit/chromium/compile.expected/compile_failed.json » ('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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import json 5 import json
6 6
7 from recipe_engine.config import List 7 from recipe_engine.config import List
8 from recipe_engine.config import Single 8 from recipe_engine.config import Single
9 from recipe_engine.recipe_api import Property 9 from recipe_engine.recipe_api import Property
10 10
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 suspected_revision = revision 227 suspected_revision = revision
228 found = True 228 found = True
229 break 229 break
230 230
231 if not found and suspected_revision is not None: 231 if not found and suspected_revision is not None:
232 # If all revisions in the current range passed, and the first revision 232 # If all revisions in the current range passed, and the first revision
233 # of previous range failed, the culprit is found too. 233 # of previous range failed, the culprit is found too.
234 found = True 234 found = True
235 except api.step.InfraFailure: 235 except api.step.InfraFailure:
236 compile_results[revision_being_checked] = CompileResult.INFRA_FAILED 236 compile_results[revision_being_checked] = CompileResult.INFRA_FAILED
237 report['metadata']['infra_failure'] = True
237 raise 238 raise
238 finally: 239 finally:
240 if found:
241 report['culprit'] = suspected_revision
242
239 # Report the result. 243 # Report the result.
240 step_result = api.python.succeeding_step( 244 step_result = api.python.succeeding_step(
241 'report', [json.dumps(report, indent=2)], as_log='report') 245 'report', [json.dumps(report, indent=2)], as_log='report')
242 246
243 if found: 247 if found:
244 step_result.presentation.step_text = ( 248 step_result.presentation.step_text = (
245 '<br/>Culprit: <a href="https://crrev.com/%s">%s</a>' % ( 249 '<br/>Culprit: <a href="https://crrev.com/%s">%s</a>' % (
246 suspected_revision, suspected_revision)) 250 suspected_revision, suspected_revision))
247 251
248 # Set the report as a build property too, so that it will be reported back 252 # Set the report as a build property too, so that it will be reported back
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 'git commits in range', 530 'git commits in range',
527 api.raw_io.stream_output( 531 api.raw_io.stream_output(
528 '\n'.join('r%d' % i for i in reversed(range(2, 6))))) + 532 '\n'.join('r%d' % i for i in reversed(range(2, 6))))) +
529 api.override_step_data('test r2.check_targets', 533 api.override_step_data('test r2.check_targets',
530 api.json.output({ 534 api.json.output({
531 'found': ['target_name'], 535 'found': ['target_name'],
532 'not_found': [], 536 'not_found': [],
533 })) + 537 })) +
534 api.override_step_data('test r2.compile', retcode=1) 538 api.override_step_data('test r2.compile', retcode=1)
535 ) 539 )
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/findit/chromium/compile.expected/compile_failed.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698