Page MenuHomePhabricator

[releeph] Conduit failure with bad IDs
ClosedPublic

Authored by scottmac on Oct 14 2013, 7:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 8:19 AM
Unknown Object (File)
Fri, May 3, 8:55 AM
Unknown Object (File)
Wed, Apr 24, 11:41 PM
Unknown Object (File)
Tue, Apr 23, 4:40 PM
Unknown Object (File)
Fri, Apr 19, 5:43 PM
Unknown Object (File)
Thu, Apr 11, 11:09 AM
Unknown Object (File)
Apr 2 2024, 9:10 AM
Unknown Object (File)
Apr 1 2024, 3:29 AM

Details

Summary

Instead of returning a blank result it throws exceptions. Fix this up a
little so we get some consistency with differential

Test Plan

Loaded a bad phid for releeph, returns empty list.
Try a good phid and get 2 releeph merges.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

scottmac updated this revision to Unknown Object (????).Oct 14 2013, 8:37 AM

redo lint with the correct arc

The more consistent approach is to not return results which don't match parameters. differential.query, which is the parallel to this method, works the same way, as do all other modern query methods.

In particular, if you have 30 PHIDs and one of them is bad, "return nothing for nonmatching results" lets you handle that reasonably, while "throw an exception and return no results at all" doesn't.

This will return the 29/30 correctly, I only set the bad flag when all are bad. Without it you end up with a full table scan since there is no where filtering applied.

Ohhhh, sorry! I was misunderstanding what's going on here.

The most standard way to approach this would be to remove the logic from withRevisionPHIDs() and just store $this->revisionPHIDs = ..., then do the subquery and Empty check inside buildWhereClause(). This would remove the need for the badRevisionsRequested flag.

For most types of subquery logic, the check must be performed in this way because the subqueries require a viewer. This logic will eventually need to be adjusted to account for that, because it skips policy checks on the revisions right now. Once policies roll out fully, you should not be allowed to query requests for a revision you don't have permission to see. This is fine for the moment, though, as we're kind of ignoring releeph for policy purposes for the moment and it has a bunch of other stuff that needs cleanup.

scottmac updated this revision to Unknown Object (????).Oct 14 2013, 4:27 PM

clarify this only happens when all revision filter fails

scottmac updated this revision to Unknown Object (????).Oct 14 2013, 4:42 PM

Do it the correct way