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
DA round 1 findings on F4 (fetchAll):
H1 skip-gate (REPEAT of F2 H1): the F4 e2e imports `DBSQLClient`
from `'../../../lib'`, which transitively pulls
`SeaNativeLoader.ts`'s module-level
`require('../../native/sea/index.js')`. When the `.node` artifact
isn't built, that require throws MODULE_NOT_FOUND BEFORE mocha can
invoke `before()`, crashing test discovery. Same root cause as F2
H1, repeating the fix:
1. Skip-gate verifies the native artifact exists in `before()`,
skipping with a clear "run yarn build:native" message if absent
2. Switch the top-level `import { DBSQLClient }` to a `type`-only
import (erased at compile time) + lazy `requireFromHere` inside
the `connect()` helper via `createRequire(import.meta.url)` so
the require works under both CJS and the ESM-reparse path
mocha 11+ may use.
M1 edge tests: add two cases covering drain-twice and
drain-after-close, mirroring Thrift's `DBSQLOperation.fetchAll`
behaviour:
- drain-twice: after the first fetchAll drains the cursor to
end-of-stream, a second fetchAll on the same operation returns
an empty array (do/while body executes zero iterations, []
flattened).
- drain-after-close: fetchAll on a closed operation throws (typed
Error class). Doesn't pin the exact class because the SEA backend's
closed-state error path may surface as either an
`OperationStateError` or a kernel-envelope-decoded error
depending on whether the close had reached the facade-level
lifecycle flag or only the napi layer — both acceptable.
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
0 commit comments