| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <head> |
| 3 <title>Compile Failure</title> |
| 4 <meta charset="utf-8"> |
| 5 <link rel="stylesheet" href="/common.css"> |
| 6 <style> |
| 7 .pending { |
| 8 color: #666666; |
| 9 background-color: #fffc6c; |
| 10 border-color: #c5c56d; |
| 11 } |
| 12 .running { |
| 13 color: #666666; |
| 14 background-color: #fffc6c; |
| 15 border-color: #c5c56d; |
| 16 } |
| 17 .completed { |
| 18 color: #ffffff; |
| 19 background-color: #8fdf5f; |
| 20 border-color: #4f8530; |
| 21 } |
| 22 .error { |
| 23 color: #ffffff; |
| 24 background-color: #e98080; |
| 25 border-color: #a77272; |
| 26 } |
| 27 .warning { |
| 28 color: RED; |
| 29 } |
| 30 .thumbs-up-down { |
| 31 border-radius: 7px; |
| 32 display: inline-block; |
| 33 height: 28px; |
| 34 } |
| 35 .triage, .triaged { |
| 36 display: block; |
| 37 float: left; |
| 38 vertical-align: middle; |
| 39 } |
| 40 .triage { |
| 41 background-color: #e5e5e5; |
| 42 cursor: pointer; |
| 43 } |
| 44 .triaged { |
| 45 cursor: default; |
| 46 } |
| 47 .thumb-up { |
| 48 border-top: solid 1px; |
| 49 border-bottom: solid 1px; |
| 50 border-left: solid 1px; |
| 51 border-top-left-radius: 7px; |
| 52 border-bottom-left-radius: 7px; |
| 53 padding-left: 10px; |
| 54 padding-right: 10px; |
| 55 } |
| 56 .thumb-down { |
| 57 border: solid 1px; |
| 58 border-top-right-radius: 7px; |
| 59 border-bottom-right-radius: 7px; |
| 60 padding-left: 10px; |
| 61 padding-right: 10px; |
| 62 } |
| 63 .thumb-up:hover, .thumb-up.triaged { |
| 64 background-color: #8fdf5f; |
| 65 } |
| 66 .thumb-down:hover, .thumb-down.triaged { |
| 67 background-color: #e98080; |
| 68 } |
| 69 </style> |
| 70 <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.
11.1/themes/smoothness/jquery-ui.css"> |
| 71 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
"></script> |
| 72 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.m
in.js"></script> |
| 73 <script> |
| 74 var findit = {}; |
| 75 findit.analysisCompleted = '{{analysis_completed}}' == 'True'; |
| 76 findit.analysisFailed = '{{analysis_failed}}' == 'True'; |
| 77 findit.builderUrl = 'https://build.chromium.org/p/{{master_name}}/builders/{
{builder_name}}'; |
| 78 findit.buildUrl = findit.builderUrl + '/builds/{{build_number}}'; |
| 79 findit.analysisCorrect = '{{analysis_correct}}'; // Possible values: 'None'
, 'True', or 'False'. |
| 80 findit.showTriageHelpButton = '{{show_triage_help_button}}' == 'True'; |
| 81 findit.showDebugInfo = '{{show_debug_info}}' == 'True'; |
| 82 |
| 83 function triageAnalysisResult(e) { |
| 84 var target = $(this); |
| 85 if (target.hasClass('triaged')) |
| 86 return; |
| 87 |
| 88 var correct = target.hasClass('thumb-up'); |
| 89 $.getJSON('/waterfall/triage-analysis?correct=' + correct + '&url=' + find
it.buildUrl, function(data) { |
| 90 if (data['success']) { |
| 91 $('.triaged').addClass('triage').removeClass('triaged'); |
| 92 target.addClass('triaged').removeClass('triage'); |
| 93 } else { |
| 94 alert('Failed to update datastore. Please refresh and try again.'); |
| 95 } |
| 96 }).error(function(xhr) { |
| 97 // Replace the whole page with errors from server side. |
| 98 document.body.outerHTML = xhr.responseText; |
| 99 }); |
| 100 |
| 101 e.preventDefault(); |
| 102 } |
| 103 |
| 104 function triageHelp(e) { |
| 105 $('#triage_help_button').prop('disabled', true); |
| 106 $('#triage_help_result').html("Checking..."); |
| 107 $.getJSON('/waterfall/help-triage?url=' + findit.buildUrl, function(data)
{ |
| 108 if (! jQuery.isEmptyObject(data)) { |
| 109 tableString = '<table><tr><th width="150">Build Number</th><th width="
150">Culprit CL</th>' |
| 110 tableString += '<th width="150">Fix Build Number</th><th width="150">P
ossible Fixing CL</th><th width="100">Action</th></tr>'; |
| 111 $.each(data, function(key, value) { |
| 112 tableString += '<tr>'; |
| 113 tableString += '<td><a href="' + value.fixed_build_url + '">' + valu
e.fixed_build_number +'</a></td>'; |
| 114 tableString += '<td><a href="' + value.fixed_cl_review_url + '">' +
value.fixed_cl_commit_position +'</a></td>'; |
| 115 tableString += '<td><a href="' + value.fixing_build_url + '">' + val
ue.fixing_build_number +'</a></td>'; |
| 116 tableString += '<td><a href="' + value.fixing_cl_review_url + '">' +
value.fixing_cl_commit_position +'</a></td>'; |
| 117 tableString += '<td>' + value.action + '</td>'; |
| 118 tableString += '</tr>'; |
| 119 }); |
| 120 tableString += '</table>'; |
| 121 $('#triage_help_result').html(tableString); |
| 122 } else { |
| 123 $('#triage_help_result').html('No results found.'); |
| 124 } |
| 125 $('#triage_help_button').prop('disabled', false); |
| 126 }).error(function(xhr) { |
| 127 // Replace the whole page with errors from server side. |
| 128 document.body.outerHTML = xhr.responseText; |
| 129 }); |
| 130 |
| 131 e.preventDefault(); |
| 132 } |
| 133 |
| 134 $(document).ready(function() { |
| 135 if (!findit.analysisCompleted) { |
| 136 $('#status_message').text('running, will refresh in 5 seconds...'); |
| 137 $('#status_message').attr('class', 'running'); |
| 138 setTimeout(function() { |
| 139 {% if show_debug_info %} |
| 140 window.location.href = '/waterfall/build-failure?url=' + findit.buildU
rl + '&debug=1'; |
| 141 {% else %} |
| 142 window.location.href = '/waterfall/build-failure?url=' + findit.buildU
rl; |
| 143 {% endif %} |
| 144 }, 5000); |
| 145 } else { |
| 146 if (findit.analysisFailed) { |
| 147 $('#status_message').text('error'); |
| 148 $('#status_message').attr('class', 'error'); |
| 149 } else { |
| 150 // TODO: use another style when no culprit CL is found. |
| 151 $('#status_message').text('completed'); |
| 152 $('#status_message').attr('class', 'completed'); |
| 153 |
| 154 $('.triage').click(triageAnalysisResult); |
| 155 |
| 156 if (findit.showTriageHelpButton) { |
| 157 $('#triage_help_button').click(triageHelp); |
| 158 } |
| 159 |
| 160 if (findit.analysisCorrect == 'True') { |
| 161 $('.thumb-up').addClass('triaged').removeClass('triage'); |
| 162 } else if (findit.analysisCorrect == 'False') { |
| 163 $('.thumb-down').addClass('triaged').removeClass('triage'); |
| 164 } |
| 165 } |
| 166 } |
| 167 |
| 168 $('#score-explanation-dialog').dialog({ |
| 169 autoOpen: false, |
| 170 modal: true, |
| 171 width: 600, |
| 172 }); |
| 173 $('#score-info').click(function() { |
| 174 $('#score-explanation-dialog').dialog('open'); |
| 175 }); |
| 176 }); |
| 177 </script> |
| 178 </head> |
| 179 <body> |
| 180 Findit now provides results from both heuristics and try-jobs. (<a href="https
://code.google.com/p/chromium/issues/entry?status=Unconfirmed&labels=Pri-2,findi
t&summary=Findit%20bug%20or%20reature%20request&comment=Url%20to%20the%20build%2
0Failure:%0Ahttps://build.chromium.org/p/{{master_name}}/builders/{{builder_name
}}/builds/{{build_number}}%0A%0AWhat%20is%20the%20bug%20or%20feature:%0A">File a
Findit bug</a>) |
| 181 <br> |
| 182 <br> |
| 183 |
| 184 <b>Compile failure:</b> |
| 185 <div> |
| 186 Master: {{master_name}}<br> |
| 187 Builder: <a href="https://build.chromium.org/p/{{master_name}}/builders/{{bu
ilder_name}}">{{builder_name}}</a><br> |
| 188 {% if build_number != first_failure %} |
| 189 Current Failure: <a href="https://build.chromium.org/p/{{master_name}}/bui
lders/{{builder_name}}/builds/{{build_number}}">{{build_number}}</a><br> |
| 190 First Failure: <a href="https://build.chromium.org/p/{{master_name}}/build
ers/{{builder_name}}/builds/{{first_failure}}">{{first_failure}}</a><br> |
| 191 {% else %} |
| 192 First Failure: <a href="https://build.chromium.org/p/{{master_name}}/build
ers/{{builder_name}}/builds/{{build_number}}">{{build_number}}</a><br> |
| 193 {% endif %} |
| 194 {% if last_pass %} |
| 195 Last Pass: <a href="https://build.chromium.org/p/{{master_name}}/builders/
{{builder_name}}/builds/{{last_pass}}">{{last_pass}}</a><br> |
| 196 {% if last_pass + 1 != first_failure %} |
| 197 <div class='warning'>Be careful, compile was not run or purple in builds
before first failure!</div> |
| 198 {% endif %} |
| 199 {% else %} |
| 200 Last Pass: Unknown! |
| 201 {% endif %} |
| 202 </div> |
| 203 <br> |
| 204 |
| 205 {% if try_job %} |
| 206 <div> |
| 207 <b>Try-job Result:</b><br> |
| 208 Status: <span class="{{try_job.status}}">{{try_job.status}}</span> |
| 209 {% if try_job.url %} |
| 210 <a href="{{try_job.url}}">try-job</a> |
| 211 {% endif %} |
| 212 <br> |
| 213 {% if try_job.completed %} |
| 214 {% if try_job.failed %} |
| 215 <span class="error">Try job ran into error!</span> |
| 216 {% elif try_job.culprit %} |
| 217 Culprit: {{try_job.culprit.repo_name}}: <a href="{{try_job.culprit.revie
w_url}}">{{try_job.culprit.commit_position or try_job.culprit.revision}}</a> |
| 218 {% else %} |
| 219 <div>No culprit found!</div> |
| 220 {% endif%} |
| 221 {% endif%} |
| 222 </div> |
| 223 <br> |
| 224 {% endif%} |
| 225 |
| 226 <b>Heuristic Analysis Result:</b> |
| 227 <div id="heuristic-analysis"> |
| 228 Status: <span id="status_message"></span> |
| 229 {% if show_debug_info %} |
| 230 {% if pipeline_status_path %} |
| 231 <a href="{{pipeline_status_path}}">pipeline</a> |
| 232 {% endif %} |
| 233 <br> |
| 234 Requested: {{analysis_request_time | default('N/A', true)}}<br> |
| 235 {% if analysis_duration %} |
| 236 Duration: {{analysis_duration}} seconds. <br> |
| 237 {% else %} |
| 238 Started: {{analysis_start_time | default('N/A', true)}}<br> |
| 239 {% endif %} |
| 240 Updated: {{analysis_update_time}}<br> |
| 241 {% endif %} |
| 242 |
| 243 {% if analysis_completed %} |
| 244 <br> |
| 245 {% if analysis_failed %} |
| 246 <div class="error">No result because of some error in analysis!</div> |
| 247 {% elif suspected_cls_by_heuristic|length == 0 %} |
| 248 <div>No culprit is found!</div> |
| 249 {% else %} |
| 250 <div id="suspected_cls"> |
| 251 <table> |
| 252 <tr> |
| 253 <th title="The build cycle in which the CL was in">Build Number</th> |
| 254 <th title="Git repo name and commit position/hash of the culprit">Cu
lprit</th> |
| 255 <th title="The higher score, the more suspected">Score(<a id="score-
info" href="javascript:">?</a>)</th> |
| 256 <th title="Why this CL is related to the failure">Hints</th> |
| 257 </tr> |
| 258 <tbody> |
| 259 {% for suspected_cl in suspected_cls_by_heuristic %} |
| 260 <tr> |
| 261 <td><a href="https://build.chromium.org/p/{{master_name}}/builders
/{{builder_name}}/builds/{{suspected_cl.build_number}}">{{suspected_cl.build_num
ber}}</a></td> |
| 262 <td> |
| 263 {{suspected_cl.repo_name}}: <a href="{{suspected_cl.url}}">{{sus
pected_cl.commit_position or suspected_cl.revision}}</a> |
| 264 </td> |
| 265 <td>{{suspected_cl.score}}</td> |
| 266 <td> |
| 267 {% for hint, _ in suspected_cl.hints|dictsort(case_sensitive=Tru
e, by='value')|reverse %} |
| 268 <li>{{hint}}</li> |
| 269 {% endfor %} |
| 270 </td> |
| 271 </tr> |
| 272 {% endfor %} |
| 273 </tbody> |
| 274 </table> |
| 275 </div> |
| 276 {% endif %} |
| 277 {% endif %} |
| 278 </div> |
| 279 |
| 280 {% if analysis_completed %} |
| 281 <br> |
| 282 <div> |
| 283 <b>Feedback on Findit Result:</b><br> |
| 284 <div class="thumbs-up-down"> |
| 285 <div class="triage thumb-up">Correct <img src="https://www.gstatic.com/ima
ges/icons/material/system/1x/thumb_up_black_24dp.png"/></div> |
| 286 <div class="triage thumb-down"><img src="https://www.gstatic.com/images/ic
ons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> |
| 287 </div> |
| 288 </div> |
| 289 {% endif %} |
| 290 |
| 291 {% if triage_history %} |
| 292 <br> |
| 293 <b>Triage History:</b> |
| 294 <div> |
| 295 <table> |
| 296 <tr><th>When</th><th>Who</th><th>Result</th><th>Version</th></tr> |
| 297 <tbody> |
| 298 {% for triage_record in triage_history %} |
| 299 <tr> |
| 300 <td>{{triage_record.triage_time}}</td> |
| 301 <td>{{triage_record.user_name}}</td> |
| 302 <td>{{triage_record.result_status}}</td> |
| 303 <td>{{triage_record.version | default('N/A', true)}}</td> |
| 304 </tr> |
| 305 {% endfor %} |
| 306 </tbody> |
| 307 </table> |
| 308 </div> |
| 309 {% endif %} |
| 310 |
| 311 {% if show_triage_help_button %} |
| 312 <br> |
| 313 <div id="triage_help"> |
| 314 <button id="triage_help_button">Triage Help</button> |
| 315 <br> |
| 316 <div id="triage_help_result"> |
| 317 </div> |
| 318 </div> |
| 319 {% endif %} |
| 320 |
| 321 <div id="score-explanation-dialog" title="Score Explanation"> |
| 322 The total score is a sum of scores for all hints.<br> |
| 323 Rules to set a score to an hint: |
| 324 <ul> |
| 325 <li>5: The CL added or deleted a file that appears in the failure log.</li
> |
| 326 <li>4: The CL changed the error line in a file that appears in the failure
log.</li> |
| 327 <li>2: The CL modified a file that appears in the failure log.</li> |
| 328 <li>1: The CL modified a file that is related to another file |
| 329 appearing in the failure log. (eg: file.h was changed and |
| 330 file_unittest.cc or file_impl.cc appeared in the log.)</li> |
| 331 <li>1: The CL rolled a dependency within src/DEPS and a file of that |
| 332 dependency appears in the failure log. (eg: third_party/dep |
| 333 was changed in src/DEPS and third_party/dep/f.cpp appeared |
| 334 in the log.)</li> |
| 335 </ul> |
| 336 (More rules will be added when implemented.) |
| 337 </div> |
| 338 </body> |
| OLD | NEW |