Skip to content

Commit

Permalink
Merge pull request #181 from Martchus/report-missing-bugrefs
Browse files Browse the repository at this point in the history
Report missing bug references of softfails, don't just write a log line
  • Loading branch information
okurz authored Oct 13, 2021
2 parents d2e8ca9 + 752d6c3 commit fb80610
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 4 deletions.
5 changes: 1 addition & 4 deletions openqa_review/openqa_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,10 +1026,7 @@ def _get_bugref_for_softfailed_module(self, result_item, module_name):
continue
return match.group(1) + "#" + match.group(2)
else: # pragma: no cover
log.error(
"Could not find any soft failure reference within details of soft-failed job '%s'. Could be deleted workaround needle?."
% absolute_url(self.root_url, result_item)
)
return "missing bug reference"

def has_todo_issues(self):
"""Tell if report has new or existing todo issues."""
Expand Down
8 changes: 8 additions & 0 deletions tests/broken-softfails/:api:v1:jobs:5590738:details
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"job" : {
"name" : "sle-11-SP3-Server-DVD-Incidents-Kernel-x86_64-Build:18520:kernel-ec2-ltp_containers@64bit",
"result" : "softfailed",
"test" : "ltp_containers",
"testresults" : [{ "details" : [], "name" : "netns_sysfs", "result" : "softfailed" }]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "details" : [], "result" : "softfail" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head><title>openQA: Test summary</title></head>
<body>
<h2>Test result overview</h2>
<div id="summary" class="card border-danger"></div>
<h3>Flavor: Server-DVD-Incidents-Kernel</h3>
<table id="results_Server-DVD-Incidents-Kernel" class="overview fixedheader table table-striped table-hover">
<thead><tr><th>Test</th><th id="flavor_Server-DVD-Incidents-Kernel_arch_x86_64">x86_64</th></tr></thead>
<tbody>
<tr>
<td class="name"><a data-title="ltp_containers"><span title="ltp_containers">ltp_containers</span></a></td>
<td id="res_Server-DVD-Incidents-Kernel_x86_64_ltp_containers" name="jobid_td_5590738">
<span id="res-5590738">
<a href="/tests/5590738"><i class="status fa fa-circle result_softfailed" title="Done: softfailed"></i></a>
</span>
</td>
</tr>
</tbody>
</table>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"build_results" : [
{
"build" : ":18520:kernel-ec2",
"distris" : { "sle" : 1 },
"failed" : 9,
"key" : "11-SP3-:18520:kernel-ec2",
"labeled" : 0,
"passed" : 34,
"reviewed" : "",
"skipped" : 0,
"softfailed" : 2,
"total" : 45,
"unfinished" : 0,
"version" : "11-SP3"
},
{
"build" : ":18179:kernel-ec2",
"distris" : { "sle" : 1 },
"failed" : 1,
"key" : "11-SP3-:18179:kernel-ec2",
"labeled" : 0,
"passed" : 0,
"reviewed" : "",
"skipped" : 44,
"softfailed" : 0,
"total" : 45,
"unfinished" : 0,
"version" : "11-SP3"
}
],
"group" : {
"id" : 161,
"name" : "Maintenance: SLE 11 SP3 Kernel Incidents",
"parent_id" : 8,
"parent_name" : "Maintenance: Single Incidents"
}
}
18 changes: 18 additions & 0 deletions tests/broken-softfails/report-broken-softfails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 0


**Date:** 2021-10-13 - 13:17
**Build:** :18520:kernel-ec2

---

**Arch:** x86_64
**Status: <span style="color: green;">Green</span>**

**Existing Product bugs:**

* soft fails: ltp_containers -> missing bug reference



---
14 changes: 14 additions & 0 deletions tests/test_openqa_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,20 @@ def test_custom_reports_based_on_issue_status():
compare_report(str(report), os.path.join(args.load_dir, "report25_bugrefs_query_issues_filter_closed.md"))


def test_get_bugref_for_softfailed_module():
args = cache_test_args_factory()
args.verbose_test = 1
args.show_empty = False
args.bugrefs = True
args.include_softfails = True
args.builds = ":18520:kernel-ec2,:18179:kernel-ec2"
args.job_group_urls = "https://openqa.suse.de/group_overview/161"
args.load_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "broken-softfails")

report = str(openqa_review.generate_report(args))
compare_report(report, os.path.join(args.load_dir, "report-broken-softfails.md"))


def test_arch_distinguish():
args = cache_test_args_factory()
args.arch = None
Expand Down

0 comments on commit fb80610

Please sign in to comment.