Replace the invalid notIn filter in Fathom media reconciliation
Merged
EH
2d ago+95+95+01234567890123456789-13-13-01234567890123456789
The daily Fathom media reconciliation has failed on every run since #25434. On prod it accounts for 624 of the 647 failed Fathom runs over the last 7 days, across all 26 workspaces that run it (1.0.1 and 1.1.0), which put the app's failed-run rate at 52%.
Filter
- Record filters have no
notInoperator, so the server rejected the query withOperator "notIn" is not valid for field "connectedAccountId" of type TEXT. The disconnected-account clause is nownot: { connectedAccountId: { in: activeConnectedAccountIds } }, nested inside thefathomRecordingImportsrelation filter so it keeps its meaning: some import belongs to an account that is no longer connected. - An empty
inrendersIN (), which Postgres rejects. With no active connection every import with an account counts as disconnected, so onlyconnectedAccountId is NOT_NULLstays.
Validation
- New
stale-media-imports.integration-test.tsrunsfindStaleFathomMediaImportsagainst a real server with no account connected, another account connected, and the import's own account connected. yarn typecheck,yarn lint,yarn test:unit(211 passed).- Integration suite not run locally; CI runs it.