Repository navigation
fix(dashboard): order ListDashboards newest-first by default - #1298
Conversation
DashboardsListPage requests a single page of up to 100 dashboards without pagination controls and filters them client-side. Because dashboardsTableView omitted OrderByFieldsWithSortDirection, ListDashboards defaulted to ordering by primary key (dashboard_id ASC). Once the shared nightly environment accumulated more than 100 dashboards across runs, newly created dashboards such as exp_<xid>_overview sorted after older exp_<lower_xid>_* entries with smaller leading digits (e.g. exp_1*..exp_77*) and were truncated from the 100-item response, causing the Metrics Dashboard UI E2E test to fail with a missing row in /dashboards. Set OrderByFieldsWithSortDirection on dashboardsTableView to order by created DESC with dashboard_id ASC as a deterministic tie-breaker so recently created dashboards are returned first. Refs #1296
There was a problem hiding this comment.
Code Review
This pull request introduces default ordering by creation time (descending) and dashboard ID (ascending) to the dashboard schema, and updates the test suite to verify this ordering. Feedback highlights a potential performance issue where sorting by the non-indexed CreatedTableField could trigger expensive full table scans and top-N sorts in Spanner, recommending the use of a secondary index instead.
|
grain has stopped watching #1298. Task 4790 is closed, and grain only ever merges a pull request belonging to a task that completed -- so it will not merge this one, will not update it, and will not look at it again. Nothing has been done to the branch: the commits are real work, and grain closes a pull request only when whoever closes its task asks for that in the same breath. #1298 is still open for a human to merge or close by hand, and reopening task 4790 is what puts it back under grain's watch. |
1 similar comment
|
grain has stopped watching #1298. Task 4790 is closed, and grain only ever merges a pull request belonging to a task that completed -- so it will not merge this one, will not update it, and will not look at it again. Nothing has been done to the branch: the commits are real work, and grain closes a pull request only when whoever closes its task asks for that in the same breath. #1298 is still open for a human to merge or close by hand, and reopening task 4790 is what puts it back under grain's watch. |
…ering Document the default ordering override on dashboardsTableView and exercise multi-page pagination under the default newest-first order (empty orderBy) in TestListDashboards_Pagination. TAG=agy CONV=07d92817-86db-4f94-be39-143d8bb7dd96
There was a problem hiding this comment.
🤖 Incremental PR Approval
PR author is a code owner and changes since last approval (2 lines, excluding 81 test file lines) are within the 50-line grace delta.
Preserving prior approval by @VLukiantsev on commit 8469519.
fix(dashboard): order ListDashboards newest-first by default
DashboardsListPage requests a single page of up to 100 dashboards without
pagination controls and filters them client-side. Because dashboardsTableView
omitted OrderByFieldsWithSortDirection, ListDashboards defaulted to ordering
by primary key (dashboard_id ASC). Once the shared nightly environment
accumulated more than 100 dashboards across runs, newly created dashboards
such as exp_overview sorted after older exp<lower_xid>_* entries with
smaller leading digits (e.g. exp_1*..exp_77*) and were truncated from the
100-item response, causing the Metrics Dashboard UI E2E test to fail with a
missing row in /dashboards.
Set OrderByFieldsWithSortDirection on dashboardsTableView to order by
created DESC with dashboard_id ASC as a deterministic tie-breaker so
recently created dashboards are returned first.
Refs #1296
Automated change for grain task 4790.