Closed
Bug 1441600
Opened 8 years ago
Closed 8 years ago
Do not search for all repos if no search parameter is set.
Categories
(Conduit :: Lando, enhancement)
Conduit
Lando
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: imadueme, Assigned: imadueme)
References
Details
(Keywords: conduit-triaged)
Attachments
(2 external files)
https://github.com/mozilla-conduit/lando-api/blob/d255c31abd1f5800b97d215c64a1cbe60eddbd3a/landoapi/models/landing.py#L154
https://github.com/mozilla-conduit/lando-api/blob/d255c31abd1f5800b97d215c64a1cbe60eddbd3a/landoapi/phabricator_client.py#L236
We search for repo info by the PHID. When a revision has no repo, the search api method will perform an unbounded search returning all repos. This misleads the calling code into thinking that the revision has a repo attached. Since this method is called .._by_phid, it should be strict about requiring a phid. Then callers will know to first check if the phid is none.
(This was found when i tried to land a revision with no repo in my demo environment and it was landing (and failing) into the nss repo. Since transplant trusts everything we send this is a pretty big hole, though it most cases the patch would fail to apply.)
| Assignee | ||
Updated•8 years ago
|
Summary: Do not search for all repo's if no search parameter is set. → Do not search for all repos if no search parameter is set.
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → imadueme
Updated•8 years ago
|
Keywords: conduit-triaged
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Comment on attachment 8954516 [details]
phabricator_client: simplify get_repo methods into one
Steven MacLeod [:smacleod] has approved the revision.
https://phabricator.services.mozilla.com/D653
Attachment #8954516 -
Flags: review+
Comment 4•8 years ago
|
||
Comment on attachment 8954509 [details]
tests: update revisions repo canned response to match lando-api
Steven MacLeod [:smacleod] has approved the revision.
https://phabricator.services.mozilla.com/D652
Attachment #8954509 -
Flags: review+
| Assignee | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•