Skip to content

Commit b470887

Browse files
committed
docs: update 1c with full widget ordering fix details
1 parent 62c4789 commit b470887

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/tiered-xdist-changes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
### 1c. Fix flaky dashboard widget ordering
2222

23-
**File:** `tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py` (lines 918, 924)
23+
**File:** `tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py`
2424

25-
**What:** Added `order=2` to `widget_3` and `order=3` to `widget_4` in `OrganizationDashboardDetailsPutTest.setUp()`.
25+
**What:** Added `order=0` to `widget_1`, `order=1` to `widget_2` in the parent `OrganizationDashboardDetailsTestCase.setUp()`, and `order=2` to `widget_3`, `order=3` to `widget_4` in `OrganizationDashboardDetailsPutTest.setUp()`.
2626

27-
**Why:** `DashboardWidget.order` is `BoundedPositiveIntegerField(null=True)`. The parent class already sets `order=0` and `order=1` on `widget_1`/`widget_2`, but `widget_3`/`widget_4` were left as NULL. `ORDER BY order` with NULL values produces nondeterministic ordering in PostgreSQL, causing intermittent assertion failures on widget position.
27+
**Why:** `DashboardWidget.order` is `BoundedPositiveIntegerField(null=True)`. All four widgets were missing `order=`, leaving them as NULL. `get_widgets()` uses `ORDER BY (order, id)` — PostgreSQL's ordering of NULL values is nondeterministic (heap scan order), causing intermittent assertion failures on widget position. An initial grep for `order=` in the file found `order=0`/`order=1` at lines 70/80, but these were on `DashboardWidgetQuery` objects (queries within widgets), not on `DashboardWidget` itself.
2828

2929
### 1d. Conditional selenium plugin loading
3030

0 commit comments

Comments
 (0)