Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Issue 2608483002: Changed FindSuspects to take a Repository factory, rather than mutating it (Closed)

Created:
3 years, 11 months ago by wrengr
Modified:
3 years, 11 months ago
CC:
chromium-reviews, infra-reviews+infra_chromium.org
Target Ref:
refs/heads/master
Project:
infra
Visibility:
Public.

Description

Changed FindSuspects to take a Repository factory, rather than mutating it In the old code, FindSuspects mutated the Repository object in place. This is bad for two reasons: (1) it has unforseen and undocumented side effects, and (2) it relies on the existence of a settable ``repo_url`` property, which is not guaranteed by the ``Repository`` interface. This CL solves the second of those: it moves the mutation out of FindSuspects, instead taking a factory-function argument for mapping the dep urls to their Repository objects. To keep the size of this CL manageable, we don't address the first issue. That is, the actual functions we pass for the ``get_repository`` argument will themselves perform the mutation. This way, the code is still functionally identical to the old code. Of course, a future CL should still address this issue, as per https://crbug.com/677224 BUG= TBR=stgao@chromium.org Review-Url: https://codereview.chromium.org/2608483002 Committed: https://chromium.googlesource.com/infra/infra/+/a07e0327ff09d5cc120fc9597db5fad399efedba

Patch Set 1 #

Total comments: 8

Patch Set 2 : added todo for https://crbug.com/677224 #

Total comments: 2

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -30 lines) Patch
A appengine/findit/_list_Gitiles View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
A appengine/findit/_list_HttpClientAppengine View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
A appengine/findit/crash/STGAO View 1 2 1 chunk +47 lines, -0 lines 0 comments Download
M appengine/findit/crash/changelist_classifier.py View 8 chunks +25 lines, -17 lines 0 comments Download
M appengine/findit/crash/findit_for_chromecrash.py View 1 1 chunk +14 lines, -1 line 0 comments Download
M appengine/findit/crash/loglinear/changelist_classifier.py View 5 chunks +17 lines, -9 lines 0 comments Download
M appengine/findit/crash/loglinear/test/changelist_classifier_test.py View 1 1 chunk +15 lines, -1 line 0 comments Download
M appengine/findit/crash/test/changelist_classifier_test.py View 1 2 2 chunks +17 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 24 (11 generated)
wrengr
non-trivial reorganization, PTAL
3 years, 11 months ago (2016-12-27 23:20:51 UTC) #3
Sharu Jiang
https://codereview.chromium.org/2608483002/diff/1/appengine/findit/crash/changelist_classifier.py File appengine/findit/crash/changelist_classifier.py (right): https://codereview.chromium.org/2608483002/diff/1/appengine/findit/crash/changelist_classifier.py#newcode23 appengine/findit/crash/changelist_classifier.py:23: ['repository', 'get_repository', 'top_n_results', 'confidence_threshold'])): So after we cleaned the ...
3 years, 11 months ago (2016-12-28 00:45:34 UTC) #4
corbin8951
lgtm
3 years, 11 months ago (2016-12-28 04:05:20 UTC) #8
wrengr
https://codereview.chromium.org/2608483002/diff/1/appengine/findit/crash/changelist_classifier.py File appengine/findit/crash/changelist_classifier.py (right): https://codereview.chromium.org/2608483002/diff/1/appengine/findit/crash/changelist_classifier.py#newcode23 appengine/findit/crash/changelist_classifier.py:23: ['repository', 'get_repository', 'top_n_results', 'confidence_threshold'])): On 2016/12/28 00:45:33, Sharu Jiang ...
3 years, 11 months ago (2016-12-28 18:23:33 UTC) #9
wrengr
https://codereview.chromium.org/2608483002/diff/1/appengine/findit/crash/changelist_classifier.py File appengine/findit/crash/changelist_classifier.py (right): https://codereview.chromium.org/2608483002/diff/1/appengine/findit/crash/changelist_classifier.py#newcode71 appengine/findit/crash/changelist_classifier.py:71: dependency_fetcher = ChromeDependencyFetcher(self.repository) On 2016/12/28 18:23:33, wrengr wrote: > ...
3 years, 11 months ago (2016-12-28 19:09:24 UTC) #10
wrengr
https://codereview.chromium.org/2608483002/diff/1/appengine/findit/crash/changelist_classifier.py File appengine/findit/crash/changelist_classifier.py (right): https://codereview.chromium.org/2608483002/diff/1/appengine/findit/crash/changelist_classifier.py#newcode71 appengine/findit/crash/changelist_classifier.py:71: dependency_fetcher = ChromeDependencyFetcher(self.repository) On 2016/12/28 19:09:24, wrengr wrote: > ...
3 years, 11 months ago (2016-12-28 20:55:52 UTC) #11
Martin Barbella
LGTM provided it lands with 2605943002 https://codereview.chromium.org/2608483002/diff/20001/appengine/findit/crash/changelist_classifier.py File appengine/findit/crash/changelist_classifier.py (right): https://codereview.chromium.org/2608483002/diff/20001/appengine/findit/crash/changelist_classifier.py#newcode264 appengine/findit/crash/changelist_classifier.py:264: # TODO(katesonia): Remove ...
3 years, 11 months ago (2016-12-29 21:51:06 UTC) #12
Sharu Jiang
On 2016/12/29 21:51:06, Martin Barbella wrote: > LGTM provided it lands with 2605943002 > > ...
3 years, 11 months ago (2016-12-29 21:58:09 UTC) #13
Sharu Jiang
https://codereview.chromium.org/2608483002/diff/20001/appengine/findit/crash/changelist_classifier.py File appengine/findit/crash/changelist_classifier.py (right): https://codereview.chromium.org/2608483002/diff/20001/appengine/findit/crash/changelist_classifier.py#newcode264 appengine/findit/crash/changelist_classifier.py:264: # TODO(katesonia): Remove the repository argument after refatoring cl ...
3 years, 11 months ago (2016-12-29 21:58:20 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2608483002/20001
3 years, 11 months ago (2017-01-03 19:01:48 UTC) #16
commit-bot: I haz the power
Failed to apply patch for appengine/findit/crash/test/changelist_classifier_test.py: While running git apply --index -p1; error: patch failed: ...
3 years, 11 months ago (2017-01-03 19:10:39 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2608483002/40001
3 years, 11 months ago (2017-01-03 19:53:00 UTC) #21
commit-bot: I haz the power
3 years, 11 months ago (2017-01-03 20:02:37 UTC) #24
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/infra/infra/+/a07e0327ff09d5cc120fc9597db5f...

Powered by Google App Engine
This is Rietveld 408576698