| OLD | NEW |
| 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 logging | 5 import logging |
| 6 | 6 |
| 7 from google.appengine.api import modules | 7 from google.appengine.api import modules |
| 8 from google.appengine.ext import ndb | 8 from google.appengine.ext import ndb |
| 9 | 9 |
| 10 from model import wf_analysis_status | 10 from model import wf_analysis_status |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 | 119 |
| 120 def _GetFailedTargetsFromSignals(signals, master_name, builder_name): | 120 def _GetFailedTargetsFromSignals(signals, master_name, builder_name): |
| 121 compile_targets = [] | 121 compile_targets = [] |
| 122 | 122 |
| 123 if not signals or 'compile' not in signals: | 123 if not signals or 'compile' not in signals: |
| 124 return compile_targets | 124 return compile_targets |
| 125 | 125 |
| 126 strict_regex = waterfall_config.EnableStrictRegexForCompileLinkFailures( | 126 strict_regex = waterfall_config.EnableStrictRegexForCompileLinkFailures( |
| 127 master_name, builder_name) | 127 master_name, builder_name) |
| 128 for source_target in signals['compile']['failed_targets']: | 128 for source_target in signals['compile'].get('failed_targets', []): |
| 129 # For link failures, we pass the executable targets directly to try-job, and | 129 # For link failures, we pass the executable targets directly to try-job, and |
| 130 # there is no 'source' for link failures. | 130 # there is no 'source' for link failures. |
| 131 # For compile failures, only pass the object files as the compile targets | 131 # For compile failures, only pass the object files as the compile targets |
| 132 # for the bots that we use strict regex to extract such information. | 132 # for the bots that we use strict regex to extract such information. |
| 133 if not source_target.get('source') or strict_regex: | 133 if not source_target.get('source') or strict_regex: |
| 134 compile_targets.append(source_target.get('target')) | 134 compile_targets.append(source_target.get('target')) |
| 135 | 135 |
| 136 return compile_targets | 136 return compile_targets |
| 137 | 137 |
| 138 | 138 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 pipeline.pipeline_status_path, try_job_type) | 185 pipeline.pipeline_status_path, try_job_type) |
| 186 else: # pragma: no cover | 186 else: # pragma: no cover |
| 187 logging_str = ( | 187 logging_str = ( |
| 188 'Try job was scheduled for build %s, %s, %s: %s because of %s ' | 188 'Try job was scheduled for build %s, %s, %s: %s because of %s ' |
| 189 'failure.') % ( | 189 'failure.') % ( |
| 190 master_name, builder_name, build_number, | 190 master_name, builder_name, build_number, |
| 191 pipeline.pipeline_status_path, try_job_type) | 191 pipeline.pipeline_status_path, try_job_type) |
| 192 logging.info(logging_str) | 192 logging.info(logging_str) |
| 193 | 193 |
| 194 return failure_result_map | 194 return failure_result_map |
| OLD | NEW |