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
Unknown Object (File)
Feb 20 2024, 3:32 PM
Unknown Object (File)
Jan 9 2024, 8:03 AM
Unknown Object (File)
Jan 9 2024, 8:02 AM
Unknown Object (File)
Dec 27 2023, 1:37 PM
Unknown Object (File)
Dec 24 2023, 7:56 PM
Unknown Object (File)
Dec 22 2023, 3:23 AM
Unknown Object (File)
Dec 15 2023, 2:04 PM
Unknown Object (File)
Dec 5 2023, 6:02 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
Branch
cref13
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24889
Build 34341: Run Core Tests
Build 34340: arc lint + arc unit