Repository: mozilla/bugbug

Issue:
Add number of blocked bugs as a feature



Discussion:
Hi Marco! May I clarify whether I understand right: should I add a new class in `bug_features.py` that will have a `__call__` method returning the size of `blocks` array that is in Bug info (https://bmo.readthedocs.io/en/latest/api/core/v1/bug.html#get-bug)?  
Correct!

Resolving patch:
diff --git a/bugbug/bug_features.py b/bugbug/bug_features.py
--- a/bugbug/bug_features.py
+++ b/bugbug/bug_features.py
@@ -173,6 +173,11 @@ def __call__(self, bug):
         return sum((commit['types'] for commit in bug['commits']), [])
 
 
+class blocked_bugs_number(object):
+    def __call__(self, bug):
+        return len(bug['blocks'])
+
+
 class priority(object):
     def __call__(self, bug):
         return bug['priority']
diff --git a/bugbug/models/bug.py b/bugbug/models/bug.py
--- a/bugbug/models/bug.py
+++ b/bugbug/models/bug.py
@@ -33,6 +33,7 @@ def __init__(self, lemmatization=False):
             bug_features.patches(),
             bug_features.landings(),
             bug_features.title(),
+            bug_features.blocked_bugs_number(),
         ]
 
         cleanup_functions = [


Test patch:
diff --git a/tests/fixtures/bug_features/blocked_bugs_number.json b/tests/fixtures/bug_features/blocked_bugs_number.json
new file mode 100644
--- /dev/null
+++ b/tests/fixtures/bug_features/blocked_bugs_number.json
@@ -0,0 +1,2 @@
+{"blocks": [548311, 1354004], "cf_status_firefox61": "wontfix", "cf_tracking_geckoview64": "---", "cf_status_firefox63": "wontfix", "is_cc_accessible": true, "cf_status_thunderbird_esr52": "---", "keywords": ["nightly-community", "regression"], "cf_qa_whiteboard": "", "url": "data:text/html;charset=UTF-8,<input style=\"width:500px\" value=\"%E5%88%9D%E9%9F%B3%E3%83%9F%E3%82%AF%E3%81%8C%E3%82%AA%E3%83%AA%E3%82%B8%E3%83%8A%E3%83%AB%E3%82%92%E6%AD%8C%E3%81%A3%E3%81%A6%E3%81%8F%E3%82%8C%E3%81%9F%E3%82%88%E3%80%8C%E3%83%96%E3%83%A9%E3%83%83%E3%82%AF%E2%98%85%E3%83%AD%E3%83%83%E3%82%AF%E3%82%B7%E3%83%A5%E3%83%BC%E3%82%BF%E3%83%BC%E3%80%8D\">", "qa_contact": "Virtual@teknik.io", "cf_tracking_firefox64": "---", "cf_status_geckoview65": "---", "cf_rank": null, "cf_status_firefox59": "wontfix", "cf_status_firefox65": "fix-optional", "cf_fx_iteration": "---", "cf_tracking_firefox_relnote": "---", "cf_tracking_firefox65": "---", "cf_last_resolved": null, "cf_tracking_firefox66": "---", "cf_fx_points": "---", "cf_status_firefox58": "wontfix", "cc_detail": [{"email": "alice0775@gmail.com", "real_name": "Alice0775 White", "name": "alice0775@gmail.com", "nick": "alice0775", "id": 293623}, {"email": "jcristau@mozilla.com", "real_name": "Julien Cristau [:jcristau] [PTO 12/21 - 1/6]", "name": "jcristau@mozilla.com", "nick": "jcristau", "id": 580382}, {"email": "jfkthame@gmail.com", "real_name": "Jonathan Kew (:jfkthame)", "name": "jfkthame@gmail.com", "nick": "jfkthame", "id": 329583}, {"email": "ksheer.mehra@gmail.com", "real_name": "Ksheer S Mehra", "name": "ksheer.mehra@gmail.com", "nick": "ksheer.mehra", "id": 603514}, {"email": "masayuki@d-toybox.com", "real_name": "Masayuki Nakano [:masayuki] (JST, +0900)(Away from Bugmail Dec 27-Jan 3))", "name": "masayuki@d-toybox.com", "nick": "masayuki", "id": 34283}, {"email": "VYV03354@nifty.ne.jp", "real_name": "Masatoshi Kimura [:emk]", "name": "VYV03354@nifty.ne.jp", "nick": "emk", "id": 5842}, {"email": "xidorn+moz@upsuper.org", "real_name": "Xidorn Quan [:xidorn] UTC+11", "name": "xidorn+moz@upsuper.org", "nick": "xidorn", "id": 373403}], "summary": "Selected text with some Unicode characters can move up and down on pointer/mouse cursor movement", "cf_has_str": "yes", "cf_user_story": "", "platform": "x86_64", "cf_status_firefox_esr60": "wontfix", "votes": 2, "cf_status_firefox62": "wontfix", "cf_status_firefox55": "disabled", "version": "55 Branch", "cf_status_firefox54": "unaffected", "cf_status_firefox60": "wontfix", "mentors_detail": [], "cf_tracking_thunderbird_esr52": "---", "is_creator_accessible": true, "is_confirmed": true, "priority": "P3", "cf_status_thunderbird_esr60": "---", "assigned_to_detail": {"email": "nobody@mozilla.org", "real_name": "Nobody; OK to take it and work on it", "name": "nobody@mozilla.org", "nick": "nobody", "id": 1}, "creator": "Virtual@teknik.io", "last_change_time": "2018-12-20T23:02:10Z", "cf_tracking_firefox55": "-", "comment_count": 10, "creator_detail": {"email": "Virtual@teknik.io", "real_name": "Virtual_ManPL [:Virtual] - (please needinfo? me - so I will see your comment/reply/question/etc.)", "name": "Virtual@teknik.io", "nick": "Virtual", "id": 342842}, "cc": ["alice0775@gmail.com", "jcristau@mozilla.com", "jfkthame@gmail.com", "ksheer.mehra@gmail.com", "masayuki@d-toybox.com", "VYV03354@nifty.ne.jp", "xidorn+moz@upsuper.org"], "duplicates": [1406148], "cf_tracking_thunderbird_esr60": "---", "assigned_to": "nobody@mozilla.org", "groups": [], "see_also": [], "id": 1378065, "whiteboard": "", "creation_time": "2017-07-04T07:49:55Z", "depends_on": [], "cf_tracking_geckoview65": "---", "cf_status_firefox56": "disabled", "mentors": [], "dupe_of": null, "cf_status_firefox66": "fix-optional", "qa_contact_detail": {"email": "Virtual@teknik.io", "real_name": "Virtual_ManPL [:Virtual] - (please needinfo? me - so I will see your comment/reply/question/etc.)", "name": "Virtual@teknik.io", "nick": "Virtual", "id": 342842}, "resolution": "", "classification": "Components", "alias": null, "cf_has_regression_range": "yes", "op_sys": "Windows 7", "status": "NEW", "cf_crash_signature": "", "is_open": true, "cf_tracking_firefox_esr60": "---", "severity": "major", "flags": [], "cf_status_firefox64": "fix-optional", "cf_status_firefox57": "wontfix", "component": "Layout: Form Controls", "cf_status_geckoview64": "---", "target_milestone": "---", "product": "Core", "cf_tracking_firefox56": "-", "cf_platform_rel": "---", "history": [{"when": "2017-07-04T07:50:16Z", "who": "Virtual@teknik.io", "changes": [{"removed": "---", "added": "yes", "field_name": "cf_has_str"}]}, {"when": "2017-07-04T07:51:10Z", "who": "kohei.yoshino@gmail.com", "changes": [{"removed": "Untriaged", "added": "Selection", "field_name": "component"}, {"removed": "Firefox", "added": "Core", "field_name": "product"}]}, {"when": "2017-07-04T08:31:14Z", "who": "alice0775@gmail.com", "changes": [{"removed": "", "added": "data:text/html;charset=UTF-8,<input style=\"width:500px\" value=\"%E5%88%9D%E9%9F%B3%E3%83%9F%E3%82%AF%E3%81%8C%E3%82%AA%E3%83%AA%E3%82%B8%E3%83%8A%E3%83%AB%E3%82%92%E6%AD%8C%E3%81%A3%E3%81%A6%E3%81%8F%E3%82%8C%E3%81%9F%E3%82%88%E3%80%8C%E3%83%96%E3%83%A9%E3%83%83%E3%82%AF%E2%98%85%E3%83%AD%E3%83%83%E3%82%AF%E3%82%B7%E3%83%A5%E3%83%BC%E3%82%BF%E3%83%BC%E3%80%8D\">", "field_name": "url"}, {"removed": "", "added": "alice0775@yahoo.co.jp", "field_name": "cc"}]}, {"when": "2017-07-04T08:39:03Z", "who": "alice0775@gmail.com", "changes": [{"removed": "regressionwindow-wanted", "added": "", "field_name": "keywords"}, {"removed": "", "added": "masayuki@d-toybox.com", "field_name": "cc"}, {"removed": "", "added": "548311", "field_name": "blocks"}, {"removed": "", "added": "needinfo?(masayuki@d-toybox.com)", "field_name": "flagtypes.name"}]}, {"when": "2017-07-04T08:40:16Z", "who": "alice0775@gmail.com", "changes": [{"removed": "Selection", "added": "Layout: Form Controls", "field_name": "component"}]}, {"when": "2017-07-04T09:00:21Z", "who": "xidorn+moz@upsuper.org", "changes": [{"removed": "", "added": "xidorn+moz@upsuper.org", "field_name": "cc"}]}, {"when": "2017-07-04T10:56:49Z", "who": "masayuki@d-toybox.com", "changes": [{"removed": "", "added": "jfkthame@gmail.com", "field_name": "cc"}, {"removed": "needinfo?(masayuki@d-toybox.com)", "added": "", "field_name": "flagtypes.name"}]}, {"when": "2017-07-04T11:39:13Z", "who": "VYV03354@nifty.ne.jp", "changes": [{"removed": "", "added": "VYV03354@nifty.ne.jp", "field_name": "cc"}]}, {"when": "2017-07-04T16:05:40Z", "who": "jcristau@mozilla.com", "changes": [{"removed": "", "added": "jcristau@mozilla.com", "field_name": "cc"}, {"removed": "?", "added": "-", "field_name": "cf_tracking_firefox55"}, {"removed": "affected", "added": "disabled", "field_name": "cf_status_firefox55"}]}, {"when": "2017-07-05T07:17:06Z", "who": "Virtual@teknik.io", "changes": [{"removed": "---", "added": "yes", "field_name": "cf_has_regression_range"}]}, {"when": "2017-07-06T20:46:25Z", "who": "lhenry@mozilla.com", "changes": [{"removed": "?", "added": "-", "field_name": "cf_tracking_firefox56"}]}, {"when": "2017-07-27T15:30:34Z", "who": "Virtual@teknik.io", "changes": [{"removed": "", "added": "Virtual@MsgSafe.io", "field_name": "qa_contact"}]}, {"when": "2017-08-02T19:32:31Z", "who": "Virtual@teknik.io", "changes": [{"removed": "---", "added": "affected", "field_name": "cf_status_firefox57"}]}, {"when": "2017-08-09T14:10:41Z", "who": "jmathies@mozilla.com", "changes": [{"removed": "affected", "added": "fix-optional", "field_name": "cf_status_firefox56"}, {"removed": "affected", "added": "---", "field_name": "cf_status_firefox57"}]}, {"when": "2017-08-09T14:37:20Z", "who": "Virtual@teknik.io", "changes": [{"removed": "---", "added": "fix-optional", "field_name": "cf_status_firefox57"}]}, {"when": "2017-08-21T06:19:59Z", "who": "masayuki@d-toybox.com", "changes": [{"removed": "", "added": "https://bugzilla.mozilla.org/show_bug.cgi?id=1354004", "field_name": "see_also"}]}, {"when": "2017-09-08T22:25:47Z", "who": "bugs@junglecode.net", "changes": [{"removed": "--", "added": "P3", "field_name": "priority"}]}, {"when": "2017-09-22T10:37:25Z", "who": "Virtual@teknik.io", "changes": [{"removed": "https://bugzilla.mozilla.org/show_bug.cgi?id=1354004", "added": "", "field_name": "see_also"}, {"removed": "", "added": "1354004", "field_name": "blocks"}, {"removed": "fix-optional", "added": "disabled", "field_name": "cf_status_firefox56"}, {"removed": "fix-optional", "added": "affected", "field_name": "cf_status_firefox57"}, {"removed": "---", "added": "affected", "field_name": "cf_status_firefox58"}]}, {"when": "2017-10-05T19:46:47Z", "who": "alice0775@gmail.com", "changes": [{"removed": "", "added": "https://bugzilla.mozilla.org/show_bug.cgi?id=1406148", "field_name": "see_also"}]}, {"when": "2017-11-13T14:29:45Z", "who": "jmathies@mozilla.com", "changes": [{"removed": "affected", "added": "wontfix", "field_name": "cf_status_firefox57"}, {"removed": "affected", "added": "fix-optional", "field_name": "cf_status_firefox58"}]}, {"when": "2017-11-14T13:03:23Z", "who": "Virtual@teknik.io", "changes": [{"removed": "---", "added": "affected", "field_name": "cf_status_firefox59"}]}, {"when": "2017-11-14T13:04:32Z", "who": "Virtual@teknik.io", "changes": [{"removed": "https://bugzilla.mozilla.org/show_bug.cgi?id=1406148", "added": "", "field_name": "see_also"}]}, {"when": "2017-11-14T13:04:33Z", "who": "Virtual@teknik.io", "changes": [{"removed": "", "added": "ksheer.mehra@gmail.com", "field_name": "cc"}]}, {"when": "2018-01-23T13:06:34Z", "who": "Virtual@teknik.io", "changes": [{"removed": "---", "added": "affected", "field_name": "cf_status_firefox60"}]}, {"when": "2018-03-12T19:48:46Z", "who": "Virtual@teknik.io", "changes": [{"removed": "---", "added": "affected", "field_name": "cf_status_firefox61"}]}, {"when": "2018-03-28T18:01:25Z", "who": "ryanvm@gmail.com", "changes": [{"removed": "fix-optional", "added": "wontfix", "field_name": "cf_status_firefox58"}, {"removed": "affected", "added": "wontfix", "field_name": "cf_status_firefox59"}, {"removed": "affected", "added": "fix-optional", "field_name": "cf_status_firefox60"}, {"removed": "affected", "added": "fix-optional", "field_name": "cf_status_firefox61"}]}, {"when": "2018-05-08T18:08:38Z", "who": "Virtual@teknik.io", "changes": [{"removed": "---", "added": "affected", "field_name": "cf_status_firefox62"}]}, {"when": "2018-07-20T14:32:54Z", "who": "jcristau@mozilla.com", "changes": [{"removed": "fix-optional", "added": "wontfix", "field_name": "cf_status_firefox60"}, {"removed": "fix-optional", "added": "wontfix", "field_name": "cf_status_firefox61"}]}, {"when": "2018-09-07T19:29:21Z", "who": "ryanvm@gmail.com", "changes": [{"removed": "---", "added": "wontfix", "field_name": "cf_status_firefox_esr60"}, {"removed": "affected", "added": "wontfix", "field_name": "cf_status_firefox62"}, {"removed": "---", "added": "wontfix", "field_name": "cf_status_firefox63"}, {"removed": "---", "added": "fix-optional", "field_name": "cf_status_firefox64"}]}, {"when": "2018-10-28T11:28:24Z", "who": "Virtual@teknik.io", "changes": [{"removed": "---", "added": "affected", "field_name": "cf_status_firefox65"}]}, {"when": "2018-12-20T23:01:37Z", "who": "lhenry@mozilla.com", "changes": [{"removed": "affected", "added": "fix-optional", "field_name": "cf_status_firefox65"}, {"removed": "---", "added": "fix-optional", "field_name": "cf_status_firefox66"}]}], "comments": [{"text": "Created attachment 8883216\nscreencast.mp4\n\n[Tracking Requested - why for this release]: Regression\n\nSTR:\n1. Paste this text\n> \u521d\u97f3\u30df\u30af\u304c\u30aa\u30ea\u30b8\u30ca\u30eb\u3092\u6b4c\u3063\u3066\u304f\u308c\u305f\u3088\u300c\u30d6\u30e9\u30c3\u30af\u2605\u30ed\u30c3\u30af\u30b7\u30e5\u30fc\u30bf\u30fc\u300d\ninto address bar, search bar, find bar, bookmark doorhanger/panelUI, Library, etc. and even on website pages, it happens on all 1 line areas where you can paste some test\n2. Select some part of the pasted text\n3. While keeping selection, move pointer/mouse cursor up and down few times\nand see that text also going up and down", "id": 12445624, "creation_time": "2017-07-04T07:49:55Z", "author": "Virtual@teknik.io"}, {"text": "I can also reproduce the problem on Nightly56.0a1 Windows10.", "id": 12445698, "creation_time": "2017-07-04T08:31:14Z", "author": "alice0775@gmail.com"}, {"text": "Regression window:\nhttps://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5533bb0145694e5d8574909e4de66847ab84be8c&tochange=b7a6ec5eb1e1ff88d9ebc278de9ea3cd761f763f\n\nRegressed by: b7a6ec5eb1e1\tMasayuki Nakano \u2014 Bug 548311 Change Japanese default fonts only on early Beta and Nightly r=emk,jfkthame,m_kato", "id": 12445721, "creation_time": "2017-07-04T08:39:03Z", "author": "alice0775@gmail.com"}, {"text": "Looks like it's line-height issue of <input> element because Meiryo's default line-height is higher than other fonts'.\n\nIf we'd increase height of <input> element, it could cause breaking some websites' layout. Also, we could use |overflow-y: hidden;| for the anonymous <div> in <input> element but even if we could do that, it's really risky for other languages. E.g., I worry about Devanagari (IIRC, some South-Asian characters require higher space than usual).\n\nOther possible scenario is, we hack metrics of Meiryo. As far as I know, the computation of normal line-height is different from Blink. Our line-height is higher than them and it causes unexpected overflow. (Although I saw it only in a website and I reported that to the company directly.)\n\nFortunately, underscore is not hidden by this bug. So, not so important issue. Although I don't like this kind of bug.", "id": 12445955, "creation_time": "2017-07-04T10:56:49Z", "author": "masayuki@d-toybox.com"}, {"text": "FWIW, it seems to me that Meiryo is constantly 1px shorter in Blink than in Gecko regardless of font-size.", "id": 12445969, "creation_time": "2017-07-04T11:18:11Z", "author": "xidorn+moz@upsuper.org"}, {"text": "Marking 55 disabled, as this font is only used in nightly and early beta (the next beta build this week will have that unset)", "id": 12446453, "creation_time": "2017-07-04T16:05:40Z", "author": "jcristau@mozilla.com"}, {"text": "Looks like Masayuki is aware of the regression and considers it minor. \nSo I don't think release management needs to track this bug. It would be nice to fix it since we have STR, though.", "id": 12452717, "creation_time": "2017-07-06T20:46:25Z", "author": "lhenry@mozilla.com"}, {"text": "*** Bug 1406148 has been marked as a duplicate of this bug. ***", "id": 12842189, "creation_time": "2017-11-14T13:04:33Z", "author": "Virtual@teknik.io"}, {"text": "Long standing regression,", "id": 13826317, "creation_time": "2018-12-20T23:01:37Z", "author": "lhenry@mozilla.com"}, {"text": "I meant to say, we should stop triaging this and leave it to the component owner.", "id": 13826319, "creation_time": "2018-12-20T23:02:10Z", "author": "lhenry@mozilla.com"}], "attachments": [{"content_type": "video/mp4", "creator": "Virtual@teknik.io", "flags": [], "is_patch": 0, "creation_time": "2017-07-04T07:49:55Z", "id": 8883216, "is_obsolete": 0}]}
+{"blocks": [], "cf_tracking_geckoview64": "---", "is_cc_accessible": true, "cf_status_thunderbird_esr52": "---", "keywords": ["bulk-close-intermittents", "crash", "intermittent-failure"], "cf_qa_whiteboard": "", "url": "", "qa_contact": "", "cf_tracking_firefox64": "---", "cf_status_geckoview65": "---", "cf_rank": null, "cf_status_firefox65": "---", "cf_fx_iteration": "---", "cf_tracking_firefox_relnote": "---", "cf_tracking_firefox65": "---", "cf_last_resolved": "2017-09-13T20:33:52Z", "cf_tracking_firefox66": "---", "cf_fx_points": "---", "cc_detail": [{"email": "hskupin@gmail.com", "real_name": "Henrik Skupin (:whimboo)", "name": "hskupin@gmail.com", "nick": "whimboo", "id": 76551}, {"email": "kanru@kanru.info", "real_name": "Kan-Ru Chen [:kanru] (UTC+8)", "name": "kanru@kanru.info", "nick": "kanru", "id": 428625}], "summary": "Intermittent marionette.py | application crashed [@ RtlpScanEnvironment + 0x1dc | mozilla::detail::MutexImpl::lock()]", "cf_has_str": "---", "cf_user_story": "", "platform": "Unspecified", "cf_status_firefox_esr60": "---", "votes": 0, "version": "unspecified", "mentors_detail": [], "cf_tracking_thunderbird_esr52": "---", "is_creator_accessible": true, "is_confirmed": true, "priority": "--", "cf_status_thunderbird_esr60": "---", "assigned_to_detail": {"email": "nobody@mozilla.org", "real_name": "Nobody; OK to take it and work on it", "name": "nobody@mozilla.org", "nick": "nobody", "id": 1}, "creator": "intermittent-bug-filer@mozilla.bugs", "last_change_time": "2017-09-13T20:33:52Z", "creator_detail": {"email": "intermittent-bug-filer@mozilla.bugs", "real_name": "Treeherder Bug Filer", "name": "intermittent-bug-filer@mozilla.bugs", "nick": "intermittent-bug-filer", "id": 573381}, "comment_count": 4, "cc": ["hskupin@gmail.com", "kanru@kanru.info"], "duplicates": [], "cf_tracking_thunderbird_esr60": "---", "assigned_to": "nobody@mozilla.org", "groups": [], "see_also": ["https://bugzilla.mozilla.org/show_bug.cgi?id=1375407"], "id": 1378030, "whiteboard": "", "creation_time": "2017-07-04T03:25:50Z", "depends_on": [], "cf_tracking_geckoview65": "---", "mentors": [], "dupe_of": null, "cf_status_firefox66": "---", "resolution": "INCOMPLETE", "classification": "Components", "alias": null, "cf_has_regression_range": "---", "op_sys": "Unspecified", "status": "RESOLVED", "cf_crash_signature": "[@ RtlpScanEnvironment + 0x1dc | mozilla::detail::MutexImpl::lock()]", "is_open": false, "severity": "critical", "cf_tracking_firefox_esr60": "---", "flags": [], "cf_status_firefox64": "---", "component": "IPC", "cf_status_geckoview64": "---", "target_milestone": "---", "product": "Core", "cf_platform_rel": "---", "history": [{"when": "2017-07-04T03:28:14Z", "who": "hskupin@gmail.com", "changes": [{"removed": "", "added": "hskupin@gmail.com, kchen@mozilla.com", "field_name": "cc"}, {"removed": "Marionette", "added": "IPC", "field_name": "component"}, {"removed": "Version 3", "added": "unspecified", "field_name": "version"}, {"removed": "", "added": "https://bugzilla.mozilla.org/show_bug.cgi?id=1375407", "field_name": "see_also"}, {"removed": "Testing", "added": "Core", "field_name": "product"}]}, {"when": "2017-07-04T03:30:18Z", "who": "hskupin@gmail.com", "changes": [{"removed": "[@ RtlpScanEnvironment + 0x1dc]", "added": "[@ RtlpScanEnvironment + 0x1dc | mozilla::detail::MutexImpl::lock()]", "field_name": "cf_crash_signature"}, {"removed": "Intermittent marionette.py | application crashed [@ RtlpScanEnvironment + 0x1dc]", "added": "Intermittent marionette.py | application crashed [@ RtlpScanEnvironment + 0x1dc | mozilla::detail::MutexImpl::lock()]", "field_name": "summary"}]}, {"when": "2017-09-13T20:33:52Z", "who": "bug-husbandry-bot@mozilla.bugs", "changes": [{"removed": "", "added": "bulk-close-intermittents", "field_name": "keywords"}, {"removed": "NEW", "added": "RESOLVED", "field_name": "status"}, {"removed": "", "added": "INCOMPLETE", "field_name": "resolution"}, {"removed": "", "added": "2017-09-13T20:33:52Z", "field_name": "cf_last_resolved"}]}], "comments": [{"text": "Filed by: hskupin [at] mozilla.com\n\nhttps://treeherder.mozilla.org/logviewer.html#?job_id=111483178&repo=mozilla-central\n\nhttps://firefox-ui-tests.s3.amazonaws.com/3aee19d1-b8e9-46ef-b519-408c5799d71a/log_info.log", "id": 12445312, "creation_time": "2017-07-04T03:25:50Z", "author": "intermittent-bug-filer@mozilla.bugs"}, {"text": "04:55:18     INFO - Crash reason:  EXCEPTION_BREAKPOINT\n04:55:18     INFO - Crash address: 0x779cc27c\n04:55:18     INFO - Process uptime: 37 seconds\n\n04:55:18     INFO - Thread 0 (crashed)\n04:55:18     INFO -  0  ntdll.dll!RtlpScanEnvironment + 0x1dc\n04:55:18     INFO -     eip = 0x779cc27c   esp = 0x0036f278   ebp = 0x0036f2e8   ebx = 0x000003e4\n04:55:18     INFO -     esi = 0x00c96850   edi = 0x00000000   eax = 0x00000001   ecx = 0x00000000\n04:55:18     INFO -     edx = 0x00000000   efl = 0x00200206\n04:55:18     INFO -     Found by: given as instruction pointer in context\n04:55:18     INFO -  1  ntdll.dll + 0x1dc3b\n04:55:18     INFO -     eip = 0x779adc3b   esp = 0x0036f2f0   ebp = 0x0036f310\n04:55:18     INFO -     Found by: previous frame's frame pointer\n04:55:18     INFO -  2  ntdll.dll!RtlpTpWaitCallback + 0x25\n04:55:18     INFO -     eip = 0x779adc65   esp = 0x0036f318   ebp = 0x0036f318\n04:55:18     INFO -     Found by: previous frame's frame pointer\n04:55:18     INFO -  3  mozglue.dll!mozilla::detail::MutexImpl::lock() [Mutex_windows.cpp:283debe8155a : 42 + 0x7]\n04:55:18     INFO -     eip = 0x73839b97   esp = 0x0036f320   ebp = 0x0036f334\n04:55:18     INFO -     Found by: previous frame's frame pointer\n04:55:18     INFO -  4  xul.dll!mozilla::ipc::MessageChannel::MessageTask::Run() [MessageChannel.cpp:283debe8155a : 1911 + 0xe]\n04:55:18     INFO -     eip = 0x6fc7e9d0   esp = 0x0036f328   ebp = 0x0036f334\n04:55:18     INFO -     Found by: call frame info\n04:55:18     INFO -  5  xul.dll!nsThread::ProcessNextEvent(bool,bool *) [nsThread.cpp:283debe8155a : 1422 + 0xa]\n04:55:18     INFO -     eip = 0x6fe123ca   esp = 0x0036f33c   ebp = 0x0036f434\n04:55:18     INFO -     Found by: call frame info\n04:55:18     INFO -  6  xul.dll!NS_ProcessNextEvent(nsIThread *,bool) [nsThreadUtils.cpp:283debe8155a : 489 + 0xb]\n04:55:18     INFO -     eip = 0x6fd5237a   esp = 0x0036f43c   ebp = 0x0036f450\n04:55:18     INFO -     Found by: call frame info\n04:55:18     INFO -  7  xul.dll!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate *) [MessagePump.cpp:283debe8155a : 125 + 0x9]\n04:55:18     INFO -     eip = 0x6fe118bb   esp = 0x0036f458   ebp = 0x0036f478\n04:55:18     INFO -     Found by: call frame info\n\nLooks similar to bug 1375407.", "id": 12445315, "creation_time": "2017-07-04T03:28:14Z", "author": "hskupin@gmail.com"}, {"text": "1 failures in 656 pushes (0.002 failures/push) were associated with this bug in the last 7 days.   \n\nRepository breakdown:\n* mozilla-central: 1\n\nPlatform breakdown:\n* windows8-64: 1\n\nFor more details, see:\nhttps://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1378030&startday=2017-07-03&endday=2017-07-09&tree=all", "id": 12458004, "creation_time": "2017-07-10T01:16:42Z", "author": "orangefactor@bots.tld"}, {"text": "2 failures in 822 pushes (0.002 failures/push) were associated with this bug in the last 7 days.   \n\nRepository breakdown:\n* mozilla-central: 2\n\nPlatform breakdown:\n* windows8-64: 2\n\nFor more details, see:\nhttps://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1378030&startday=2017-07-17&endday=2017-07-23&tree=all", "id": 12497562, "creation_time": "2017-07-24T01:03:50Z", "author": "orangefactor@bots.tld"}], "attachments": []}
diff --git a/tests/test_bug_features.py b/tests/test_bug_features.py
--- a/tests/test_bug_features.py
+++ b/tests/test_bug_features.py
@@ -6,6 +6,7 @@
 import json
 import os
 
+from bugbug.bug_features import blocked_bugs_number
 from bugbug.bug_features import component
 from bugbug.bug_features import has_crash_signature
 from bugbug.bug_features import has_github_url
@@ -97,3 +98,7 @@ def test_component():
 
 def test_is_mozillian():
     read('is_mozillian.json', is_mozillian, [False, True, True])
+
+
+def test_blocked_bugs_number():
+    read('blocked_bugs_number.json', blocked_bugs_number, [2, 0])