bugbug 0.0.657__tar.gz → 0.0.659__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.
Files changed (191) hide show
  1. {bugbug-0.0.657 → bugbug-0.0.659}/PKG-INFO +2 -2
  2. bugbug-0.0.659/VERSION +1 -0
  3. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/regressor.py +1 -0
  4. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/testconfigdimensions.py +2 -4
  5. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/testconfigselect.py +57 -46
  6. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/repository.py +2 -8
  7. bugbug-0.0.659/bugbug/sklearn_utils.py +59 -0
  8. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/test_scheduling.py +63 -34
  9. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/utils.py +2 -55
  10. {bugbug-0.0.657 → bugbug-0.0.659}/pyproject.toml +1 -1
  11. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/integration_test.sh +1 -1
  12. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/shadow_scheduler_stats.py +298 -29
  13. bugbug-0.0.657/VERSION +0 -1
  14. {bugbug-0.0.657 → bugbug-0.0.659}/.gitignore +0 -0
  15. {bugbug-0.0.657 → bugbug-0.0.659}/LICENSE +0 -0
  16. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/__init__.py +0 -0
  17. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/bug_features.py +0 -0
  18. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/bug_snapshot.py +0 -0
  19. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/bugzilla.py +0 -0
  20. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/build_platforms.py +0 -0
  21. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/code_search/__init__.py +0 -0
  22. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/code_search/function_search.py +0 -0
  23. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/code_search/mozilla.py +0 -0
  24. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/code_search/parser.py +0 -0
  25. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/code_search/searchfox_api.py +0 -0
  26. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/code_search/searchfox_data.py +0 -0
  27. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/code_search/searchfox_download.py +0 -0
  28. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/commit_features.py +0 -0
  29. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/db.py +0 -0
  30. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/feature_cleanup.py +0 -0
  31. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/github.py +0 -0
  32. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/issue_features.py +0 -0
  33. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/issue_snapshot.py +0 -0
  34. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/annotateignore.csv +0 -0
  35. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/bug_nobug.csv +0 -0
  36. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/defect_enhancement_task.csv +0 -0
  37. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/defect_enhancement_task_e.csv +0 -0
  38. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/defect_enhancement_task_h.csv +0 -0
  39. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/defect_enhancement_task_p.csv +0 -0
  40. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/defect_enhancement_task_s.csv +0 -0
  41. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/regression_bug_nobug.csv +0 -0
  42. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/regressionrange.csv +0 -0
  43. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/str.csv +0 -0
  44. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels/tracking.csv +0 -0
  45. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/labels.py +0 -0
  46. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/model.py +0 -0
  47. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/model_calibration.py +0 -0
  48. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/__init__.py +0 -0
  49. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/accessibility.py +1 -1
  50. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/annotate_ignore.py +0 -0
  51. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/assignee.py +0 -0
  52. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/backout.py +0 -0
  53. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/browsername.py +0 -0
  54. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/bugtype.py +0 -0
  55. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/component.py +0 -0
  56. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/component_specific.py +0 -0
  57. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/defect.py +0 -0
  58. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/defect_enhancement_task.py +0 -0
  59. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/devdocneeded.py +0 -0
  60. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/fenixcomponent.py +0 -0
  61. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/fixtime.py +0 -0
  62. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/invalid_compatibility_report.py +0 -0
  63. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/needsdiagnosis.py +0 -0
  64. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/perf_regression_predictor.py +0 -0
  65. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/performancebug.py +0 -0
  66. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/qaneeded.py +0 -0
  67. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/rcatype.py +0 -0
  68. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/regression.py +0 -0
  69. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/regressionrange.py +0 -0
  70. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/severity.py +0 -0
  71. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/spambug.py +0 -0
  72. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/stepstoreproduce.py +0 -0
  73. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/testfailure.py +0 -0
  74. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/testselect.py +0 -0
  75. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/tracking.py +0 -0
  76. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/uplift.py +0 -0
  77. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/models/worksforme.py +0 -0
  78. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/nlp.py +0 -0
  79. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/__init__.py +0 -0
  80. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/calibration.py +0 -0
  81. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/commit_risk.py +0 -0
  82. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/datasets.py +0 -0
  83. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/extraction.py +0 -0
  84. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/label_policy.py +0 -0
  85. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/push_status.py +0 -0
  86. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/regression_commits.py +0 -0
  87. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/regression_labeling.py +0 -0
  88. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/selection_pairs.py +0 -0
  89. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/simulation/__init__.py +0 -0
  90. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/simulation/capacity.py +0 -0
  91. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/simulation/detection.py +0 -0
  92. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/simulation/metrics.py +0 -0
  93. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/simulation/optimize.py +0 -0
  94. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/simulation/splits.py +0 -0
  95. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/simulation/stats.py +0 -0
  96. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/simulation/strategies.py +0 -0
  97. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/simulation/timeline.py +0 -0
  98. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/__init__.py +0 -0
  99. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_alerts.sql +0 -0
  100. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_capacity_background.sql +0 -0
  101. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_capacity_builds.sql +0 -0
  102. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_capacity_eligible.sql +0 -0
  103. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_capacity_labels.sql +0 -0
  104. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_capacity_pools.sql +0 -0
  105. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_capacity_workers.sql +0 -0
  106. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_pushes.sql +0 -0
  107. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_task_costs.sql +0 -0
  108. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/sql/perf_task_filter.sql +0 -0
  109. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/task_costs.py +0 -0
  110. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/perf/task_labels.py +0 -0
  111. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/phabricator.py +0 -0
  112. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/redash.py +0 -0
  113. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/rust_code_analysis_server.py +0 -0
  114. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/swarm.py +0 -0
  115. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/test_scheduling_features.py +0 -0
  116. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/__init__.py +0 -0
  117. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/base.py +0 -0
  118. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/__init__.py +0 -0
  119. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/agent.py +0 -0
  120. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/data_types.py +0 -0
  121. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/database.py +0 -0
  122. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/langchain_tools.py +0 -0
  123. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/prompts.py +0 -0
  124. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/protocols.py +0 -0
  125. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/review_context.py +0 -0
  126. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/review_context_schema.py +0 -0
  127. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/scorer.py +0 -0
  128. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/code_review/utils.py +0 -0
  129. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/comment_matching/agent.py +0 -0
  130. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/comment_matching/prompts.py +0 -0
  131. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/comment_resolution/__init__.py +0 -0
  132. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/comment_resolution/agent.py +0 -0
  133. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/__init__.py +0 -0
  134. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/connection.py +0 -0
  135. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/data_types.py +0 -0
  136. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/exceptions.py +0 -0
  137. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/llms.py +0 -0
  138. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/platforms/__init__.py +0 -0
  139. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/platforms/base.py +0 -0
  140. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/platforms/bugzilla.py +0 -0
  141. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/platforms/patch_apply.py +0 -0
  142. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/platforms/phabricator.py +0 -0
  143. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/text.py +0 -0
  144. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/core/validators.py +0 -0
  145. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/patch_summarization/__init__.py +0 -0
  146. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/patch_summarization/agent.py +0 -0
  147. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/patch_summarization/prompts.py +0 -0
  148. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/suggestion_filtering/__init__.py +0 -0
  149. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/suggestion_filtering/agent.py +0 -0
  150. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/tools/suggestion_filtering/prompts.py +0 -0
  151. {bugbug-0.0.657 → bugbug-0.0.659}/bugbug/vectordb.py +0 -0
  152. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/__init__.py +0 -0
  153. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/analyze_training_metrics.py +0 -0
  154. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/backout_related_test_regressions.py +0 -0
  155. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/bug_classifier.py +0 -0
  156. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/bug_retriever.py +0 -0
  157. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/check.py +0 -0
  158. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/check_all_metrics.py +0 -0
  159. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/ci_failures_matching.py +0 -0
  160. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/comment_classifier.py +0 -0
  161. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/comment_level_labeler.py +0 -0
  162. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/comment_resolver_runner.py +0 -0
  163. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/commit_classifier.py +0 -0
  164. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/commit_retriever.py +0 -0
  165. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/compatibility_report_classifier.py +0 -0
  166. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/gcp_logs_retriever.py +0 -0
  167. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/generate_landings_risk_report.py +0 -0
  168. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/generate_sheet.py +0 -0
  169. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/get_type_labels.py +0 -0
  170. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/get_untriaged.py +0 -0
  171. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/github_issue_classifier.py +0 -0
  172. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/github_issue_retriever.py +0 -0
  173. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/inline_comments_data_collection.py +0 -0
  174. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/maintenance_effectiveness_indicator.py +0 -0
  175. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/microannotate_generator.py +0 -0
  176. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/past_bugs_by_unit.py +0 -0
  177. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/perf_alerts_retriever.py +0 -0
  178. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/perf_commit_risk_scorer.py +0 -0
  179. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/perf_regression_predictor.py +0 -0
  180. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/perf_scheduling_simulator.py +0 -0
  181. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/redundant_failures.py +0 -0
  182. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/regressor_finder.py +0 -0
  183. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/retrieve_ci_failures.py +0 -0
  184. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/retrieve_training_metrics.py +0 -0
  185. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/retrieve_try_pushes.py +0 -0
  186. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/review_comments_retriever.py +0 -0
  187. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/revision_retriever.py +0 -0
  188. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/test_scheduling_history_retriever.py +0 -0
  189. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/testing_policy_stats.py +0 -0
  190. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/trainer.py +0 -0
  191. {bugbug-0.0.657 → bugbug-0.0.659}/scripts/trainer_extract_args.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bugbug
3
- Version: 0.0.657
3
+ Version: 0.0.659
4
4
  Summary: ML tools for Mozilla projects
5
5
  Author-email: Marco Castelluccio <mcastelluccio@mozilla.com>
6
6
  License-Expression: MPL-2.0
@@ -30,7 +30,7 @@ Requires-Dist: markdown2~=2.5.5
30
30
  Requires-Dist: matplotlib<3.12.0,>=3.10.8
31
31
  Requires-Dist: mercurial~=7.2
32
32
  Requires-Dist: microannotate~=0.0.24
33
- Requires-Dist: mozci~=2.6.0
33
+ Requires-Dist: mozci~=2.6.2
34
34
  Requires-Dist: numpy<2.6.0,>=2.4.3
35
35
  Requires-Dist: orjson<3.14.0,>=3.11.7
36
36
  Requires-Dist: ortools~=9.15.6755
bugbug-0.0.659/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.659
@@ -159,6 +159,7 @@ class RegressorModel(CommitModel):
159
159
  commit_features.FunctionsTouchedNum(),
160
160
  commit_features.FunctionsTouchedSize(),
161
161
  commit_features.SourceCodeFileMetrics(),
162
+ commit_features.SourceCodeMetricsDiff(),
162
163
  ]
163
164
 
164
165
  cleanup_functions = [
@@ -336,10 +336,9 @@ class TestConfigSelectPooledModel(DimensionSelector, Model):
336
336
  Model.__init__(self, lemmatization)
337
337
  self.training_dbs = [test_scheduling.PUSH_DATA_CONFIG_GROUP_DB]
338
338
  self.history = DimensionHistory()
339
- self.known_configs: set[str] = set()
340
339
 
341
340
  def train(self, importance_cutoff=0.15, limit=None):
342
- regressions, self.known_configs, _ = load_regressions(with_patches=False)
341
+ regressions, _ = load_regressions(with_patches=False)
343
342
  split = split_push_index(regressions)
344
343
 
345
344
  self.history = DimensionHistory()
@@ -387,7 +386,6 @@ class _DimensionClassifierModel(DimensionSelector, Model):
387
386
  self.entire_dataset_training = True
388
387
 
389
388
  self.history = DimensionHistory()
390
- self.known_configs: set[str] = set()
391
389
  self._data: tuple | None = None
392
390
  self.row_weights: list[float] = []
393
391
  self.row_push_index: list[int] = []
@@ -419,7 +417,7 @@ class _DimensionClassifierModel(DimensionSelector, Model):
419
417
 
420
418
  def _load(self):
421
419
  if self._data is None:
422
- regressions, self.known_configs, patches = load_regressions()
420
+ regressions, patches = load_regressions()
423
421
  self._data = (regressions, patches, split_push_index(regressions))
424
422
  return self._data
425
423
 
@@ -24,13 +24,11 @@ groups of the push are cheaper, as their tasks run anyway.
24
24
  """
25
25
 
26
26
  import collections
27
- import fnmatch
28
27
  import functools
29
28
  import logging
30
29
  import math
31
30
  import os
32
31
  import random
33
- import re
34
32
  from typing import Any, Collection, Iterable, Iterator, Mapping, NamedTuple, Sequence
35
33
 
36
34
  import numpy as np
@@ -312,49 +310,66 @@ def generate_rows(
312
310
  history.add(regression)
313
311
 
314
312
 
315
- def _label_without_chunk(label: str) -> str:
316
- parts = label.split("-")
317
- return "-".join(parts[:-1] if parts[-1].isdigit() else parts)
313
+ class LiveTask(NamedTuple):
314
+ """A test task of the current task graph, by label without chunk number (see live_candidates)."""
318
315
 
316
+ # Its config, as mozci names it (see mozci.task.get_configuration).
317
+ config: str
318
+ # The manifests run by its chunks.
319
+ manifests: Sequence[str]
319
320
 
320
- def live_candidates(
321
- manifests_by_task: Mapping[str, Iterable[str]], known_configs: Iterable[str]
322
- ) -> dict[str, list[str]]:
323
- """The configs of the tasks in the current task graph that run each group.
324
321
 
325
- `manifests_by_task` maps the labels of the tasks scheduled on the push's project to the manifests
326
- they run (the decision task's manifests-by-task.json, restricted to its target tasks, as it comes
327
- from the full task graph, which also has tasks of other projects, e.g. shippable variants). The
328
- configs are patterns over task labels without their chunk number (e.g.
329
- test-macosx1500-aarch64/debug-*-swr), as the taskgraph matches them: each task is named after
330
- the most specific `known_configs` pattern it matches, or after its own label without the chunk
331
- number if none matches (e.g. for a new platform).
322
+ def live_tasks(tasks: Mapping[str, LiveTask]) -> dict[str, dict[str, list[str]]]:
323
+ """The tasks of the current task graph running each group, by config.
332
324
 
333
- As the candidates come from the current task graph, configs that don't exist anymore (e.g. after
334
- a platform migration) are never selected. Groups are named as by the models (see
325
+ `tasks` are the test tasks of the push's project among which configs are selected (see
326
+ bugbug_http.boot), by label without chunk number. Groups are named as by the models (see
335
327
  test_scheduling.normalize_group).
336
328
  """
337
- patterns = sorted(
338
- ((len(c), c, re.compile(fnmatch.translate(c))) for c in set(known_configs)),
339
- reverse=True,
329
+ result: dict[str, dict[str, set[str]]] = collections.defaultdict(
330
+ lambda: collections.defaultdict(set)
340
331
  )
332
+ for label, task in tasks.items():
333
+ for manifest in task.manifests:
334
+ result[test_scheduling.normalize_group(manifest)][task.config].add(label)
335
+
336
+ return {
337
+ group: {config: sorted(labels) for config, labels in configs.items()}
338
+ for group, configs in result.items()
339
+ }
340
+
341
+
342
+ def live_candidates(
343
+ tasks_by_group: Mapping[str, Mapping[str, Sequence[str]]],
344
+ ) -> dict[str, list[str]]:
345
+ """The configs of the tasks in the current task graph that run each group (see live_tasks).
341
346
 
342
- @functools.cache
343
- def config_of(label: str) -> str:
344
- for _, config, pattern in patterns:
345
- if pattern.match(label):
346
- return config
347
- return label
347
+ As the candidates come from the current task graph, configs that don't exist anymore (e.g. after
348
+ a platform migration) are never selected.
349
+ """
350
+ return {group: sorted(configs) for group, configs in tasks_by_group.items()}
348
351
 
349
- result: dict[str, set[str]] = collections.defaultdict(set)
350
- for label, manifests in manifests_by_task.items():
351
- if not label.startswith("test-"):
352
- continue
353
- config = config_of(_label_without_chunk(label))
354
- for manifest in manifests:
355
- result[test_scheduling.normalize_group(manifest)].add(config)
356
352
 
357
- return {group: sorted(configs) for group, configs in result.items()}
353
+ def task_labels(
354
+ tasks_by_group: Mapping[str, Mapping[str, Sequence[str]]],
355
+ group: str,
356
+ configs: Iterable[str],
357
+ new_tasks: Mapping[str, str] | None = None,
358
+ ) -> list[str]:
359
+ """The labels (without chunk number) of the tasks running a group on the given configs.
360
+
361
+ The taskgraph matches them with the labels of its tasks. `tasks_by_group` comes from live_tasks.
362
+ `new_tasks` are tasks whose manifests aren't known (e.g. renamed since the task graph the others
363
+ come from), by label, with their config: they are given for every group selected on their config,
364
+ as the taskgraph only runs a task for a group if the task runs it.
365
+ """
366
+ configs = set(configs)
367
+ tasks = tasks_by_group.get(group, {})
368
+ labels = {label for config in configs for label in tasks.get(config, ())}
369
+ labels |= {
370
+ label for label, config in (new_tasks or {}).items() if config in configs
371
+ }
372
+ return sorted(labels)
358
373
 
359
374
 
360
375
  class GroupCandidates(NamedTuple):
@@ -380,11 +395,9 @@ def _plainest_cheapest(configs: Iterable[str]) -> str:
380
395
 
381
396
  def load_regressions(
382
397
  with_patches: bool = True,
383
- ) -> tuple[
384
- list[test_scheduling.ConfigSelectRegression], set[str], dict[int, PatchInfo]
385
- ]:
386
- """The regressions of the push data, the configs seen recently, and the patch of each regression's push."""
387
- regressions, known_configs = test_scheduling.get_config_select_regressions(
398
+ ) -> tuple[list[test_scheduling.ConfigSelectRegression], dict[int, PatchInfo]]:
399
+ """The regressions of the push data, and the patch of each regression's push."""
400
+ regressions = test_scheduling.get_config_select_regressions(
388
401
  lambda: db.read(test_scheduling.PUSH_DATA_CONFIG_GROUP_DB)
389
402
  )
390
403
  logger.info(
@@ -394,7 +407,7 @@ def load_regressions(
394
407
  )
395
408
 
396
409
  if not with_patches:
397
- return regressions, known_configs, {}
410
+ return regressions, {}
398
411
 
399
412
  revs = {rev: r.push_index for r in regressions for rev in r.revs}
400
413
  files: dict[int, list[str]] = collections.defaultdict(list)
@@ -408,7 +421,7 @@ def load_regressions(
408
421
  for push_index, push_files in files.items()
409
422
  }
410
423
  logger.info("Patches found for %d pushes", len(patches))
411
- return regressions, known_configs, patches
424
+ return regressions, patches
412
425
 
413
426
 
414
427
  def split_push_index(
@@ -671,10 +684,8 @@ class TestConfigSelectModel(ConfigSelector, Model):
671
684
  self.calculate_importance = False
672
685
  self.entire_dataset_training = True
673
686
 
674
- # Inference state: the failure history up to the end of the training data, and the configs
675
- # seen recently (to name the tasks of the current task graph, see live_candidates).
687
+ # Inference state: the failure history up to the end of the training data.
676
688
  self.history = ConfigHistory()
677
- self.known_configs: set[str] = set()
678
689
 
679
690
  self._regressions: list[test_scheduling.ConfigSelectRegression] | None = None
680
691
  self._patches: dict[int, PatchInfo] = {}
@@ -735,7 +746,7 @@ class TestConfigSelectModel(ConfigSelector, Model):
735
746
 
736
747
  def _load_regressions(self) -> list[test_scheduling.ConfigSelectRegression]:
737
748
  if self._regressions is None:
738
- self._regressions, self.known_configs, self._patches = load_regressions()
749
+ self._regressions, self._patches = load_regressions()
739
750
  return self._regressions
740
751
 
741
752
  def _split_push_index(self) -> int:
@@ -945,7 +945,7 @@ def hg_log(
945
945
  if len(revs) == 0:
946
946
  return tuple()
947
947
 
948
- template = "{node}\\0{author}\\0{desc}\\0{bug}\\0{backedoutby}\\0{author|email}\\0{pushdate|hgdate}\\0{reviewers}\\0{backsoutnodes}\\0"
948
+ template = "{node}\\0{author}\\0{desc}\\0{bug}\\0{backedoutby}\\0{author|email}\\0{firstpushdate|hgdate}\\0{reviewers}\\0{backsoutnodes}\\0"
949
949
 
950
950
  args = hglib.util.cmdbuilder(
951
951
  b"log",
@@ -1691,13 +1691,7 @@ def clone(
1691
1691
  with hglib.open(repo_dir) as hg:
1692
1692
  clean(hg, repo_dir)
1693
1693
 
1694
- # Remove pushlog DB to make sure it's regenerated.
1695
- try:
1696
- os.remove(os.path.join(repo_dir, ".hg", "pushlog2.db"))
1697
- except FileNotFoundError:
1698
- logger.info("pushlog database doesn't exist")
1699
-
1700
- # Pull, to make sure the pushlog is generated.
1694
+ # Pull, to retrieve the new changesets and their pushes.
1701
1695
  with hglib.open(repo_dir) as hg:
1702
1696
  logger.info("Pulling %s", repo_dir)
1703
1697
  hg.pull(update=update)
@@ -0,0 +1,59 @@
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 numpy as np
7
+ from sklearn.base import BaseEstimator, TransformerMixin
8
+ from sklearn.compose import ColumnTransformer
9
+ from sklearn.preprocessing import OrdinalEncoder
10
+
11
+
12
+ class StructuredColumnTransformer(ColumnTransformer):
13
+ def _hstack(self, Xs, n_samples):
14
+ result = super()._hstack(Xs, n_samples=n_samples)
15
+
16
+ transformer_names = (name for name, transformer, column in self.transformers_)
17
+ types = []
18
+ for f, transformer_name in zip(Xs, transformer_names):
19
+ types.append((transformer_name, result.dtype, (f.shape[1],)))
20
+
21
+ return result.view(np.dtype(types))
22
+
23
+
24
+ class DictExtractor(BaseEstimator, TransformerMixin):
25
+ def __init__(self, key):
26
+ self.key = key
27
+
28
+ def fit(self, x, y=None):
29
+ return self
30
+
31
+ def transform(self, data):
32
+ return np.array([elem[self.key] for elem in data]).reshape(-1, 1)
33
+
34
+
35
+ class MergeText(BaseEstimator, TransformerMixin):
36
+ def __init__(self, cols):
37
+ self.cols = cols
38
+
39
+ def fit(self, X, y=None):
40
+ return self
41
+
42
+ def transform(self, X):
43
+ return X[self.cols].apply(lambda row: " ".join(row), axis=1)
44
+
45
+
46
+ class MissingOrdinalEncoder(OrdinalEncoder):
47
+ """Ordinal encoder that ignores missing values encountered after training.
48
+
49
+ Workaround for issue: scikit-learn/scikit-learn#11997
50
+ """
51
+
52
+ def fit(self, X, y=None):
53
+ self._categories = self.categories
54
+ self._fit(X, handle_unknown="ignore")
55
+ return self
56
+
57
+ def transform(self, X):
58
+ X_int, _ = self._transform(X, handle_unknown="ignore")
59
+ return X_int.astype(self.dtype, copy=False)
@@ -8,6 +8,7 @@ import collections
8
8
  import dataclasses
9
9
  import glob
10
10
  import itertools
11
+ import json
11
12
  import logging
12
13
  import math
13
14
  import os
@@ -81,7 +82,7 @@ TOUCHED_TOGETHER_DB = "touched_together.lmdb.tar.zst"
81
82
  db.register(
82
83
  TEST_GROUP_SCHEDULING_DB,
83
84
  "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_test_group_scheduling_history.latest/artifacts/public/test_group_scheduling_history.pickle.zst",
84
- 1,
85
+ 2,
85
86
  [PAST_FAILURES_GROUP_DB, TOUCHED_TOGETHER_DB],
86
87
  )
87
88
  PUSH_DATA_GROUP_DB = "data/push_data_group.json"
@@ -187,6 +188,37 @@ def normalize_group(group: str) -> str:
187
188
  return group.split(":")[0]
188
189
 
189
190
 
191
+ def get_full_graph_tasks(content: bytes, labels: set[str]) -> dict[str, dict]:
192
+ """The definitions of some tasks from a decision task's full-task-graph.json, by label.
193
+
194
+ The full task graph is hundreds of MB, and much more once parsed, so only the definitions of
195
+ the given tasks are parsed, where they are in the text. If one isn't found this way (e.g. if
196
+ the format of the file changed), the whole graph is parsed.
197
+ """
198
+ text = content.decode()
199
+ decoder = json.JSONDecoder()
200
+ tasks: dict[str, dict] = {}
201
+ for label in labels:
202
+ key = f"{json.dumps(label)}:{{"
203
+ start = text.find(key)
204
+ while start != -1:
205
+ try:
206
+ task, _ = decoder.raw_decode(text, start + len(key) - 1)
207
+ except ValueError:
208
+ task = None
209
+ if isinstance(task, dict) and task.get("label") == label:
210
+ tasks[label] = task
211
+ break
212
+ start = text.find(key, start + 1)
213
+
214
+ missing = labels - tasks.keys()
215
+ if missing:
216
+ del text
217
+ graph = orjson.loads(content)
218
+ tasks.update({label: graph[label] for label in missing if label in graph})
219
+ return tasks
220
+
221
+
190
222
  def rename_task(task: str) -> str:
191
223
  # https://bugzilla.mozilla.org/show_bug.cgi?id=1602863
192
224
  task = task.replace("test-linux64", "test-linux1804-64")
@@ -402,8 +434,7 @@ def _configs_by_group(config_groups: Iterable[Runnable]) -> dict[Group, set[str]
402
434
 
403
435
  def get_config_select_regressions(
404
436
  push_data_factory: Callable[[], Iterable[PushResult]],
405
- recent_pushes: int = 1000,
406
- ) -> tuple[list[ConfigSelectRegression], set[str]]:
437
+ ) -> list[ConfigSelectRegression]:
407
438
  """The regressions of config/group push data, with the configs they failed on and passed on.
408
439
 
409
440
  A config the regressed group ran on without failing passed, both on the culprit push and on the
@@ -412,9 +443,6 @@ def get_config_select_regressions(
412
443
  run after the culprit failed and the failure was attributed to a later push (e.g. because the config
413
444
  didn't run on the culprit): with no run in between, the attribution can't tell the pushes apart, so
414
445
  the config didn't verifiably pass. A failure after a pass doesn't matter (as in get_non_run_negatives).
415
-
416
- Also returns the configs that ran in the last `recent_pushes` pushes, used to name the configs of
417
- the tasks in the current task graph (see testconfigselect.live_candidates).
418
446
  """
419
447
  rev_index: dict[Revision, int] = {}
420
448
  culprits: list[
@@ -427,7 +455,6 @@ def get_config_select_regressions(
427
455
  ]
428
456
  ] = []
429
457
  failures_at: dict[int, dict[Group, set[str]]] = {}
430
- num_pushes = 0
431
458
  for index, push in enumerate(push_data_factory()):
432
459
  (
433
460
  revisions,
@@ -436,7 +463,6 @@ def get_config_select_regressions(
436
463
  possible_regressions,
437
464
  likely_regressions,
438
465
  ) = push
439
- num_pushes += 1
440
466
  for revision in revisions:
441
467
  rev_index[revision] = index
442
468
  if possible_regressions or likely_regressions:
@@ -470,16 +496,13 @@ def get_config_select_regressions(
470
496
 
471
497
  # The first push of the window each config ran the group on.
472
498
  later_runs: dict[tuple[int, Group], dict[str, int]] = collections.defaultdict(dict)
473
- recent: set[str] = set()
474
499
  for index, push in enumerate(push_data_factory()):
475
500
  groups_needed = needed.get(index)
476
- if groups_needed is None and index < num_pushes - recent_pushes:
501
+ if groups_needed is None:
477
502
  continue
478
503
 
479
504
  for group, configs in _configs_by_group(push[2]).items():
480
- if index >= num_pushes - recent_pushes:
481
- recent |= configs
482
- for culprit in groups_needed.get(group, ()) if groups_needed else ():
505
+ for culprit in groups_needed.get(group, ()):
483
506
  for config in configs:
484
507
  later_runs[(culprit, group)].setdefault(config, index)
485
508
 
@@ -505,7 +528,7 @@ def get_config_select_regressions(
505
528
  )
506
529
  )
507
530
 
508
- return regressions, recent
531
+ return regressions
509
532
 
510
533
 
511
534
  def get_push_data(
@@ -948,12 +971,8 @@ def get_touched_together_key(f1: str, f2: str) -> bytes:
948
971
  def get_touched_together(f1: str, f2: str) -> int:
949
972
  touched_together = get_touched_together_db(True)
950
973
 
951
- key = get_touched_together_key(f1, f2)
952
-
953
- try:
954
- return struct.unpack("I", touched_together[key])[0]
955
- except KeyError:
956
- return 0
974
+ value = touched_together.get(get_touched_together_key(f1, f2))
975
+ return struct.unpack("I", value)[0] if value is not None else 0
957
976
 
958
977
 
959
978
  def set_touched_together(f1: str, f2: str) -> None:
@@ -1258,9 +1277,12 @@ def generate_data(
1258
1277
  likely_regressions: Iterable[str],
1259
1278
  ):
1260
1279
  if granularity != "label":
1280
+ # Each directory counts once, however many of the push's files are in it.
1261
1281
  source_file_dirs = tuple(
1262
- os.path.dirname(source_file) for source_file in commit["files"]
1282
+ set(os.path.dirname(source_file) for source_file in commit["files"])
1263
1283
  )
1284
+ # Runnables in the same directories have the same touched together values.
1285
+ touched_together_by_dirs: dict[tuple[str, ...], tuple[int, int, float]] = {}
1264
1286
 
1265
1287
  for runnable in runnables:
1266
1288
  if granularity != "label":
@@ -1268,19 +1290,26 @@ def generate_data(
1268
1290
  runnable[1] if isinstance(runnable, tuple) else runnable
1269
1291
  )
1270
1292
 
1271
- touched_together_files = sum(
1272
- get_touched_together(source_file, runnable_dir)
1273
- for source_file in commit["files"]
1274
- for runnable_dir in runnable_dirs
1275
- )
1276
- touched_together_directories = sum(
1277
- get_touched_together(source_file_dir, runnable_dir)
1278
- for source_file_dir in source_file_dirs
1279
- for runnable_dir in runnable_dirs
1280
- )
1281
- touched_together_pmi = get_cochange_pmi(
1282
- set(source_file_dirs), runnable_dirs
1283
- )
1293
+ if runnable_dirs not in touched_together_by_dirs:
1294
+ touched_together_by_dirs[runnable_dirs] = (
1295
+ sum(
1296
+ get_touched_together(source_file, runnable_dir)
1297
+ for source_file in commit["files"]
1298
+ for runnable_dir in runnable_dirs
1299
+ ),
1300
+ sum(
1301
+ get_touched_together(source_file_dir, runnable_dir)
1302
+ for source_file_dir in source_file_dirs
1303
+ for runnable_dir in runnable_dirs
1304
+ ),
1305
+ get_cochange_pmi(source_file_dirs, runnable_dirs),
1306
+ )
1307
+
1308
+ (
1309
+ touched_together_files,
1310
+ touched_together_directories,
1311
+ touched_together_pmi,
1312
+ ) = touched_together_by_dirs[runnable_dirs]
1284
1313
 
1285
1314
  is_possible_regression = runnable in possible_regressions
1286
1315
  is_likely_regression = runnable in likely_regressions
@@ -25,17 +25,12 @@ import botocore
25
25
  import dateutil.parser
26
26
  import libmozdata
27
27
  import lmdb
28
- import numpy as np
29
28
  import psutil
30
29
  import requests
31
- import scipy
32
30
  import taskcluster
33
31
  import tenacity
34
32
  import zstandard
35
33
  from requests.packages.urllib3.util.retry import Retry
36
- from sklearn.base import BaseEstimator, TransformerMixin
37
- from sklearn.compose import ColumnTransformer
38
- from sklearn.preprocessing import OrdinalEncoder
39
34
 
40
35
  from bugbug import get_bugbug_version
41
36
 
@@ -67,62 +62,14 @@ def numpy_to_dict(array):
67
62
 
68
63
 
69
64
  def to_array(val):
65
+ import scipy.sparse
66
+
70
67
  if isinstance(val, scipy.sparse.csr_matrix):
71
68
  return val.toarray()
72
69
 
73
70
  return val
74
71
 
75
72
 
76
- class StructuredColumnTransformer(ColumnTransformer):
77
- def _hstack(self, Xs, n_samples):
78
- result = super()._hstack(Xs, n_samples=n_samples)
79
-
80
- transformer_names = (name for name, transformer, column in self.transformers_)
81
- types = []
82
- for f, transformer_name in zip(Xs, transformer_names):
83
- types.append((transformer_name, result.dtype, (f.shape[1],)))
84
-
85
- return result.view(np.dtype(types))
86
-
87
-
88
- class DictExtractor(BaseEstimator, TransformerMixin):
89
- def __init__(self, key):
90
- self.key = key
91
-
92
- def fit(self, x, y=None):
93
- return self
94
-
95
- def transform(self, data):
96
- return np.array([elem[self.key] for elem in data]).reshape(-1, 1)
97
-
98
-
99
- class MergeText(BaseEstimator, TransformerMixin):
100
- def __init__(self, cols):
101
- self.cols = cols
102
-
103
- def fit(self, X, y=None):
104
- return self
105
-
106
- def transform(self, X):
107
- return X[self.cols].apply(lambda row: " ".join(row), axis=1)
108
-
109
-
110
- class MissingOrdinalEncoder(OrdinalEncoder):
111
- """Ordinal encoder that ignores missing values encountered after training.
112
-
113
- Workaround for issue: scikit-learn/scikit-learn#11997
114
- """
115
-
116
- def fit(self, X, y=None):
117
- self._categories = self.categories
118
- self._fit(X, handle_unknown="ignore")
119
- return self
120
-
121
- def transform(self, X):
122
- X_int, _ = self._transform(X, handle_unknown="ignore")
123
- return X_int.astype(self.dtype, copy=False)
124
-
125
-
126
73
  def get_taskcluster_options() -> dict:
127
74
  """Get the Taskcluster setup options according to current environment.
128
75
 
@@ -36,7 +36,7 @@ dependencies = [
36
36
  "matplotlib>=3.10.8,<3.12.0",
37
37
  "mercurial~=7.2",
38
38
  "microannotate~=0.0.24",
39
- "mozci~=2.6.0",
39
+ "mozci~=2.6.2",
40
40
  "numpy>=2.4.3,<2.6.0",
41
41
  "orjson>=3.11.7,<3.14.0",
42
42
  "ortools~=9.15.6755",
@@ -61,7 +61,7 @@ sleep 1
61
61
  redis-cli -n 4 FLUSHDB
62
62
 
63
63
  # Start the http server
64
- gunicorn -b 127.0.0.1:8000 bugbug_http.app --preload --timeout 30 -w 3 &
64
+ gunicorn -c python:bugbug_http.gunicorn_conf -b 127.0.0.1:8000 bugbug_http.app --preload --timeout 30 -w 3 &
65
65
  gunicorn_pid=$!
66
66
 
67
67
  # Start the background worker