Skip to content

Commit

Permalink
Intermittent commenter fixes (#8412)
Browse files Browse the repository at this point in the history
* fix dictionary in the comment

* initialize top_bugs variable

* add architecture in intermitent commenter table

* fix: linux1804-64/opt and linux1804-64-shippable/opt are the same platform

---------

Co-authored-by: Olivier Giorgis <[email protected]>
  • Loading branch information
djangoliv and ogiorgis authored Jan 15, 2025
1 parent a9b963e commit f25985b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion tests/intermittents_commenter/expected_comment.text
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is the #1 most frequent failure this week.
## Table
| |**no_variant**|
|---|:-:|
|**linux1804/debug**|1|
|**linux1804/x86/debug**|1|

## For more details, see:
https://treeherder.mozilla.org/intermittent-failures/bugdetails?bug=1&startday=2012-05-09&endday=2018-05-10&tree=all
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ This is the #1 most frequent failure this week.
## Table
| |**headless**|**no_variant**|
|---|:-:|:-:|
|**linux1804/debug**| |1|
|**linux1804/opt**| |1|
|**mac1015/debug**| |1|
|**mac1120/debug**|1| |
|**windows7-32/debug**|1| |
|**linux1804/x86/debug**| |1|
|**linux1804/x86/opt**| |1|
|**mac1015/x86_64/debug**| |1|
|**mac1120/x86_64/debug**|1| |
|**windows7-32/x86/debug**|1| |

## For more details, see:
https://treeherder.mozilla.org/intermittent-failures/bugdetails?bug=1&startday=2012-05-09&endday=2018-05-10&tree=all
21 changes: 12 additions & 9 deletions treeherder/intermittents_commenter/commenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def generate_bug_changes(self, startday, endday, alt_startday, alt_endday):
with open("treeherder/intermittents_commenter/comment.template") as template_file:
template = Template(template_file.read())

top_bugs = []
if self.weekly_mode:
top_bugs = [
bug[0]
Expand Down Expand Up @@ -278,31 +279,30 @@ def get_bug_stats(self, startday, endday):
"per_platform": {
"windows10-64": 52,
"osx-10-10": 1,
}
},
"test_suite_per_platform_and_build": {
"test_suite_per_platform_and_build": {
"windows10-64/debug" {
"mochitest-browser-chrome": 2,
"mochitest-browser-chrome-swr": 2,
},
"windows10-64/ccov" {
},
"windows10-64/ccov" {
"mochitest-browser-chrome": 0,
"mochitest-browser-chrome-swr": 2,
},
},
"osx-10-10/debug": {
"mochitest-browser-chrome": 2,
"mochitest-browser-chrome-swr": 0,
},
},
},
"windows10-64": {
"debug": 30,
"ccov": 20,
"asan": 2,
},
"osx-10-10": {
"debug: 1
"debug": 1,
}
},
}
}
"""
# Min required failures per bug in order to post a comment
Expand All @@ -321,6 +321,7 @@ def get_bug_stats(self, startday, endday):
.values(
"job__repository__name",
"job__machine_platform__platform",
"job__machine_platform__architecture",
"bug_id",
"job__option_collection_hash",
"job__signature__job_type_name",
Expand Down Expand Up @@ -368,13 +369,15 @@ def build_bug_map(self, bugs, option_collection_map):
bug_map = dict()
for bug in bugs:
platform = bug["job__machine_platform__platform"]
platform = platform.replace("-shippable", "")
architecture = bug["job__machine_platform__architecture"]
repo = bug["job__repository__name"]
bug_id = bug["bug_id"]
build_type = option_collection_map.get(
bug["job__option_collection_hash"], "unknown build"
)
test_variant = self.get_test_variant(bug["job__signature__job_type_name"])
platform_and_build = f"{platform}/{build_type}"
platform_and_build = f"{platform}/{architecture}/{build_type}"
if bug_id not in bug_map:
bug_infos = {
"total": 1,
Expand Down

0 comments on commit f25985b

Please sign in to comment.