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

Side by Side Diff: appengine/findit/templates/build_failure.html

Issue 2015703003: [Findit] UI: Only display try job result to non-admin users if it's available. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <title>Build Failure</title> 3 <title>Build Failure</title>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <link rel="stylesheet" href="/common.css"> 5 <link rel="stylesheet" href="/common.css">
6 <style> 6 <style>
7 .running { 7 .running {
8 color: #666666; 8 color: #666666;
9 background-color: #fffc6c; 9 background-color: #fffc6c;
10 border-color: #c5c56d; 10 border-color: #c5c56d;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 tableString += generateHeuristicCulpritCls(result.heuristic_analysis.s uspected_cls, result.supported); 261 tableString += generateHeuristicCulpritCls(result.heuristic_analysis.s uspected_cls, result.supported);
262 tableString += '</tr>'; 262 tableString += '</tr>';
263 }); 263 });
264 264
265 $('#reliable_failures_table tbody').append(tableString); 265 $('#reliable_failures_table tbody').append(tableString);
266 $('#reliable_failures').removeClass('not-display'); 266 $('#reliable_failures').removeClass('not-display');
267 } 267 }
268 } 268 }
269 269
270 function displayReliableFailuresToSheriffs(step_name, results) {
271 if (!jQuery.isEmptyObject(results)) {
272 var tableString = '';
273 $.each(results, function(index, result) {
274 tableString += '<tr>';
275
276 var tryJob = result.try_job;
277 var tryJobCulprit = tryJob.culprit;
278 var rowspan = 1;
279
280 if (jQuery.isEmptyObject(tryJobCulprit)) {
281 rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? resul t.heuristic_analysis.suspected_cls.length : 1;
282 }
283 tableString += generateCommonCellsForAllCategories(step_name, 'determi ned', index, result.tests, result.first_failure, result.last_pass, 1);
284
285 if (! jQuery.isEmptyObject(tryJobCulprit)) {
286 tableString += '<td rowspan="' + rowspan + '">Try Job</td>';
287 var build_number = result.try_job.try_job_key.split('/')[2]; // try _job_key would look like: 'master_name/builder_name/build_number'.
288 tableString += '<td rowspan="' + rowspan + '"><a href="' + findit.bu ilderUrl + '/builds/' + build_number + '">' + build_number + '</a></td>';
289 var review_url = tryJobCulprit.url || tryJobCulprit.review_url || (f indit.defaultGitBaseUrl + tryJobCulprit.revision);
290 tableString += '<td rowspan="' + rowspan + '"><a href="' + review_ur l + '">' + tryJobCulprit.commit_position || tryJobCulprit.revision + '</a></td>' ;
291 // Right now this cell is only for scores of heuristic results, plac eholder for confidence in the future.
292 tableString += '<td rowspan="' + rowspan + '">N/A</td>';
293 tableString += '<td rowspan="' + rowspan + '">';
294 tableString += '<li>Reliable failure: <a href="' + tryJob.task_url+ '">' + tryJob.task_id + '</a></li>';
295 if (tryJob.try_job_url) {
296 tableString += '<li>For try job details: <a href="' + tryJob.try_j ob_url+ '">' + tryJob.try_job_build_number + '</a></li>';
297 }
298 tableString += '</td>';
299 tableString += '<td rowspan="' + rowspan + '">Try job completed succ essfully.</td>';
300
301 } else {
302 if (result.heuristic_analysis.suspected_cls.length > 0) {
303 tableString += '<td rowspan="' + rowspan + '">Heuristic Analysis</ td>';
304 tableString += generateHeuristicCulpritCls(result.heuristic_analys is.suspected_cls, result.supported);
305 } else {
306 var no_result_reason = 'Not Found';
307 if (! result.supported) {
308 no_result_reason = 'Not Supported';
309 }
310 tableString += '<td colspan="5" rowspan="' + rowspan + '">' + no_r esult_reason + '</td>';
311 }
312 tableString += '<td rowspan="' + rowspan + '">' + findit.tryjobStatu sMessageMap[tryJob.status] + '</td>';
313 }
314
315 tableString += '</tr>';
316 });
317
318 $('#reliable_failures_sheriffs_table tbody').append(tableString);
319 $('#reliable_failures_sheriffs').removeClass('not-display');
320 }
321 }
322
270 function displayFlakyFailures(step_name, results) { 323 function displayFlakyFailures(step_name, results) {
271 if (!jQuery.isEmptyObject(results)) { 324 if (!jQuery.isEmptyObject(results)) {
272 var tableString = ''; 325 var tableString = '';
273 $.each(results, function(index, result) { 326 $.each(results, function(index, result) {
274 tableString += '<tr>'; 327 tableString += '<tr>';
275 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? res ult.heuristic_analysis.suspected_cls.length : 1; 328 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? res ult.heuristic_analysis.suspected_cls.length : 1;
276 tableString += generateCommonCellsForAllCategories(step_name, 'flaky', index, result.tests, result.first_failure, result.last_pass, rowspan); 329 tableString += generateCommonCellsForAllCategories(step_name, 'flaky', index, result.tests, result.first_failure, result.last_pass, rowspan);
277 330
278 tableString += '<td rowspan="' + rowspan + '"><a href="' + result.try_ job.task_url + '">' + result.try_job.task_id + '</a></td>'; 331 tableString += '<td rowspan="' + rowspan + '"><a href="' + result.try_ job.task_url + '">' + result.try_job.task_id + '</a></td>';
279 332
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // TODO: use another style when no culprit CL is found. 378 // TODO: use another style when no culprit CL is found.
326 $('#status_message').text('completed'); 379 $('#status_message').text('completed');
327 $('#status_message').attr('class', 'completed'); 380 $('#status_message').attr('class', 'completed');
328 381
329 $('.triage').click(triageAnalysisResult); 382 $('.triage').click(triageAnalysisResult);
330 383
331 if (!jQuery.isEmptyObject(findit.analysisResult)) { 384 if (!jQuery.isEmptyObject(findit.analysisResult)) {
332 $.each(findit.analysisResult, function(step_name, step_results) { 385 $.each(findit.analysisResult, function(step_name, step_results) {
333 $.each(step_results.results, function(category, results) { 386 $.each(step_results.results, function(category, results) {
334 if (category == 'reliable_failures') { 387 if (category == 'reliable_failures') {
388 {% if show_debug_info %}
335 displayReliableFailures(step_name, results); 389 displayReliableFailures(step_name, results);
390 {% else %}
391 displayReliableFailuresToSheriffs(step_name, results);
392 {% endif %}
336 } else if (category == 'unclassified_failures') { 393 } else if (category == 'unclassified_failures') {
337 displayUnclassifiedFailures(step_name, results); 394 displayUnclassifiedFailures(step_name, results);
338 } else if (category == 'flaky_failures') { 395 } else if (category == 'flaky_failures') {
339 displayFlakyFailures(step_name, results); 396 displayFlakyFailures(step_name, results);
340 } else { 397 } else {
341 alert('Unrecongnizable category of test results, please file a bug for it.'); 398 alert('Unrecongnizable category of test results, please file a bug for it.');
342 } 399 }
343 }); 400 });
344 }); 401 });
345 } else { 402 } else {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 <thead> 475 <thead>
419 <tr> 476 <tr>
420 <th rowspan="3" title="Failed step name" width="150px">Step</t h> 477 <th rowspan="3" title="Failed step name" width="150px">Step</t h>
421 <th rowspan="3" title="Failed test name" width="300px">Test(s) </th> 478 <th rowspan="3" title="Failed test name" width="300px">Test(s) </th>
422 <th rowspan="3" title="The build cycle in which the step start ed to fail">First Failure</th> 479 <th rowspan="3" title="The build cycle in which the step start ed to fail">First Failure</th>
423 <th rowspan="3" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th> 480 <th rowspan="3" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th>
424 <th colspan="8">Suspected CLs</th> 481 <th colspan="8">Suspected CLs</th>
425 </tr> 482 </tr>
426 <tr> 483 <tr>
427 <th colspan="3">Try Job Result</th> 484 <th colspan="3">Try Job Result</th>
428 <th colspan="4">Heuristic Analysis Result</th> 485 <th colspan="5">Heuristic Analysis Result</th>
429 </tr> 486 </tr>
430 <tr> 487 <tr>
431 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th> 488 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th>
432 <th title="Git commit position/hash">Commit</th> 489 <th title="Git commit position/hash">Commit</th>
433 <th title="Information about related swarming rerun and try jo b">Swarming rerun and<br>Try Job Info</th> 490 <th title="Information about related swarming rerun and try jo b">Swarming rerun and<br>Try Job Info</th>
434 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th> 491 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th>
435 <th title="Git commit position/hash">Commit</th> 492 <th title="Git commit position/hash">Commit</th>
436 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th> 493 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th>
437 <th title="Why this CL is related to the failure">Hints</th> 494 <th title="Why this CL is related to the failure">Hints</th>
438 </tr> 495 </tr>
439 </thead> 496 </thead>
440 <tbody> 497 <tbody>
441 </tbody> 498 </tbody>
442 </table> 499 </table>
443 <br> 500 <br>
444 </div> 501 </div>
445 502
503 <div id="reliable_failures_sheriffs" class='not-display'>
504 <b>Reliable failures</b>
505 <table id="reliable_failures_sheriffs_table">
506 <thead>
507 <tr>
508 <th rowspan="2" title="Failed step name" width="150px">Step</t h>
509 <th rowspan="2" title="Failed test name" width="300px">Test(s) </th>
510 <th rowspan="2" title="The build cycle in which the step start ed to fail">First Failure</th>
511 <th rowspan="2" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th>
512 <th colspan="6">Suspected CLs</th>
513 </tr>
514 <tr>
515 <th title="The source of result: Try Job or Heuristic Analysis .">Result Source</th>
516 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th>
517 <th title="Git commit position/hash">Commit</th>
518 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th>
519 <th title="Why this CL is related to the failure">Reason</th>
520 <th title="Additional information such as the status of try jo b.">Note</th>
521 </tr>
522 </thead>
523 <tbody>
524 </tbody>
525 </table>
526 <br>
527 </div>
528
446 <div id="flaky_failures" class='not-display'> 529 <div id="flaky_failures" class='not-display'>
447 <b>Flaky failures</b> 530 <b>Flaky failures</b>
448 <table id="flaky_failures_table"> 531 <table id="flaky_failures_table">
449 <thead> 532 <thead>
450 <tr> 533 <tr>
451 <th rowspan="3" title="Failed step name" width="150px">Step</t h> 534 <th rowspan="2" title="Failed step name" width="150px">Step</t h>
452 <th rowspan="3" title="Failed test name" width="300px">Test(s) </th> 535 <th rowspan="2" title="Failed test name" width="300px">Test(s) </th>
453 <th rowspan="3" title="The build cycle in which the step start ed to fail">First Failure</th> 536 <th rowspan="2" title="The build cycle in which the step start ed to fail">First Failure</th>
454 <th rowspan="3" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th> 537 <th rowspan="2" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th>
455 <th rowspan="3" title="link to swarming rerun">Swarming Rerun< /th> 538 <th rowspan="2" title="link to swarming rerun">Swarming Rerun< /th>
456 <th colspan="4">Suspected CLs</th> 539 <th colspan="4">Suspected CLs</th>
457 </tr> 540 </tr>
458 <tr> 541 <tr>
459 <th colspan="4">Heuristic Analysis Result</th>
460 </tr>
461 <tr>
462 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th> 542 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th>
463 <th title="Git commit position/hash">Commit</th> 543 <th title="Git commit position/hash">Commit</th>
464 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th> 544 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th>
465 <th title="Why this CL is related to the failure">Hints</th> 545 <th title="Why this CL is related to the failure">Hints</th>
466 </tr> 546 </tr>
467 </thead> 547 </thead>
468 <tbody> 548 <tbody>
469 </tbody> 549 </tbody>
470 </table> 550 </table>
471 <br> 551 <br>
472 </div> 552 </div>
473 553
474 <div id="unclassified_failures" class='not-display'> 554 <div id="unclassified_failures" class='not-display'>
475 <b>Unclassified failures</b> 555 <b>Unclassified failures</b>
476 <table id="unclassified_failures_table"> 556 <table id="unclassified_failures_table">
477 <thead> 557 <thead>
478 <tr> 558 <tr>
479 <th rowspan="3" title="Failed step name" width="150px">Step</t h> 559 <th rowspan="2" title="Failed step name" width="150px">Step</t h>
480 <th rowspan="3" title="Failed test name" width="300px">Test(s) </th> 560 <th rowspan="2" title="Failed test name" width="300px">Test(s) </th>
481 <th rowspan="3" title="The build cycle in which the step start ed to fail">First Failure</th> 561 <th rowspan="2" title="The build cycle in which the step start ed to fail">First Failure</th>
482 <th rowspan="3" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th> 562 <th rowspan="2" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th>
483 <th rowspan="3" title="The reason why we're not sure about thi s result">Reason</th> 563 <th rowspan="2" title="The reason why we're not sure about thi s result">Reason</th>
484 <th colspan="4">Suspected CLs</th> 564 <th colspan="4">Suspected CLs</th>
485 </tr> 565 </tr>
486 <tr> 566 <tr>
487 <th colspan="4">Heuristic Analysis Result</th>
488 </tr>
489 <tr>
490 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th> 567 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th>
491 <th title="Git commit position/hash">Commit</th> 568 <th title="Git commit position/hash">Commit</th>
492 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th> 569 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th>
493 <th title="Why this CL is related to the failure">Hints</th> 570 <th title="Why this CL is related to the failure">Hints</th>
494 </tr> 571 </tr>
495 </thead> 572 </thead>
496 <tbody> 573 <tbody>
497 </tbody> 574 </tbody>
498 </table> 575 </table>
576 <br>
499 </div> 577 </div>
500 </div> 578 </div>
501 <br> 579
502 <div class="thumbs-up-down"> 580 <div class="thumbs-up-down">
503 <b>Feedback on Findit result:</b><br> 581 <b>Feedback on Findit result:</b><br>
504 <div class="triage thumb-up">Correct <img src="https://www.gstatic.com /images/icons/material/system/1x/thumb_up_black_24dp.png"/></div> 582 <div class="triage thumb-up">Correct <img src="https://www.gstatic.com /images/icons/material/system/1x/thumb_up_black_24dp.png"/></div>
505 <div class="triage thumb-down"><img src="https://www.gstatic.com/image s/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> 583 <div class="triage thumb-down"><img src="https://www.gstatic.com/image s/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div>
506 </div> 584 </div>
507 </div> 585 </div>
508 {% endif %} 586 {% endif %}
509 {% endif %} 587 {% endif %}
510 588
511 {% if show_triage_help_button %} 589 {% if show_triage_help_button %}
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 appearing in the failure log. (eg: file.h was changed and 626 appearing in the failure log. (eg: file.h was changed and
549 file_unittest.cc or file_impl.cc appeared in the log.)</li> 627 file_unittest.cc or file_impl.cc appeared in the log.)</li>
550 <li>1: The CL rolled a dependency within src/DEPS and a file of that 628 <li>1: The CL rolled a dependency within src/DEPS and a file of that
551 dependency appears in the failure log. (eg: third_party/dep 629 dependency appears in the failure log. (eg: third_party/dep
552 was changed in src/DEPS and third_party/dep/f.cpp appeared 630 was changed in src/DEPS and third_party/dep/f.cpp appeared
553 in the log.)</li> 631 in the log.)</li>
554 </ul> 632 </ul>
555 (More rules will be added when implemented.) 633 (More rules will be added when implemented.)
556 </div> 634 </div>
557 </body> 635 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698