feat: badges backend#3767
Conversation
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
1 similar comment
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
| p.githubHandle as githubHandle, | ||
| '' as status | ||
| '' as status, | ||
| count() OVER () as totalCount |
There was a problem hiding this comment.
Misleading totalCount for limited leaderboards
Medium Severity
The count() OVER () window function computes before LIMIT 100 is applied, so totalCount reflects the full count (potentially thousands) while only 100 rows are actually stored. API consumers querying the contributors or organizations leaderboards will see a totalCount suggesting thousands of pageable items, but attempting to paginate beyond the first 100 rows will return empty results.
Note
Introduces a total rows count for each leaderboard snapshot and surfaces it in query results.
leaderboards_copy_dsschema withtotalCountand updatesleaderboards.pipeto select itcount() OVER () as totalCountand write it to the datasourceWritten by Cursor Bugbot for commit 5355ef7. This will update automatically on new commits. Configure here.