Add pagination to issueDetails test data query
- Dominant language
- Python
- Stars
- 9
- Forks
- 31
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 16
Description
Some issues have a really high number of tests related to it (>600000), so the payload is really high, at 168.5MB. We could add pagination to the query or the response in order to lower this payload and lower the loading time.
Examples of issues with high test count (at time of writing):
`maestro:26cab82e27e6b4a7e883e14b72220126b0206e4e` - 614379 tests
`maestro:864a51178bf5750110198e325f2a58c7b13978b7` - 614379 tests
`maestro:7f11748e6b01faeb2388ddf00455bb48f5ef72d9` - 120930 tests
`maestro:e4a9aaa136a199bb99350d97b2080b34ef4e583a` - 92998 tests
These issues were found using this query:
```
SELECT
I.ID,
COUNT(T.ID) AS TEST_COUNT
FROM
ISSUES I
JOIN INCIDENTS INC ON INC.ISSUE_ID = I.ID
AND INC.ISSUE_VERSION = I.VERSION
JOIN TESTS T ON INC.TEST_ID = T.ID
WHERE
I.TEST_STATUS IS NOT NULL
AND I.ORIGIN = 'maestro'
GROUP BY
I.ID
ORDER BY
TEST_COUNT DESC
LIMIT
100
```
Contributor guide
Research direction
Start by tracing the issueDetails test-data query and compare pagination at the query versus response boundary. Use the provided high-count examples and SQL to measure payload size and loading time; done means smaller responses while preserving access to the related tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sql
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100