A service is needed that given a SHA-1 returns all matching rows in the image, oldimage, and filearchive as as LocalFile or ArchivedFile objects up to a certain limit and potentially grouped by filename.
The service needs to return all the images so that if one of the image objects cannot be rendered or does not have a thumbnail, another object can be attempted. The number of objects returned will be limited, as quarry queries ran in T351416: [S] Explore how many rows in the file tables have duplicated SHA-1 values on WMF wikis determined that some SHA-1 values have thousands of rows and filenames. Creating too many objects could unnecessarily use memory.
Acceptance criteria
- A service that meets the requirements above is created
- This service be fully tested