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
F15450914: D21462.id.diff
Fri, Mar 28, 7:02 PM
F15450601: D21462.id51074.diff
Fri, Mar 28, 4:34 PM
F15449977: D21462.id51090.diff
Fri, Mar 28, 1:17 PM
F15440348: D21462.diff
Wed, Mar 26, 12:20 PM
F15338112: D21462.diff
Mar 9 2025, 9:23 AM
F15337893: D21462.diff
Mar 9 2025, 8:14 AM
Unknown Object (File)
Feb 25 2025, 10:45 AM
Unknown Object (File)
Feb 20 2025, 4:51 PM
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