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. |
|
|
|
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. |
There was a problem hiding this comment.
Pull request overview
This PR updates the project_insights Tinybird pipe to support additional filtering and list-style query behaviors (sorting + pagination), expanding how project insights can be retrieved and presented in the application.
Changes:
- Adds an
isLfxfilter parameter intended to filter projects by LFX/LF status. - Adds ordering support via
orderByField+orderByDirection. - Adds pagination via
pageSize+page(LIMIT/OFFSET).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - `isLfx`: Optional integer (1 = LFX, 0 = non-LFX) to filter by LFX project status | ||
| - `orderByField`: Optional string specifying sort field, defaults to 'name' | ||
| - `orderByDirection`: Optional string ('asc' or 'desc'), defaults to 'asc' | ||
| - `pageSize`: Optional integer for result limit, defaults to 10 | ||
| - `page`: Optional integer for pagination offset calculation, defaults to 0 |
| ORDER BY | ||
| {{ column(String(orderByField, "name", description="Order by field.", required=False)) }} | ||
| {% if String( |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| {% end %}, | ||
| name ASC | ||
| LIMIT {{ Int32(pageSize, 10) }} | ||
| OFFSET {{ Int32(page, 0) * Int32(pageSize, 10) }} |
There was a problem hiding this comment.
Default LIMIT silently truncates previously unlimited query results
High Severity
Adding LIMIT 10 (default) and OFFSET 0 to a query that previously returned all matching rows is a silent breaking change. Any existing caller passing more than 10 values in slugs or ids will now receive only the first 10 results without any indication of truncation. Since this is a Tinybird API endpoint (_endpoint node), external consumers won't be aware they need to start paginating to get complete results.


Note
Medium Risk
Changes query semantics for
project_insights.pipeby adding optional LFX filtering plus dynamic sorting/pagination, which can affect API result ordering and returned subsets. Risk is moderate since it’s read-only analytics SQL but touches a shared endpoint used by widgets/insights.Overview
Extends
project_insights.pipeto support optional filtering by LFX status via a newisLfxparameter.Adds configurable
ORDER BY(field + direction) plusLIMIT/OFFSETpagination parameters (pageSize,page), defaulting to name-ascending ordering with a secondaryname ASCtie-breaker.Written by Cursor Bugbot for commit bcdef17. This will update automatically on new commits. Configure here.