You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky WorkspaceWaitingApprovalFilterTest drops wa-filter-3-last-only in CI #3972
WorkspaceWaitingApprovalFilterTest.waitingApprovalFilterFindsWorkspacesWhoseLastJobStatusIsSomethingElse fails intermittently in build-jammy, on PRs that don't touch workspace filtering. The result is missing wa-filter-3-last-only, the workspace that has lastJobStatus = waitingApproval and no job rows at all.
Run the full api test suite in CI a few times. Locally the test passes on its own and alongside OrganizationTests, WorkspaceTests and the TFE tests, so it looks order or timing dependent.
Expected behavior
The filter returns wa-filter-1-hidden, wa-filter-2-two and wa-filter-3-last-only every run.
Anything else?
One possible lead, not confirmed: wa-filter-3-last-only is the only fixture with no job rows, and something else in the context (for example a scheduled status update like the InitWorkspaceStatus "has no jobs to update status" path) may reset its lastJobStatus while the test runs. Happy to dig in further if that helps.
@alfespa17@jakegroves@Macbet tracked this down: it's JobReconciliationSweep (every 30s) repairing wa-filter-3-last-only to NeverExecuted when a tick lands between the fixture insert and the query. The failing CI log shows the sweep doing it at 21:59:00, one second before the failure. Fix is in #3973.
Activity
dhananjay6561 commentedon Nov 20, 2026
@alfespa17 @jakegroves @Macbet tracked this down: it's
JobReconciliationSweep(every 30s) repairingwa-filter-3-last-onlyto NeverExecuted when a tick lands between the fixture insert and the query. The failing CI log shows the sweep doing it at 21:59:00, one second before the failure. Fix is in #3973.dhananjay6561 commentedon Nov 21, 2026
Fixed by #4001, which disables the reconciliation sweep in the test profile so it can't rewrite this fixture mid-test.