Page MenuHomePhabricator

Throw when callers pass an invalid constraint to a "*.search" method
ClosedPublic

Authored by epriestley on Sep 7 2016, 2:25 PM.
Tags
None
Referenced Files
F15463703: D16507.id39726.diff
Wed, Apr 2, 2:14 AM
F15463702: D16507.id.diff
Wed, Apr 2, 2:14 AM
F15463701: D16507.id39733.diff
Wed, Apr 2, 2:14 AM
F15463657: D16507.refgetjnana.dev.diff
Wed, Apr 2, 2:01 AM
F15439150: D16507.id39726.diff
Wed, Mar 26, 6:02 AM
F15435207: D16507.id.diff
Tue, Mar 25, 7:23 AM
F15430681: D16507.diff
Mon, Mar 24, 8:33 AM
F15382264: D16507.id39726.diff
Fri, Mar 14, 11:34 AM
Subscribers
None

Details

Summary

Ref T11593. When you call a *.search method like maniphest.search, we don't currently validate that all the constraints you pass are recognized.

I think there were two very weak arguments for not doing this:

  • It makes compatibility in arc across versions slightly easier: if we add a new constraint, we could add it to arc but also do client-side filtering for a while.
  • Conduit parameter types could, in theory, accept multiple inputs or optional/alias inputs.

These reasons are pretty fluff and T11593 is a concrete issue caused by not validating. Just validate instead.

Test Plan
  • Made a maniphest.search call with a bogus constraint, got an explicit error about the bad constraint.
  • Made a maniphest.search call with a valid constraint ("ids").

Diff Detail

Repository
rP Phabricator
Branch
iconstraint
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13605
Build 17528: Run Core Tests
Build 17527: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Throw when callers pass an invalid constraint to a "*.search" method.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Sep 7 2016, 3:51 PM
This revision was automatically updated to reflect the committed changes.