Page MenuHomePhabricator

Fix issues where Drydock queries didn't work correctly with empty arrays
ClosedPublic

Authored by hach-que on Nov 19 2014, 11:11 PM.
Tags
None
Referenced Files
F14354690: D10879.diff
Thu, Dec 19, 5:21 PM
Unknown Object (File)
Thu, Dec 19, 11:07 AM
Unknown Object (File)
Thu, Dec 12, 1:47 AM
Unknown Object (File)
Tue, Dec 10, 2:49 PM
Unknown Object (File)
Tue, Dec 3, 8:46 AM
Unknown Object (File)
Tue, Dec 3, 12:08 AM
Unknown Object (File)
Sun, Dec 1, 10:04 AM
Unknown Object (File)
Sat, Nov 30, 7:40 PM

Details

Summary

Ref T2015. This fixes issues where the Drydock queries wouldn't filter (or throw an exception) when passed empty arrays for their with methods. In addition, this also adds array_unique to the resource and lease subqueries so that we don't pull in a bunch of stuff if logs or leases have the same related objects.

Test Plan

Tested it by using DarkConsole on the log controller.

Diff Detail

Repository
rP Phabricator
Branch
live-master
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3105
Build 3111: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

hach-que retitled this revision from to Fix issues where Drydock queries didn't work correctly with empty arrays.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
epriestley edited edge metadata.

Minor style nit.

src/applications/drydock/query/DrydockLogSearchEngine.php
40

Prefer just if ($resource_phids). This is equivalent to count() and simpler / consistent with the rest of the codebase.

47–63

etc etc

This revision now requires changes to proceed.Nov 19 2014, 11:13 PM
hach-que edited edge metadata.

Style fixes

epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 21 2014, 7:10 PM
This revision was automatically updated to reflect the committed changes.