Chromium Code Reviews
DescriptionChanged 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 #
Dependent Patchsets: Messages
Total messages: 24 (11 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||