Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 <script> | 87 <script> |
| 88 var findit = {}; | 88 var findit = {}; |
| 89 findit.analysisCompleted = '{{analysis_completed}}' == 'True'; | 89 findit.analysisCompleted = '{{analysis_completed}}' == 'True'; |
| 90 findit.analysisFailed = '{{analysis_failed}}' == 'True'; | 90 findit.analysisFailed = '{{analysis_failed}}' == 'True'; |
| 91 findit.builderUrl = 'https://build.chromium.org/p/{{master_name}}/builders/{ {builder_name}}'; | 91 findit.builderUrl = 'https://build.chromium.org/p/{{master_name}}/builders/{ {builder_name}}'; |
| 92 findit.buildUrl = findit.builderUrl + '/builds/{{build_number}}'; | 92 findit.buildUrl = findit.builderUrl + '/builds/{{build_number}}'; |
| 93 findit.analysisCorrect = '{{analysis_correct}}'; // Possible values: 'None' , 'True', or 'False'. | 93 findit.analysisCorrect = '{{analysis_correct}}'; // Possible values: 'None' , 'True', or 'False'. |
| 94 findit.showTriageHelpButton = '{{show_triage_help_button}}' == 'True'; | 94 findit.showTriageHelpButton = '{{show_triage_help_button}}' == 'True'; |
| 95 findit.showDebugInfo = '{{show_debug_info}}' == 'True'; | 95 findit.showDebugInfo = '{{show_debug_info}}' == 'True'; |
| 96 findit.analysisResult = {{analysis_result | tojson | safe}}; | 96 findit.analysisResult = {{analysis_result | tojson | safe}}; |
| 97 | 97 findit.tryjobStatusMessageMap = {{status_message_map | tojson | safe}}; |
| 98 function generateStringForSingleCL(cl) { | 98 findit.defaultGitBaseUrl = 'https://chromium.googlesource.com/chromium/src.g it/+/'; |
| 99 var clString = ''; | |
| 100 clString += '<td><a href="' + findit.builderUrl + '/builds/' + cl.build_nu mber + '">' + cl.build_number + '</a></td>'; | |
| 101 clString += '<td>' + cl.repo_name + '</td>'; | |
| 102 clString += '<td><a href="' + cl.url + '">' + cl.commit_position || cl.rev ision + '</a></td>'; | |
| 103 clString += '<td>' + cl.score + '</td>'; | |
| 104 clString += '<td>'; | |
| 105 | |
| 106 var sortedHintsList = Object.keys(cl.hints).sort(function(a, b) { | |
| 107 return cl.hints[b] - cl.hints[a]; | |
| 108 }); // Sorts hints by score in descending order. | |
| 109 $.each(sortedHintsList, function(index, hint) { | |
| 110 clString += '<li>' + hint + '</li>'; | |
| 111 }); | |
| 112 clString += '</td>'; | |
| 113 return clString; | |
| 114 } | |
| 115 | |
| 116 function addRowToResultTable(stepIndex, testIndex, failure, type) { | |
| 117 var rowString; | |
| 118 var failureWithLink; | |
| 119 if (type == 'step') { | |
| 120 rowString = '<tr id="' + stepIndex.toString() +'">'; | |
| 121 var stepUrl = findit.buildUrl + '/steps/' + failure.step_name; | |
| 122 var arrowImg = ''; | |
| 123 if (failure.tests && failure.tests.length > 0) { | |
| 124 arrowImg = '<a class="collapsed"> <img class="toggle-img" src="https:/ /www.gstatic.com/images/icons/material/system/1x/keyboard_arrow_right_black_24dp .png"> </a>'; | |
| 125 } | |
| 126 | |
| 127 if (findit.showDebugInfo) { | |
| 128 failureWithLink = arrowImg + '<a href="./failure-log?url=' + stepUrl + '"><font class="valign-middle">' + failure.step_name + '</font></a>'; | |
| 129 } else { | |
| 130 failureWithLink = arrowImg + '<a href="' + stepUrl + '">' + failure.st ep_name + '</a>'; | |
| 131 } | |
| 132 | |
| 133 } else { | |
| 134 rowString = '<tr id="' + stepIndex.toString() + '-' + testIndex.toString () + '-0" class="hidden-row">'; | |
| 135 failureWithLink = '<i>' + failure.test_name + '</i>'; | |
| 136 } | |
| 137 | |
| 138 var rowsSpan = failure.suspected_cls.length > 0 ? failure.suspected_cls.le ngth : 1; | |
| 139 rowString += '<td valigh="middle" rowspan="' + rowsSpan + '">' + failureWi thLink + '</td>'; | |
| 140 rowString += '<td rowspan="' + rowsSpan + '"><a href="' + findit.builderUr l + '/builds/' + failure.first_failure + '">' + failure.first_failure + '</a></t d>'; | |
| 141 if (failure.last_pass) { | |
| 142 rowString += '<td rowspan="' + rowsSpan + '"><a href="' + findit.builder Url + '/builds/' + failure.last_pass + '">' + failure.last_pass + '</a></td>'; | |
| 143 } else { | |
| 144 rowString += '<td rowspan="' + rowsSpan + '">N/A</td>'; | |
| 145 } | |
| 146 if (failure.suspected_cls.length > 0) { | |
| 147 clString = generateStringForSingleCL(failure.suspected_cls[0]); | |
| 148 rowString += clString + '</tr>'; | |
| 149 $('#failures tbody').append(rowString); | |
| 150 | |
| 151 for (var i = 1; i < failure.suspected_cls.length; i++) { | |
| 152 if (type == 'step') { | |
| 153 rowString = '<tr>'; | |
| 154 } else { | |
| 155 rowString = '<tr id="' + stepIndex.toString() + '-' + testIndex.toSt ring() + '-' + i.toString() + '" class="hidden-row">'; | |
| 156 } | |
| 157 | |
| 158 clString = generateStringForSingleCL(failure.suspected_cls[i]); | |
| 159 rowString += clString + '</tr>'; | |
| 160 $('#failures tbody').append(rowString); | |
| 161 } | |
| 162 } else { | |
| 163 rowString += '<td colspan="5">'; | |
| 164 if(type == 'step' && failure.supported == false) { | |
| 165 rowString += 'Not Supported</td>'; | |
| 166 } else { | |
| 167 rowString += 'Not Found</td>'; | |
| 168 } | |
| 169 rowString += '</tr>'; | |
| 170 $('#failures tbody').append(rowString); | |
| 171 } | |
| 172 | |
| 173 if(type == 'step' && failure.tests && failure.tests.length > 0) { | |
| 174 $.each(failure.tests, function(testIndex, value) { | |
| 175 addRowToResultTable(stepIndex, testIndex, value, 'test'); | |
| 176 }); | |
| 177 } | |
| 178 } | |
| 179 | |
| 180 function displayAnalysisResult() { | |
| 181 $.each(findit.analysisResult.failures, function(index, value) { | |
| 182 addRowToResultTable(index, -1, value, 'step'); | |
| 183 }); | |
| 184 } | |
| 185 | 99 |
| 186 function triageAnalysisResult(e) { | 100 function triageAnalysisResult(e) { |
| 187 var target = $(this); | 101 var target = $(this); |
| 188 if (target.hasClass('triaged')) | 102 if (target.hasClass('triaged')) |
| 189 return; | 103 return; |
| 190 | 104 |
| 191 var correct = target.hasClass('thumb-up'); | 105 var correct = target.hasClass('thumb-up'); |
| 192 $.getJSON('triage-analysis?correct=' + correct + '&url=' + findit.buildUrl , function(data) { | 106 $.getJSON('triage-analysis?correct=' + correct + '&url=' + findit.buildUrl , function(data) { |
| 193 if (data['success']) { | 107 if (data['success']) { |
| 194 $('.triaged').addClass('triage').removeClass('triaged'); | 108 $('.triaged').addClass('triage').removeClass('triaged'); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 } | 141 } |
| 228 $('#triage_help_button').prop('disabled', false); | 142 $('#triage_help_button').prop('disabled', false); |
| 229 }).error(function(xhr) { | 143 }).error(function(xhr) { |
| 230 // Replace the whole page with errors from server side. | 144 // Replace the whole page with errors from server side. |
| 231 document.body.outerHTML = xhr.responseText; | 145 document.body.outerHTML = xhr.responseText; |
| 232 }); | 146 }); |
| 233 | 147 |
| 234 e.preventDefault(); | 148 e.preventDefault(); |
| 235 } | 149 } |
| 236 | 150 |
| 237 function toggleTests(thisobj) { | |
| 238 var imgDirection; | |
| 239 var rowAddedClass; | |
| 240 var rowRemovedClass; | |
| 241 if (thisobj.hasClass("collapsed")) { | |
| 242 thisobj.removeClass("collapsed").addClass("expanded"); | |
| 243 imgDirection = 'down'; | |
| 244 rowAddedClass = "displayed-row"; | |
| 245 rowRemovedClass = "hidden-row"; | |
| 246 } else { | |
| 247 thisobj.removeClass("expanded").addClass("collapsed"); | |
| 248 imgDirection = 'right'; | |
| 249 rowAddedClass = "hidden-row"; | |
| 250 rowRemovedClass = "displayed-row"; | |
| 251 } | |
| 252 thisobj.html('<img class="toggle-img" src="https://www.gstatic.com/images/ icons/material/system/1x/keyboard_arrow_' + imgDirection + '_black_24dp.png">'); | |
| 253 var stepRowId = thisobj.closest("tr").attr("id"); | |
| 254 var testRowId = stepRowId + "-" + "0"; | |
| 255 var i = 0; | |
| 256 while ($("#" + testRowId + "-" + "0").length) { | |
| 257 var clRowId = testRowId + "-" + "0"; | |
| 258 var j = 0; | |
| 259 while ($("#" + clRowId).length) { | |
| 260 $( "#" + clRowId ).addClass(rowAddedClass).removeClass(rowRemovedClass ); | |
| 261 j++; | |
| 262 clRowId = testRowId + "-" + j; | |
| 263 } | |
| 264 i++; | |
| 265 testRowId = stepRowId + "-" + i; | |
| 266 } | |
| 267 } | |
| 268 | |
| 269 function toggleList(thisobj) { | 151 function toggleList(thisobj) { |
| 270 var thisObjId = thisobj.attr("id"); | 152 var thisObjId = thisobj.attr("id"); |
| 271 if (thisobj.hasClass("collapsed_list")) { | 153 if (thisobj.hasClass("collapsed_list")) { |
| 272 thisobj.removeClass("collapsed_list").addClass("expanded_list"); | 154 thisobj.removeClass("collapsed_list").addClass("expanded_list"); |
| 273 thisobj.html('<a href="#" id="' + thisObjId + '"class="expanded_list">Sh ow less</a>'); | 155 thisobj.html('<a href="#" id="' + thisObjId + '"class="expanded_list">Sh ow less</a>'); |
| 274 $('#list-' + thisObjId).removeClass("not-display"); | 156 $('#list-' + thisObjId).removeClass("not-display"); |
| 275 } else { | 157 } else { |
| 276 thisobj.removeClass("expanded_list").addClass("collapsed_list"); | 158 thisobj.removeClass("expanded_list").addClass("collapsed_list"); |
| 277 thisobj.html('<a href="#" class="collapsed_list">Show more</a>'); | 159 thisobj.html('<a href="#" class="collapsed_list">Show more</a>'); |
| 278 $('#list-' + thisObjId).addClass("not-display"); | 160 $('#list-' + thisObjId).addClass("not-display"); |
| 279 } | 161 } |
| 280 } | 162 } |
| 281 | 163 |
| 282 function displaySwarmingTask() { | 164 function generateCommonCellsForAllCategories(step_name, category, index, tes ts, first_failure, last_pass, rowspan) { |
| 283 $.getJSON('swarming-task?url=' + findit.buildUrl, function(data) { | 165 var rowString = '<td rowspan="' + rowspan + '">' + step_name + '</td>'; |
| 284 if (! jQuery.isEmptyObject(data) ) { | |
| 285 var tableString = '<table><tr><th>Step</th><th>Test(s)</th><th>Statu s</th><th>Task</th></tr>'; | |
| 286 var hasTaskData = false; | |
| 287 $.each(data, function(step, task_info) { | |
| 288 var tasks = task_info.swarming_tasks; | |
| 289 if (tasks.length == 0) { | |
| 290 return true; // Broken data, continue to next one. | |
| 291 } | |
| 292 for (var i = 0; i < tasks.length; i++) { | |
| 293 hasTaskData = true; | |
| 294 task = tasks[i]; | |
| 295 tableString += '<tr>'; | |
| 296 tableString += '<td>' + step + '</td><td>'; | |
| 297 | 166 |
| 298 var j = 0; | 167 rowString += '<td rowspan="' + rowspan + '">'; |
| 299 for (; j < (task.tests.length > 5 ? 5 : task.tests.length); j++) { | 168 var j = 0; |
| 300 tableString += '<li><div title="' + task.tests[j] + '" class=" truncate">' + task.tests[j] + '</div></li>'; | 169 for (; j < (tests.length > 5 ? 5 : tests.length); j++) { |
| 301 } | 170 rowString += '<li><div title="' + tests[j] + '" class="truncate">' + tes ts[j] + '</div></li>'; |
| 171 } | |
| 172 if (tests.length > 5) { | |
| 173 rowString += '<div id="list-' + category + '-' + index + '" class="not- display">'; | |
| 174 for (; j < tests.length; j++) { | |
| 175 rowString += '<li><div title="' + tests[j] + '" class="truncate">' + t ests[j] + '</div></li>'; | |
| 176 } | |
| 177 rowString += '</div><a id="' + category + '-' + index + '"href="#" class ="collapsed_list">Show more</a>'; | |
| 178 } | |
| 179 rowString += '</td>'; | |
| 302 | 180 |
| 303 if(task.tests.length > 5) { | 181 rowString += '<td rowspan="' + rowspan + '"><a href="' + findit.builderUrl + '/builds/' + first_failure + '">' + first_failure + '</a></td>'; |
| 304 tableString += '<div id="list-' + i + '"class="not-display">'; | 182 if (last_pass) { |
| 305 for (; j < task.tests.length; j++) { | 183 rowString += '<td rowspan="' + rowspan + '"><a href="' + findit.builderU rl + '/builds/' + last_pass + '">' + last_pass + '</a></td>'; |
| 306 tableString += '<li><div title="' + task.tests[j] + '" class ="truncate">' + task.tests[j] + '</div></li>'; | 184 } else { |
| 307 } | 185 rowString += '<td rowspan="' + rowspan + '">N/A</td>'; |
| 308 tableString += '</div><a id="' + i + '"href="#" class="collaps ed_list">Show more</a>'; | 186 } |
| 309 } | |
| 310 | 187 |
| 311 tableString += '</td>'; | 188 return rowString; |
| 312 if (task.status == 'Completed') { | |
| 313 status_class = 'completed'; | |
| 314 } else if (task.status == 'Error') { | |
| 315 status_class = 'error'; | |
| 316 } else { | |
| 317 // If status is either 'Pending' or 'Running', add 'running' s tyle. | |
| 318 status_class = 'running'; | |
| 319 } | |
| 320 tableString += '<td><span class="' + status_class + '">' + task. status + '</span></td>'; | |
| 321 if (task.task_id) { | |
| 322 tableString += '<td><a href="' + task.task_url + '">' + task.t ask_id + '</a></td>'; | |
| 323 } else { | |
| 324 tableString += '<td></td>'; | |
| 325 } | |
| 326 tableString += '</tr>'; | |
| 327 } | |
| 328 }); | |
| 329 tableString += '</table>'; | |
| 330 if (hasTaskData) { | |
| 331 $('#swarming_task_table').html(tableString); | |
| 332 $('#swarming_task').removeClass('not-display'); | |
| 333 } | |
| 334 } | |
| 335 }); | |
| 336 } | 189 } |
| 337 | 190 |
| 338 function displayTryJobResult() { | 191 function generateStringForSingleCL(cl) { |
| 339 $.getJSON('try-job-result?url=' + findit.buildUrl, function(data) { | 192 var clString = '<td><a href="' + findit.builderUrl + '/builds/' + cl.build _number + '">' + cl.build_number + '</a></td>'; |
| 340 if (! jQuery.isEmptyObject(data)) { | 193 clString += '<td><a href="' + cl.url + '">' + cl.commit_position || cl.rev ision + '</a></td>'; |
| 341 var tableString = '<table><tr><th>Step</th><th>Test</th><th>Link</th ><th>Status</th><th>Culprit</th></tr>'; | 194 clString += '<td>' + cl.score + '</td>'; |
| 342 var hasTryJobData = false; | 195 clString += '<td>'; |
| 343 $.each(data, function(key, value) { | |
| 344 tableString += '<tr>'; | |
| 345 tableString += '<td>' + value.step_name + '</td>'; | |
| 346 tableString += '<td><li><div title="' + value.test_name + '" class ="truncate">' + value.test_name + '</div></li></td>'; | |
| 347 if (value.try_job_url) { | |
| 348 tableString += '<td><a href="' + value.try_job_url + '">' + valu e.try_job_build_number + '</a></td>'; | |
| 349 } else { | |
| 350 tableString += '<td></td>'; | |
| 351 } | |
| 352 | 196 |
| 353 if (value.status) { | 197 var sortedHintsList = Object.keys(cl.hints).sort(function(a, b) { |
| 354 hasTryJobData = true; | 198 return cl.hints[b] - cl.hints[a]; |
| 355 } else { | 199 }); // Sorts hints by score in descending order. |
| 356 return true; // Broken data, continue to next one. | 200 $.each(sortedHintsList, function(index, hint) { |
| 357 } | 201 clString += '<li>' + hint + '</li>'; |
| 358 var status; | 202 }); |
| 359 var revision; | 203 clString += '</td>'; |
| 360 noTryJobStatuses = ['Flaky', 'Skipped']; | 204 return clString; |
| 361 if (noTryJobStatuses.indexOf(value.status) > -1) { | 205 } |
| 362 status = ''; | 206 |
| 363 revision = value.status; | 207 function generateHeuristicCulpritCls(suspectedCls, supported) { |
| 364 } else if (value.status == 'Completed'){ | 208 var cellTableString = ''; |
| 365 status = value.status; | 209 |
| 366 revision = value.commit_position || value.revision || 'Not Found '; | 210 if (suspectedCls.length > 0) { |
| 367 } else { | 211 cellTableString += generateStringForSingleCL(suspectedCls[0]); |
| 368 status = value.status; | 212 for (var i = 1; i < suspectedCls.length; i++) { |
| 369 revision = ''; | 213 cellTableString += '<tr>' + generateStringForSingleCL(suspectedCls[i]) + '</tr>'; |
| 370 } | 214 } |
| 371 if (status == 'Completed') { | 215 } else { |
| 372 status_class = 'completed'; | 216 cellTableString += '<td colspan="4">'; |
| 373 } else if (status == 'Error') { | 217 if (!supported) { |
|
stgao
2016/03/29 06:36:10
``supported`` could be null for legacy data?
Jeff
| |
| 374 status_class = 'error'; | 218 cellTableString += 'Not Supported</td>'; |
| 375 } else { | 219 } else { |
| 376 // If status is either 'Scheduled' or 'Running', add 'running' s tyle. | 220 cellTableString += 'Not Found</td>'; |
| 377 status_class = 'running'; | 221 } |
| 378 } | 222 } |
| 379 tableString += '<td><span class="' + status_class + '">' + status + '</span></td>'; | 223 return cellTableString; |
| 380 if (value.review_url) { | 224 } |
| 381 tableString += '<td><a href="' + value.review_url + '">' + revis ion + '</a></td>'; | 225 |
| 382 } else { | 226 function displayReliableFailures(step_name, results) { |
| 383 var tdWithTitleMap = { | 227 if (!jQuery.isEmptyObject(results)) { |
|
stgao
2016/03/29 06:36:09
Alternative:
if (jQuery.isEmptyObject(results))
| |
| 384 'Flaky': '<td title="The test is flaky based on swarming tas k result.">', | 228 var tableString = ''; |
| 385 'Skipped': '<td title="There is no result from swarming task to identify flakiness so skip the step to avoid false positive.">' | 229 $.each(results, function(index, result) { |
| 386 }; | 230 tableString += '<tr>'; |
| 387 tableString += tdWithTitleMap[revision] || '<td>'; | 231 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? res ult.heuristic_analysis.suspected_cls.length : 1; |
| 388 tableString += revision + '</td>'; | 232 |
| 389 } | 233 tableString += generateCommonCellsForAllCategories(step_name, 'determi ned', index, result.tests, result.first_failure, result.last_pass, rowspan); |
| 390 tableString += '</tr>'; | 234 |
| 391 }); | 235 var tryJob = result.try_job; |
| 392 tableString += '</table>'; | 236 var tryJobCulprit = tryJob.culprit; |
| 393 if (hasTryJobData) { | 237 if (! jQuery.isEmptyObject(tryJobCulprit)) { |
| 394 $('#try_job_result').html(tableString); | 238 var build_number = result.try_job.try_job_key.split('/')[2]; // try _job_key would look like: 'master_name/builder_name/build_number'. |
| 395 $('#try_job').removeClass('not-display'); | 239 tableString += '<td rowspan="' + rowspan + '"><a href="' + findit.bu ilderUrl + '/builds/' + build_number + '">' + build_number + '</a></td>'; |
| 396 } | 240 var review_url = tryJobCulprit.review_url || findit.defaultGitBaseUr l + 'tryJobCulprit.revision'; |
| 241 tableString += '<td rowspan="' + rowspan + '"><a href="' + review_ur l + '">' + tryJobCulprit.commit_position || tryJobCulprit.revision + '</a></td>' ; | |
| 242 | |
| 243 } else { | |
| 244 tableString += '<td colspan="2" rowspan="' + rowspan + '">' + findit .tryjobStatusMessageMap[tryJob.status] + '</td>'; | |
| 397 } | 245 } |
| 398 }); | 246 |
| 247 tableString += '<td rowspan="' + rowspan + '">'; | |
| 248 tableString += '<li>Reliable failure: <a href="' + tryJob.task_url+ '" >' + tryJob.task_id + '</a></li>'; | |
| 249 if (tryJob.try_job_url) { | |
| 250 tableString += '<li>For try job details: <a href="' + tryJob.try_job _url+ '">' + tryJob.try_job_build_number + '</a></li>'; | |
| 251 } | |
| 252 tableString += '</td>'; | |
| 253 | |
| 254 tableString += generateHeuristicCulpritCls(result.heuristic_analysis.s uspected_cls, result.supported); | |
| 255 tableString += '</tr>'; | |
| 256 }); | |
| 257 | |
| 258 $('#reliable_failures_table tbody').append(tableString); | |
| 259 $('#reliable_failures').removeClass('not-display'); | |
| 260 } | |
| 261 } | |
| 262 | |
| 263 function displayFlakyFailures(step_name, results) { | |
| 264 if (!jQuery.isEmptyObject(results)) { | |
| 265 var tableString = ''; | |
| 266 $.each(results, function(index, result) { | |
| 267 tableString += '<tr>'; | |
| 268 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? res ult.heuristic_analysis.suspected_cls.length : 1; | |
| 269 tableString += generateCommonCellsForAllCategories(step_name, 'flaky', index, result.tests, result.first_failure, result.last_pass, rowspan); | |
| 270 | |
| 271 tableString += '<td rowspan="' + rowspan + '"><a href="' + result.try_ job.task_url + '">' + result.try_job.task_id + '</a></td>'; | |
| 272 | |
| 273 tableString += generateHeuristicCulpritCls(result.heuristic_analysis.s uspected_cls, result.supported); | |
| 274 | |
| 275 tableString += '</tr>'; | |
| 276 }); | |
| 277 | |
| 278 $('#flaky_failures_table tbody').append(tableString); | |
| 279 $('#flaky_failures').removeClass('not-display'); | |
| 280 } | |
| 281 } | |
| 282 | |
| 283 function displayunclassifiedFailures(step_name, results) { | |
|
stgao
2016/03/29 06:36:09
nit: unclassified -> Unclassified.
| |
| 284 if (!jQuery.isEmptyObject(results)) { | |
| 285 var tableString = ''; | |
| 286 $.each(results, function(index, result) { | |
| 287 tableString += '<tr>'; | |
| 288 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? res ult.heuristic_analysis.suspected_cls.length : 1; | |
| 289 tableString += generateCommonCellsForAllCategories(step_name, 'undeter mined', index, result.tests, result.first_failure, result.last_pass, rowspan); | |
| 290 | |
| 291 tableString += '<td rowspan="' + rowspan + '">' + findit.tryjobStatusM essageMap[result.try_job.status] + '</td>'; | |
| 292 | |
| 293 tableString += generateHeuristicCulpritCls(result.heuristic_analysis.s uspected_cls, result.supported); | |
| 294 tableString += '</tr>'; | |
| 295 }); | |
| 296 | |
| 297 $('#unclassified_failures_table tbody').append(tableString); | |
| 298 $('#unclassified_failures').removeClass('not-display'); | |
| 299 } | |
| 399 } | 300 } |
| 400 | 301 |
| 401 $(document).ready(function() { | 302 $(document).ready(function() { |
| 402 if (!findit.analysisCompleted) { | 303 if (!findit.analysisCompleted) { |
| 403 $('#status_message').text('running, will refresh in 5 seconds...'); | 304 $('#status_message').text('running, will refresh in 5 seconds...'); |
| 404 $('#status_message').attr('class', 'running'); | 305 $('#status_message').attr('class', 'running'); |
| 405 setTimeout(function() { | 306 setTimeout(function() { |
| 406 {% if show_debug_info %} | 307 {% if show_debug_info %} |
| 407 window.location.href = 'build-failure?url=' + findit.buildUrl + '&debu g=1'; | 308 window.location.href = 'build-failure?url=' + findit.buildUrl + '&debu g=1'; |
| 408 {% else %} | 309 {% else %} |
| 409 window.location.href = 'build-failure?url=' + findit.buildUrl; | 310 window.location.href = 'build-failure?url=' + findit.buildUrl; |
| 410 {% endif %} | 311 {% endif %} |
| 411 }, 5000); | 312 }, 5000); |
| 412 } else { | 313 } else { |
| 413 if (findit.analysisFailed) { | 314 if (findit.analysisFailed) { |
| 414 $('#status_message').text('error'); | 315 $('#status_message').text('error'); |
| 415 $('#status_message').attr('class', 'error'); | 316 $('#status_message').attr('class', 'error'); |
| 416 } else { | 317 } else { |
| 417 // TODO: use another style when no culprit CL is found. | 318 // TODO: use another style when no culprit CL is found. |
| 418 $('#status_message').text('completed'); | 319 $('#status_message').text('completed'); |
| 419 $('#status_message').attr('class', 'completed'); | 320 $('#status_message').attr('class', 'completed'); |
| 420 | 321 |
| 421 $('.triage').click(triageAnalysisResult); | 322 $('.triage').click(triageAnalysisResult); |
| 422 | 323 |
| 423 if (findit.analysisResult.failures.length > 0) { | 324 if (!jQuery.isEmptyObject(findit.analysisResult)) { |
| 424 displayAnalysisResult(); | 325 $.each(findit.analysisResult, function(step_name, step_results) { |
| 326 $.each(step_results.results, function(category, results) { | |
| 327 if (category == 'reliable_failures') { | |
| 328 displayReliableFailures(step_name, results); | |
| 329 } else if (category == 'unclassified_failures') { | |
| 330 displayunclassifiedFailures(step_name, results); | |
| 331 } else if (category == 'flaky_failures') { | |
| 332 displayFlakyFailures(step_name, results); | |
| 333 } else { | |
| 334 alert('Unrecongnizable category of test results, please file a bug for it.'); | |
| 335 } | |
| 336 }); | |
| 337 }); | |
| 425 } else { | 338 } else { |
| 426 $('#triage-and-table').text('no failure is found'); | 339 $('#triage-and-table').text('no failure is found'); |
| 427 } | 340 } |
| 428 $(document).on("click",".expanded, .collapsed",function() { | |
| 429 toggleTests($(this)); | |
| 430 }); | |
| 431 | 341 |
| 432 if (findit.showTriageHelpButton) { | 342 if (findit.showTriageHelpButton) { |
| 433 $('#triage_help_button').click(triageHelp); | 343 $('#triage_help_button').click(triageHelp); |
| 434 } | 344 } |
| 435 if (findit.analysisCorrect == 'True') { | |
| 436 $('.thumb-up').addClass('triaged').removeClass('triage'); | |
| 437 } else if (findit.analysisCorrect == 'False') { | |
| 438 $('.thumb-down').addClass('triaged').removeClass('triage'); | |
| 439 } | |
| 440 } | 345 } |
| 441 } | 346 } |
| 442 | 347 |
| 443 $('#score-explanation-dialog').dialog({ | 348 $('#score-explanation-dialog').dialog({ |
| 444 autoOpen: false, | 349 autoOpen: false, |
| 445 modal: true, | 350 modal: true, |
| 446 width: 600, | 351 width: 600, |
| 447 }); | 352 }); |
| 448 $('#score-info').click(function() { | 353 $('.score-info').click(function() { |
| 449 $('#score-explanation-dialog').dialog('open'); | 354 $('#score-explanation-dialog').dialog('open'); |
| 450 }); | 355 }); |
| 451 | 356 |
| 452 // Displays Swarming task if any. | |
| 453 displaySwarmingTask(); | |
| 454 | |
| 455 // Displays Try Job Result if any. | |
| 456 displayTryJobResult(); | |
| 457 | |
| 458 $(document).on("click",".collapsed_list, .expanded_list",function() { | 357 $(document).on("click",".collapsed_list, .expanded_list",function() { |
| 459 toggleList($(this)); | 358 toggleList($(this)); |
| 460 }); | 359 }); |
| 461 }); | 360 }); |
| 462 </script> | 361 </script> |
| 463 </head> | 362 </head> |
| 464 <body> | 363 <body> |
| 465 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>) | 364 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>) |
| 466 <br> | 365 <br> |
| 467 <br> | 366 <br> |
| 468 | 367 |
| 469 <b>Build info:</b> | 368 <b>Build info:</b> |
| 470 <div> | 369 <div> |
| 471 Master: {{master_name}}<br> | 370 Master: {{master_name}}<br> |
| 472 Builder: <a href="https://build.chromium.org/p/{{master_name}}/builders/{{bu ilder_name}}">{{builder_name}}</a><br> | 371 Builder: <a href="https://build.chromium.org/p/{{master_name}}/builders/{{bu ilder_name}}">{{builder_name}}</a><br> |
| 473 Build Number: <a href="https://build.chromium.org/p/{{master_name}}/builders /{{builder_name}}/builds/{{build_number}}">{{build_number}}</a> | 372 Build Number: <a href="https://build.chromium.org/p/{{master_name}}/builders /{{builder_name}}/builds/{{build_number}}">{{build_number}}</a> |
| 474 </div> | 373 </div> |
| 475 <br> | 374 <br> |
| 476 | 375 |
| 477 <div id='swarming_task' class='not-display'> | |
| 478 <b> Swarming Task:</b> | |
| 479 <div id='swarming_task_table'></div> | |
| 480 <br> | |
| 481 </div> | |
| 482 <br> | |
| 483 | |
| 484 <div id='try_job' class='not-display'> | |
| 485 <b> Try job or Swarming Task Result:</b> | |
| 486 <div id='try_job_result'></div> | |
| 487 <br> | |
| 488 </div> | |
| 489 <br> | |
| 490 | |
| 491 <b>Analysis info:</b> | 376 <b>Analysis info:</b> |
| 492 <div id="analysis_info"> | 377 <div id="analysis_info"> |
| 493 status: <span id="status_message"></span> | 378 status: <span id="status_message"></span> |
| 494 {% if show_debug_info %} | 379 {% if show_debug_info %} |
| 495 {% if pipeline_status_path %} | 380 {% if pipeline_status_path %} |
| 496 <a href="{{pipeline_status_path}}">pipeline</a> | 381 <a href="{{pipeline_status_path}}">pipeline</a> |
| 497 {% endif %} | 382 {% endif %} |
| 498 <br> | 383 <br> |
| 499 Requested: {{analysis_request_time | default('N/A', true)}}<br> | 384 Requested: {{analysis_request_time | default('N/A', true)}}<br> |
| 500 {% if analysis_duration %} | 385 {% if analysis_duration %} |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 512 {% if analysis_failed %} | 397 {% if analysis_failed %} |
| 513 <br> | 398 <br> |
| 514 <span class="error">No result because of some error in analysis!</span> | 399 <span class="error">No result because of some error in analysis!</span> |
| 515 {% else %} | 400 {% else %} |
| 516 <div id="triage-and-table"> | 401 <div id="triage-and-table"> |
| 517 <div class="thumbs-up-down"> | 402 <div class="thumbs-up-down"> |
| 518 <div class="triage thumb-up">Correct <img src="https://www.gstatic.com /images/icons/material/system/1x/thumb_up_black_24dp.png"/></div> | 403 <div class="triage thumb-up">Correct <img src="https://www.gstatic.com /images/icons/material/system/1x/thumb_up_black_24dp.png"/></div> |
| 519 <div class="triage thumb-down"><img src="https://www.gstatic.com/image s/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> | 404 <div class="triage thumb-down"><img src="https://www.gstatic.com/image s/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> |
| 520 </div> | 405 </div> |
| 521 <div id="analysis_result"> | 406 <div id="analysis_result"> |
| 522 <table id="failures"> | 407 <div id="reliable_failures" class='not-display'> |
| 523 <thead> | 408 <br> |
| 524 <tr> | 409 <b>Reliable Failures</b> |
| 525 <th rowspan="2" title="Failed step/test name">Step/<font class=" header-test">Test</font></th> | 410 <table id="reliable_failures_table"> |
| 526 <th rowspan="2" title="The build cycle in which the step started to fail">First Failure</th> | 411 <thead> |
| 527 <th rowspan="2" title="The last build cycle in which the step pa ssed">Last Pass<br>Before Failure</th> | 412 <tr> |
| 528 <th colspan="7">Suspected CLs</th> | 413 <th rowspan="3" title="Failed step name" width="150px">Step</t h> |
| 529 </tr> | 414 <th rowspan="3" title="Failed test name" width="300px">Test(s) </th> |
| 530 <tr> | 415 <th rowspan="3" title="The build cycle in which the step start ed to fail">First Failure</th> |
| 531 <th title="The build cycle in which the CL was built or tested f or the first time">Build Number</th> | 416 <th rowspan="3" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th> |
| 532 <th title="The Git repo name of the CL">Repo Name</th> | 417 <th colspan="8">Suspected CLs</th> |
| 533 <th title="Git commit position/hash">Commit</th> | 418 </tr> |
| 534 <th title="The higher score, the more suspected">Score (<a id="s core-info" href="javascript:">?</a>)</th> | 419 <tr> |
| 535 <th title="Why this CL is related to the failure">Hints</th> | 420 <th colspan="3">Try Job Result</th> |
| 536 </tr> | 421 <th colspan="4">Heuristic Analysis Result</th> |
| 537 </thead> | 422 </tr> |
| 538 <tbody> | 423 <tr> |
| 539 </tbody> | 424 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th> |
| 540 </table> | 425 <th title="Git commit position/hash">Commit</th> |
| 426 <th title="Information about related swarming rerun and try jo b">Swarming rerun and<br>Try Job Info</th> | |
| 427 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th> | |
| 428 <th title="Git commit position/hash">Commit</th> | |
| 429 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th> | |
| 430 <th title="Why this CL is related to the failure">Hints</th> | |
| 431 </tr> | |
| 432 </thead> | |
| 433 <tbody> | |
| 434 </tbody> | |
| 435 </table> | |
| 436 </div> | |
| 437 | |
| 438 <div id="flaky_failures" class='not-display'> | |
| 439 <br> | |
| 440 <b>Flaky Failures</b> | |
| 441 <table id="flaky_failures_table"> | |
| 442 <thead> | |
| 443 <tr> | |
| 444 <th rowspan="3" title="Failed step name" width="150px">Step</t h> | |
| 445 <th rowspan="3" title="Failed test name" width="300px">Test(s) </th> | |
| 446 <th rowspan="3" title="The build cycle in which the step start ed to fail">First Failure</th> | |
| 447 <th rowspan="3" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th> | |
| 448 <th rowspan="3" title="link to swarming rerun">Swarming Rerun< /th> | |
| 449 <th colspan="4">Suspected CLs</th> | |
| 450 </tr> | |
| 451 <tr> | |
| 452 <th colspan="4">Heuristic Analysis Result</th> | |
| 453 </tr> | |
| 454 <tr> | |
| 455 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th> | |
| 456 <th title="Git commit position/hash">Commit</th> | |
| 457 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th> | |
| 458 <th title="Why this CL is related to the failure">Hints</th> | |
| 459 </tr> | |
| 460 </thead> | |
| 461 <tbody> | |
| 462 </tbody> | |
| 463 </table> | |
| 464 </div> | |
| 465 | |
| 466 <div id="unclassified_failures" class='not-display'> | |
| 467 <br> | |
| 468 <b>Unclassified Failures</b> | |
| 469 <table id="unclassified_failures_table"> | |
| 470 <thead> | |
| 471 <tr> | |
| 472 <th rowspan="3" title="Failed step name" width="150px">Step</t h> | |
| 473 <th rowspan="3" title="Failed test name" width="300px">Test(s) </th> | |
| 474 <th rowspan="3" title="The build cycle in which the step start ed to fail">First Failure</th> | |
| 475 <th rowspan="3" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th> | |
| 476 <th rowspan="3" title="The reason why we're not sure about thi s result">Reason</th> | |
| 477 <th colspan="4">Suspected CLs</th> | |
| 478 </tr> | |
| 479 <tr> | |
| 480 <th colspan="4">Heuristic Analysis Result</th> | |
| 481 </tr> | |
| 482 <tr> | |
| 483 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th> | |
| 484 <th title="Git commit position/hash">Commit</th> | |
| 485 <th title="The higher score, the more suspected">Score (<a cla ss="score-info" href="javascript:">?</a>)</th> | |
| 486 <th title="Why this CL is related to the failure">Hints</th> | |
| 487 </tr> | |
| 488 </thead> | |
| 489 <tbody> | |
| 490 </tbody> | |
| 491 </table> | |
| 492 </div> | |
| 541 </div> | 493 </div> |
| 542 </div> | 494 </div> |
| 543 {% endif %} | 495 {% endif %} |
| 544 {% endif %} | 496 {% endif %} |
| 545 | 497 |
| 546 {% if show_triage_help_button %} | 498 {% if show_triage_help_button %} |
| 547 <br><br> | 499 <br><br> |
| 548 <div id="triage_help"> | 500 <div id="triage_help"> |
| 549 <button id="triage_help_button">Triage Help</button> | 501 <button id="triage_help_button">Triage Help</button> |
| 550 <br> | 502 <br> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 583 appearing in the failure log. (eg: file.h was changed and | 535 appearing in the failure log. (eg: file.h was changed and |
| 584 file_unittest.cc or file_impl.cc appeared in the log.)</li> | 536 file_unittest.cc or file_impl.cc appeared in the log.)</li> |
| 585 <li>1: The CL rolled a dependency within src/DEPS and a file of that | 537 <li>1: The CL rolled a dependency within src/DEPS and a file of that |
| 586 dependency appears in the failure log. (eg: third_party/dep | 538 dependency appears in the failure log. (eg: third_party/dep |
| 587 was changed in src/DEPS and third_party/dep/f.cpp appeared | 539 was changed in src/DEPS and third_party/dep/f.cpp appeared |
| 588 in the log.)</li> | 540 in the log.)</li> |
| 589 </ul> | 541 </ul> |
| 590 (More rules will be added when implemented.) | 542 (More rules will be added when implemented.) |
| 591 </div> | 543 </div> |
| 592 </body> | 544 </body> |
| OLD | NEW |