Page MenuHomePhabricator

Fix an issue where a GROUP BY was missing when a query matched a revision using multiple hashes
ClosedPublic

Authored by epriestley on Sep 16 2020, 12:19 AM.
Tags
None
Referenced Files
F18110272: D21462.id51074.diff
Mon, Aug 11, 5:53 PM
F18110248: D21462.id.diff
Mon, Aug 11, 5:38 PM
F18109457: D21462.id51090.diff
Mon, Aug 11, 1:47 PM
F18101429: D21462.diff
Sat, Aug 9, 1:11 PM
F18101275: D21462.diff
Sat, Aug 9, 12:25 PM
F18088995: D21462.id51074.diff
Wed, Aug 6, 10:13 AM
F18088017: D21462.id51090.diff
Wed, Aug 6, 6:34 AM
F18087626: D21462.id.diff
Wed, Aug 6, 4:43 AM
Subscribers
None

Details

Summary

Ref T13581. If you query for revisions by hash and provide multiple hashes (A, B) which match a single revision (e.g., older and newer diffs for that revision), the query omits a GROUP BY clause but should contain one.

Add a GROUP BY clause in this case.

Test Plan

With a working copy that has multiple hashes corresponding to a single revision, ran arc branches before and after the change. Before, got this error:

[2020-09-15 17:02:07] EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Rows passed to "loadAllFromArray(...)" include two or more rows with the same ID ("130"). Rows must have unique IDs. An underlying query may be missing a GROUP BY. at [<arcanist>/src/conduit/ConduitFuture.php:65]

After, clean execution.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable