diff --git a/bugbot/crash/analyzer.py b/bugbot/crash/analyzer.py index 0cb8a124..5c36e248 100644 --- a/bugbot/crash/analyzer.py +++ b/bugbot/crash/analyzer.py @@ -45,6 +45,10 @@ ALLOCATOR_RANGES_32_BIT = ( (addr - offset, addr + offset) for addr, offset in ALLOCATOR_ADDRESSES_32_BIT ) +# NOTE: If you make changes that affect the output of the analysis, you should +# increment this number. This is needed in the experimental phase only. +EXPERIMENT_VERSION = 3 + def is_near_null_address(str_address) -> bool: """Check if the address is near null. @@ -879,6 +883,13 @@ class SignaturesDataFetcher: ).wait() # TODO: remove the call to DevBugzilla after moving to production + for params in params_list: + # Excluded only filed bugs with the latest version. This will + # re-generate the bugs after bumping the version. + n = int(utils.get_last_field_num(params)) + params[f"f{n}"] = "status_whiteboard" + params[f"o{n}"] = "substring" + params[f"v{n}"] = f"[bugbot-crash-v{EXPERIMENT_VERSION}]" DevBugzilla( timeout=timeout, queries=[ diff --git a/bugbot/rules/file_crash_bug.py b/bugbot/rules/file_crash_bug.py index 32b1c25a..d197c03c 100644 --- a/bugbot/rules/file_crash_bug.py +++ b/bugbot/rules/file_crash_bug.py @@ -12,16 +12,18 @@ from bugbot import logger, utils from bugbot.bug.analyzer import BugAnalyzer from bugbot.bzcleaner import BzCleaner from bugbot.crash import socorro_util -from bugbot.crash.analyzer import DevBugzilla, SignatureAnalyzer, SignaturesDataFetcher +from bugbot.crash.analyzer import ( + EXPERIMENT_VERSION, + DevBugzilla, + SignatureAnalyzer, + SignaturesDataFetcher, +) from bugbot.user_activity import UserActivity, UserStatus class FileCrashBug(BzCleaner): """File bugs for new actionable crashes.""" - # NOTE: If you make changes that affect the output of the rule, you should - # increment this number. This is needed in the experimental phase only. - VERSION = 2 MAX_BUG_TITLE_LENGTH = 255 FILE_ON_BUGZILLA_DEV = True @@ -138,7 +140,7 @@ class FileCrashBug(BzCleaner): "blocks": "bugbot-auto-crash", "type": "defect", "keywords": ["crash"], - "status_whiteboard": f"[bugbot-crash-v{self.VERSION}]", + "status_whiteboard": f"[bugbot-crash-v{EXPERIMENT_VERSION}]", "summary": title, "product": signature.crash_component.product, "component": signature.crash_component.name, diff --git a/templates/file_crash_bug_description.md.jinja b/templates/file_crash_bug_description.md.jinja index a943c634..98867b15 100644 --- a/templates/file_crash_bug_description.md.jinja +++ b/templates/file_crash_bug_description.md.jinja @@ -30,7 +30,7 @@ Top {{ frames|length }} frames of crashing thread: By querying {{ signature_details_channel }} crashes reported within the last {{ signature_details_delta }}, here are some insights about the signature: -- **First crash report:** signature.first_crash_date +- **First crash report:** {{ signature.first_crash_date }} - **Crash kind:** {{ "Plugin Crash" if signature.is_plugin_crash else "Browser Crash" }} - **Is startup crash:** {{ "Yes - " if signature.is_startup_related_crash else "No" }} {%- if signature.is_startup_crash -%}