Repository navigation
Commit 91a64ff
fix(kernel): decode a failed async status poll into the driver error (#608)
* fix(kernel): decode a failed async status poll into the driver error
On a runAsync: true statement, waitUntilReady() and status() awaited the napi AsyncStatement.status() without decodeNapiKernelError, so a failed poll (for example, retries exhausted on HTTP 500) reached the caller as a raw Error whose message is the __databricks_error__:{...} envelope. Decode it like the other napi calls.
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
* test(kernel): assert the decoded poll error keeps its metadata; widen changelog scope
The unit test now also checks kernelMetadata.httpStatus and the bounded cause. The changelog notes that a default execution that outlives the server's inline wait polls the same status() and was affected too, and adds the PR number.
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
* fix(kernel): decode a failed batch fetch in hasMore() too
hasMore() prefetches the next batch through the napi fetchNextBatch(), so when hasMoreRows() runs before the first fetch, a failed fetch reached the caller as the raw __databricks_error__:{...} envelope. Handle it like fetchChunk(): best-effort close the wedged statement, then throw the decoded error. Both paths now share one helper.
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
---------
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>1 parent 2037efd commit 91a64ff
3 files changed
Lines changed: 100 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 333 | + | |
354 | 334 | | |
355 | 335 | | |
356 | 336 | | |
357 | 337 | | |
358 | 338 | | |
359 | | - | |
360 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
361 | 346 | | |
362 | 347 | | |
363 | 348 | | |
| |||
426 | 411 | | |
427 | 412 | | |
428 | 413 | | |
429 | | - | |
| 414 | + | |
430 | 415 | | |
431 | 416 | | |
432 | 417 | | |
| |||
624 | 609 | | |
625 | 610 | | |
626 | 611 | | |
627 | | - | |
| 612 | + | |
628 | 613 | | |
629 | 614 | | |
630 | 615 | | |
| |||
721 | 706 | | |
722 | 707 | | |
723 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
724 | 722 | | |
725 | 723 | | |
726 | 724 | | |
| |||
735 | 733 | | |
736 | 734 | | |
737 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
738 | 745 | | |
739 | 746 | | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
744 | 751 | | |
745 | | - | |
| 752 | + | |
746 | 753 | | |
747 | 754 | | |
748 | 755 | | |
749 | 756 | | |
750 | 757 | | |
751 | 758 | | |
752 | | - | |
| 759 | + | |
753 | 760 | | |
754 | 761 | | |
755 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
| 127 | + | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
| |||
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
139 | 145 | | |
140 | 146 | | |
141 | 147 | | |
| |||
1465 | 1471 | | |
1466 | 1472 | | |
1467 | 1473 | | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
1468 | 1529 | | |
1469 | 1530 | | |
1470 | 1531 | | |
| |||
0 commit comments