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
F18845461: D10879.id.diff
Oct 29 2025, 12:06 PM
F18842036: D10879.diff
Oct 28 2025, 1:03 PM
F18814316: D10879.diff
Oct 20 2025, 10:58 PM
F18814020: D10879.id26134.diff
Oct 20 2025, 8:49 PM
F18809594: D10879.id.diff
Oct 19 2025, 3:20 PM
F18782148: D10879.id26169.diff
Oct 13 2025, 12:43 AM
F18779490: D10879.id33759.diff
Oct 11 2025, 2:10 PM
F18705525: D10879.id.diff
Sep 28 2025, 11:43 AM

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
52

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

59–75

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.