Repository navigation
Fix Import Dataset preview error display (Addresses #17985) - #18017
Conversation
The readr CSV preview subprocess occasionally fails to start on Windows CI,
but the frontend never displayed the error message because
DataImportPreviewResponse.getErrorMessage() assumed the error message was
always a JavaScript array and called .join(' ') on it. When the C++ backend
returned a string (the common case for subprocess failures), this threw a
TypeError and the error was silently swallowed.
Changes:
- DataImportPreviewResponse.java: Handle both string and array error
messages defensively using instanceof Array check
- DataImportAssembleResponse.java: Apply the same defensive fix for
consistency
- SessionData.cpp: Always return error messages as arrays and include
both the primary message and any stderr output
- import_dataset.test.ts: Check for error indicators early to fail fast
with diagnostics instead of waiting 45s for a timeout
385b3f8 to
b40df2b
Compare
🍎 macOS Desktop E2E · ARM64❌ 1 test(s) failed
📥 Download Playwright report⬇️ playwright-report.zip — extract and open
2 shards · macos-26 ARM64 · commit |
🪟 Windows Desktop E2E · Server 2025 x64✅ All tests passed!
📥 Download Playwright report⬇️ playwright-report.zip — extract and open
2 shards · Windows Server 2025 x64 · commit |
Code review findingsActionable items from an automated multi-agent review. Strengths, dismissed findings, and ratings are omitted. The core fix is correct for every backend message shape — the items below are in the test and comments, plus one C++ message-quality nit. Important
Suggestions
|
- add DataImportPreviewResponseTests covering string/array/missing shapes - retarget e2e diagnostic to the top-level Error dialog; cancel before skip - prefer captured stderr over the generic message in continuationWithError - clarify the always-array invariant in the overlay getErrorMessage comments
Addresses #17985.
Problem
The readr CSV preview subprocess occasionally fails to start on Windows CI. While the underlying cause of the subprocess failure is still under investigation, the frontend had a bug that prevented error messages from being displayed when the subprocess failed.
Root Cause
DataImportPreviewResponse.getErrorMessage()assumed the error message was always a JavaScript array and calledjoin(' ')on it. When the C++ backend returned a string (the common case for subprocess failures like"Operation finished with error code."), this threw aTypeError: String.prototype.join is not a functionand the error was silently swallowed.As a result:
Changes
Frontend (GWT/Java)
instanceof ArraycheckBackend (C++)
Tests
Note
This fix ensures errors are properly displayed when the preview subprocess fails, but does not address the underlying cause of the subprocess startup failures on Windows CI. That investigation continues separately.