bugbug 0.0.623__tar.gz → 0.0.624__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bugbug-0.0.623/bugbug.egg-info → bugbug-0.0.624}/PKG-INFO +1 -1
- bugbug-0.0.624/VERSION +1 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/__init__.py +1 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/component.py +9 -2
- bugbug-0.0.624/bugbug/models/component_specific.py +136 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/repository.py +5 -2
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/code_review/langchain_tools.py +20 -6
- {bugbug-0.0.623 → bugbug-0.0.624/bugbug.egg-info}/PKG-INFO +1 -1
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug.egg-info/SOURCES.txt +1 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug.egg-info/requires.txt +6 -6
- bugbug-0.0.624/extra-nlp-requirements.txt +1 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/requirements.txt +5 -5
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/retrieve_ci_failures.py +1 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/trainer.py +1 -1
- bugbug-0.0.623/VERSION +0 -1
- bugbug-0.0.623/extra-nlp-requirements.txt +0 -1
- {bugbug-0.0.623 → bugbug-0.0.624}/LICENSE +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/MANIFEST.in +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/README.md +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/bug_features.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/bug_snapshot.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/bugzilla.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/code_search/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/code_search/function_search.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/code_search/mozilla.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/code_search/parser.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/code_search/searchfox_api.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/code_search/searchfox_data.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/code_search/searchfox_download.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/commit_features.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/db.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/feature_cleanup.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/github.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/issue_features.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/issue_snapshot.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/annotateignore.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/bug_nobug.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/defect_enhancement_task.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/defect_enhancement_task_e.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/defect_enhancement_task_h.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/defect_enhancement_task_p.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/defect_enhancement_task_s.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/regression_bug_nobug.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/regressionrange.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/str.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels/tracking.csv +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/labels.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/model.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/model_calibration.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/accessibility.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/annotate_ignore.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/assignee.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/backout.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/browsername.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/bugtype.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/defect.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/defect_enhancement_task.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/devdocneeded.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/fenixcomponent.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/fixtime.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/invalid_compatibility_report.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/needsdiagnosis.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/performancebug.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/qaneeded.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/rcatype.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/regression.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/regressionrange.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/regressor.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/spambug.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/stepstoreproduce.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/testfailure.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/testselect.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/tracking.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/uplift.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/models/worksforme.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/nlp.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/phabricator.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/rust_code_analysis_server.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/swarm.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/test_scheduling.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/test_scheduling_features.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/base.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/build_repair/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/build_repair/agent.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/build_repair/config.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/build_repair/prompts.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/build_repair/scorer.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/build_repair/try_server.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/build_repair/worktree.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/code_review/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/code_review/agent.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/code_review/data_types.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/code_review/database.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/code_review/prompts.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/code_review/protocols.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/code_review/scorer.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/code_review/utils.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/comment_resolution/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/comment_resolution/agent.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/core/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/core/connection.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/core/data_types.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/core/exceptions.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/core/llms.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/core/platforms/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/core/platforms/base.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/core/platforms/bugzilla.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/core/platforms/phabricator.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/patch_summarization/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/patch_summarization/agent.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/patch_summarization/prompts.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/suggestion_filtering/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/suggestion_filtering/agent.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/tools/suggestion_filtering/prompts.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/utils.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug/vectordb.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug.egg-info/dependency_links.txt +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug.egg-info/entry_points.txt +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/bugbug.egg-info/top_level.txt +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/extra-nn-requirements.txt +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/pyproject.toml +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/__init__.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/analyze_training_metrics.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/backout_related_test_regressions.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/bug_classifier.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/bug_retriever.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/build_repair_eval.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/check.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/check_all_metrics.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/comment_level_labeler.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/comment_resolver_runner.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/commit_classifier.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/commit_retriever.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/compatibility_report_classifier.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/gcp_logs_retriever.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/generate_landings_risk_report.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/generate_sheet.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/get_type_labels.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/get_untriaged.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/github_issue_classifier.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/github_issue_retriever.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/inline_comments_data_collection.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/maintenance_effectiveness_indicator.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/microannotate_generator.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/past_bugs_by_unit.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/redundant_failures.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/regressor_finder.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/retrieve_training_metrics.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/review_comments_retriever.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/revision_retriever.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/shadow_scheduler_stats.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/test_scheduling_history_retriever.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/testing_policy_stats.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/scripts/trainer_extract_args.py +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/setup.cfg +0 -0
- {bugbug-0.0.623 → bugbug-0.0.624}/setup.py +0 -0
bugbug-0.0.624/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.624
|
|
@@ -38,6 +38,7 @@ MODELS = {
|
|
|
38
38
|
"uplift": "bugbug.models.uplift.UpliftModel",
|
|
39
39
|
"worksforme": "bugbug.models.worksforme.WorksForMeModel",
|
|
40
40
|
"fenixcomponent": "bugbug.models.fenixcomponent.FenixComponentModel",
|
|
41
|
+
"componentspecific": "bugbug.models.component_specific.ComponentSpecificModel",
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
|
|
@@ -17,6 +17,7 @@ from sklearn.pipeline import Pipeline
|
|
|
17
17
|
from bugbug import bug_features, bugzilla, feature_cleanup, utils
|
|
18
18
|
from bugbug.bugzilla import get_product_component_count
|
|
19
19
|
from bugbug.model import BugModel
|
|
20
|
+
from bugbug.model_calibration import IsotonicRegressionCalibrator
|
|
20
21
|
|
|
21
22
|
logging.basicConfig(level=logging.INFO)
|
|
22
23
|
logger = logging.getLogger(__name__)
|
|
@@ -67,7 +68,7 @@ class ComponentModel(BugModel):
|
|
|
67
68
|
"Firefox for Android": "Firefox for Android::General",
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
def __init__(self, lemmatization=False):
|
|
71
|
+
def __init__(self, calibration=True, lemmatization=False):
|
|
71
72
|
BugModel.__init__(self, lemmatization)
|
|
72
73
|
|
|
73
74
|
self.cross_validation_enabled = False
|
|
@@ -103,6 +104,12 @@ class ComponentModel(BugModel):
|
|
|
103
104
|
]
|
|
104
105
|
)
|
|
105
106
|
|
|
107
|
+
estimator = xgboost.XGBClassifier(n_jobs=utils.get_physical_cpu_count())
|
|
108
|
+
if calibration:
|
|
109
|
+
estimator = IsotonicRegressionCalibrator(estimator)
|
|
110
|
+
# This is a temporary workaround for the error : "Model type not yet supported by TreeExplainer"
|
|
111
|
+
self.calculate_importance = False
|
|
112
|
+
|
|
106
113
|
self.clf = Pipeline(
|
|
107
114
|
[
|
|
108
115
|
(
|
|
@@ -121,7 +128,7 @@ class ComponentModel(BugModel):
|
|
|
121
128
|
),
|
|
122
129
|
(
|
|
123
130
|
"estimator",
|
|
124
|
-
|
|
131
|
+
estimator,
|
|
125
132
|
),
|
|
126
133
|
]
|
|
127
134
|
)
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
4
|
+
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
5
|
+
|
|
6
|
+
import logging
|
|
7
|
+
from datetime import datetime, timezone
|
|
8
|
+
|
|
9
|
+
import dateutil.parser
|
|
10
|
+
import xgboost
|
|
11
|
+
from dateutil.relativedelta import relativedelta
|
|
12
|
+
from sklearn.compose import ColumnTransformer
|
|
13
|
+
from sklearn.feature_extraction import DictVectorizer
|
|
14
|
+
from sklearn.pipeline import Pipeline
|
|
15
|
+
|
|
16
|
+
from bugbug import bug_features, bugzilla, feature_cleanup, utils
|
|
17
|
+
from bugbug.model import BugModel
|
|
18
|
+
|
|
19
|
+
logging.basicConfig(level=logging.INFO)
|
|
20
|
+
logger = logging.getLogger(__name__)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ComponentSpecificModel(BugModel):
|
|
24
|
+
def __init__(self, lemmatization=False, product="Firefox", component="General"):
|
|
25
|
+
BugModel.__init__(self, lemmatization)
|
|
26
|
+
|
|
27
|
+
self.product = product
|
|
28
|
+
self.component = component
|
|
29
|
+
|
|
30
|
+
feature_extractors = [
|
|
31
|
+
bug_features.HasSTR(),
|
|
32
|
+
bug_features.Severity(),
|
|
33
|
+
bug_features.Keywords(),
|
|
34
|
+
bug_features.HasCrashSignature(),
|
|
35
|
+
bug_features.HasURL(),
|
|
36
|
+
bug_features.HasW3CURL(),
|
|
37
|
+
bug_features.HasGithubURL(),
|
|
38
|
+
bug_features.Whiteboard(),
|
|
39
|
+
bug_features.Patches(),
|
|
40
|
+
bug_features.Landings(),
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
cleanup_functions = [
|
|
44
|
+
feature_cleanup.fileref(),
|
|
45
|
+
feature_cleanup.url(),
|
|
46
|
+
feature_cleanup.synonyms(),
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
self.extraction_pipeline = Pipeline(
|
|
50
|
+
[
|
|
51
|
+
(
|
|
52
|
+
"bug_extractor",
|
|
53
|
+
bug_features.BugExtractor(
|
|
54
|
+
feature_extractors, cleanup_functions, rollback=True
|
|
55
|
+
),
|
|
56
|
+
),
|
|
57
|
+
]
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
self.clf = Pipeline(
|
|
61
|
+
[
|
|
62
|
+
(
|
|
63
|
+
"union",
|
|
64
|
+
ColumnTransformer(
|
|
65
|
+
[
|
|
66
|
+
("data", DictVectorizer(), "data"),
|
|
67
|
+
("title", self.text_vectorizer(min_df=0.0001), "title"),
|
|
68
|
+
(
|
|
69
|
+
"comments",
|
|
70
|
+
self.text_vectorizer(min_df=0.0001),
|
|
71
|
+
"comments",
|
|
72
|
+
),
|
|
73
|
+
]
|
|
74
|
+
),
|
|
75
|
+
),
|
|
76
|
+
(
|
|
77
|
+
"estimator",
|
|
78
|
+
xgboost.XGBClassifier(n_jobs=utils.get_physical_cpu_count()),
|
|
79
|
+
),
|
|
80
|
+
]
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
def get_labels(self):
|
|
84
|
+
classes = {}
|
|
85
|
+
|
|
86
|
+
for bug_data in bugzilla.get_bugs():
|
|
87
|
+
if dateutil.parser.parse(bug_data["creation_time"]) < datetime.now(
|
|
88
|
+
timezone.utc
|
|
89
|
+
) - relativedelta(years=3):
|
|
90
|
+
continue
|
|
91
|
+
|
|
92
|
+
# Only bugs that were moved out of General and into a specific component
|
|
93
|
+
# Or the opposite
|
|
94
|
+
|
|
95
|
+
for history in bug_data["history"]:
|
|
96
|
+
to_product_firefox = False
|
|
97
|
+
to_component_general = False
|
|
98
|
+
|
|
99
|
+
from_product_firefox = False
|
|
100
|
+
from_component_general = False
|
|
101
|
+
|
|
102
|
+
for change in history["changes"]:
|
|
103
|
+
if change["field_name"] == "product":
|
|
104
|
+
if change["added"] == self.product:
|
|
105
|
+
to_product_firefox = True
|
|
106
|
+
elif change["removed"] == self.product:
|
|
107
|
+
from_product_firefox = True
|
|
108
|
+
|
|
109
|
+
if change["field_name"] == "component":
|
|
110
|
+
if change["added"] == self.component:
|
|
111
|
+
to_component_general = True
|
|
112
|
+
elif change["removed"] == self.component:
|
|
113
|
+
from_component_general = True
|
|
114
|
+
|
|
115
|
+
if from_product_firefox and from_component_general:
|
|
116
|
+
classes[bug_data["id"]] = 1
|
|
117
|
+
elif to_product_firefox and to_component_general:
|
|
118
|
+
classes[bug_data["id"]] = 0
|
|
119
|
+
|
|
120
|
+
logger.info(
|
|
121
|
+
"%d bugs were moved out of %s::%s",
|
|
122
|
+
sum(label == 1 for label in classes.values()),
|
|
123
|
+
self.product,
|
|
124
|
+
self.component,
|
|
125
|
+
)
|
|
126
|
+
logger.info(
|
|
127
|
+
"%d bugs were moved in %s::%s",
|
|
128
|
+
sum(label == 0 for label in classes.values()),
|
|
129
|
+
self.product,
|
|
130
|
+
self.component,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
return classes, [0, 1]
|
|
134
|
+
|
|
135
|
+
def get_feature_names(self):
|
|
136
|
+
return self.clf.named_steps["union"].get_feature_names_out()
|
|
@@ -1523,10 +1523,13 @@ def pull(repo_dir: str, branch: str, revision: str, update: bool = False) -> Non
|
|
|
1523
1523
|
"""Pull a revision from a branch of a remote repository into a local repository."""
|
|
1524
1524
|
|
|
1525
1525
|
@tenacity.retry(
|
|
1526
|
-
stop=tenacity.stop_after_attempt(
|
|
1526
|
+
stop=tenacity.stop_after_attempt(3),
|
|
1527
|
+
wait=tenacity.wait_exponential(multiplier=1, min=4, max=60),
|
|
1527
1528
|
reraise=True,
|
|
1528
1529
|
after=tenacity.after_log(logger, logging.DEBUG),
|
|
1529
|
-
retry=tenacity.retry_if_exception_type(
|
|
1530
|
+
retry=tenacity.retry_if_exception_type(
|
|
1531
|
+
(subprocess.TimeoutExpired, RuntimeError)
|
|
1532
|
+
),
|
|
1530
1533
|
)
|
|
1531
1534
|
def trigger_pull() -> None:
|
|
1532
1535
|
cmd = _build_hg_cmd(
|
|
@@ -6,13 +6,17 @@
|
|
|
6
6
|
"""LangGraph tools for code review agent."""
|
|
7
7
|
|
|
8
8
|
from dataclasses import dataclass
|
|
9
|
+
from logging import getLogger
|
|
9
10
|
|
|
10
11
|
from langchain.tools import tool
|
|
11
12
|
from langgraph.runtime import get_runtime
|
|
13
|
+
from requests import HTTPError
|
|
12
14
|
|
|
13
15
|
from bugbug.code_search.function_search import FunctionSearch
|
|
14
16
|
from bugbug.tools.core.platforms.base import Patch
|
|
15
17
|
|
|
18
|
+
logger = getLogger(__name__)
|
|
19
|
+
|
|
16
20
|
|
|
17
21
|
@dataclass
|
|
18
22
|
class CodeReviewContext:
|
|
@@ -68,12 +72,22 @@ def create_find_function_definition_tool(function_search: FunctionSearch):
|
|
|
68
72
|
Returns:
|
|
69
73
|
The function definition.
|
|
70
74
|
"""
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
try:
|
|
76
|
+
functions = function_search.get_function_by_name(
|
|
77
|
+
# TODO: We may want to use the patch base commit hash here instead of "tip".
|
|
78
|
+
"tip",
|
|
79
|
+
file_path,
|
|
80
|
+
function_name,
|
|
81
|
+
)
|
|
82
|
+
except HTTPError as e:
|
|
83
|
+
logger.error(
|
|
84
|
+
"HTTP error occurred while searching for the definition of function '%s' which is used in file '%s' at line %d: %s",
|
|
85
|
+
function_name,
|
|
86
|
+
file_path,
|
|
87
|
+
line_number,
|
|
88
|
+
e,
|
|
89
|
+
)
|
|
90
|
+
return "Error occurred while searching for the function definition."
|
|
77
91
|
|
|
78
92
|
if not functions:
|
|
79
93
|
return "Function definition not found."
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
amqp==5.3.1
|
|
2
|
-
async-lru==2.
|
|
2
|
+
async-lru==2.3.0
|
|
3
3
|
beautifulsoup4==4.14.3
|
|
4
|
-
boto3==1.42.
|
|
4
|
+
boto3==1.42.78
|
|
5
5
|
claude-agent-sdk>=0.1.30
|
|
6
6
|
httpx==0.28.1
|
|
7
7
|
imbalanced-learn==0.14.1
|
|
@@ -10,11 +10,11 @@ langchain-classic==1.0.3
|
|
|
10
10
|
langchain-community==0.4.1
|
|
11
11
|
langchain-google-genai==4.2.1
|
|
12
12
|
langchain-mistralai==1.1.2
|
|
13
|
-
langchain-openai==1.1.
|
|
13
|
+
langchain-openai==1.1.12
|
|
14
14
|
langchain==1.2.13
|
|
15
15
|
langgraph==1.1.3
|
|
16
16
|
libmozdata==0.2.12
|
|
17
|
-
llama-cpp-python==0.3.
|
|
17
|
+
llama-cpp-python==0.3.19
|
|
18
18
|
lmdb==1.8.1
|
|
19
19
|
lxml-html-clean==0.4.4
|
|
20
20
|
markdown2==2.5.5
|
|
@@ -33,7 +33,7 @@ python-hglib==2.6.2
|
|
|
33
33
|
qdrant-client==1.15.1
|
|
34
34
|
ratelimit==2.2.1
|
|
35
35
|
requests-html==0.10.0
|
|
36
|
-
requests==2.
|
|
36
|
+
requests==2.33.0
|
|
37
37
|
rs_parsepatch==0.4.6
|
|
38
38
|
scikit-learn==1.7.2
|
|
39
39
|
scipy==1.17.1
|
|
@@ -49,6 +49,6 @@ xgboost==3.2.0
|
|
|
49
49
|
zstandard==0.25.0
|
|
50
50
|
|
|
51
51
|
[nlp]
|
|
52
|
-
spacy==3.8.
|
|
52
|
+
spacy==3.8.13
|
|
53
53
|
|
|
54
54
|
[nn]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
spacy==3.8.13
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
amqp==5.3.1
|
|
2
|
-
async-lru==2.
|
|
2
|
+
async-lru==2.3.0
|
|
3
3
|
beautifulsoup4==4.14.3
|
|
4
|
-
boto3==1.42.
|
|
4
|
+
boto3==1.42.78
|
|
5
5
|
claude-agent-sdk>=0.1.30
|
|
6
6
|
httpx==0.28.1
|
|
7
7
|
imbalanced-learn==0.14.1
|
|
@@ -11,10 +11,10 @@ langchain-classic==1.0.3
|
|
|
11
11
|
langchain-community==0.4.1
|
|
12
12
|
langchain-google-genai==4.2.1
|
|
13
13
|
langchain-mistralai==1.1.2
|
|
14
|
-
langchain-openai==1.1.
|
|
14
|
+
langchain-openai==1.1.12
|
|
15
15
|
langgraph==1.1.3
|
|
16
16
|
libmozdata==0.2.12
|
|
17
|
-
llama-cpp-python==0.3.
|
|
17
|
+
llama-cpp-python==0.3.19
|
|
18
18
|
lmdb==1.8.1
|
|
19
19
|
lxml-html-clean==0.4.4
|
|
20
20
|
markdown2==2.5.5
|
|
@@ -32,7 +32,7 @@ python-dateutil==2.9.0.post0
|
|
|
32
32
|
python-hglib==2.6.2
|
|
33
33
|
qdrant-client==1.15.1
|
|
34
34
|
ratelimit==2.2.1
|
|
35
|
-
requests==2.
|
|
35
|
+
requests==2.33.0
|
|
36
36
|
requests-html==0.10.0
|
|
37
37
|
rs_parsepatch==0.4.6
|
|
38
38
|
scikit-learn==1.7.2
|
bugbug-0.0.623/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.0.623
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
spacy==3.8.11
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|