Open vikramsubramanian opened 6 months ago
get_labels
method in the RegressionRangeModel
class within bugbug/models/regressionrange.py
to include the regresed_by
field in the logic that determines if a bug has a regression range.regresed_by
field is not empty (i.e., it has one or more entries).class RegressionRangeModel(BugModel):
# ... [existing code] ...
def get_labels(self):
classes = {}
for bug_data in bugzilla.get_bugs():
if "regression" not in bug_data["keywords"]:
continue
bug_id = int(bug_data["id"])
# Check if 'regressionwindow-wanted' is in keywords or 'cf_has_regression_range' is 'yes'
# or 'regresed_by' field is not empty.
if ("regressionwindow-wanted" in bug_data["keywords"] or
bug_data.get("cf_has_regression_range") == "yes" or
bug_data.get("regresed_by")):
classes[bug_id] = 1
else:
classes[bug_id] = 0
# ... [existing logging code] ...
return classes, [0, 1]
regresed_by
field is being retrieved correctly from the Bugzilla data source and that it is a list or other iterable that can be truthy when not empty.determine_regression_range
method since it is not present in the provided code snippets.
Currently, we use the
regressionwindow-wanted
keyword and the value of thecf_has_regression_range
field to determine whether there is a regression range:We should also use the value of the
regresed_by
field. If there is a value in the field, we should consider it as "has regression range".)