Fix BladeBridge crash on large DataStage XML files (>100MB)#2364
Open
xsergiolpx wants to merge 1 commit intodatabrickslabs:mainfrom
Open
Fix BladeBridge crash on large DataStage XML files (>100MB)#2364xsergiolpx wants to merge 1 commit intodatabrickslabs:mainfrom
xsergiolpx wants to merge 1 commit intodatabrickslabs:mainfrom
Conversation
Add patch script and documentation for issue databrickslabs#2097. The BladeBridge plugin's dbxconv binary receives the output directory as a relative path via the -n flag. For large XML files with hundreds of jobs, the binary recursively nests that directory name, creating transpiled/transpiled/transpiled/... until the path exceeds the OS limit (errno 63: File name too long). Fix: pass an absolute path to -n instead of a relative path. Validated on a 119 MB DataStage XML export (2.2M lines): - Without patch: crashes after ~69 min - With patch: completes successfully, 425 files generated, 0 errors Relates to databrickslabs#2097 Co-authored-by: Isaac
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dbxconvbinary receives the output directory as a relative path via the-nflag. For large XML files with hundreds of jobs, the binary recursively nests that directory name (transpiled/transpiled/transpiled/...) until the path exceeds the OS limit (OSError: [Errno 63] File name too long)-ninstead of a relative pathFiles Added
scripts/patch_bladebridge_large_xml.sh— Idempotent patch script that modifies the installed BladeBridge plugin (transpiler.pyline 203:str(transpiled_dir.relative_to(workdir))→str(transpiled_dir.absolute()))docs/bladebridge_large_xml_fix.md— Root cause analysis, manual fix instructions, and validation resultsWhy a patch script (not a direct code change)
The fix is in
databricks/labs/bladebridge/transpiler.py, which lives in the BladeBridge plugin (databricks-bb-pluginPyPI package, source:databrickslabs/bladerunner). Since that repo is private and the plugin is distributed as a compiled wheel, this PR provides a post-install patch script. The proper fix should be applied in the bladerunner repo.Root cause
The
dbxconvbinary receives the output directory via-nas a relative path (e.g.,-n transpiled). For large XML files, the binary resolves this path relative to its own output on every internal write, creating recursive nesting. We verified this is not a name collision — renaming the directory tobb_outputproducedbb_output/bb_output/bb_output/...instead. Passing an absolute path prevents the recursion entirely.Validation
Tested on a DataStage XML export (119 MB, 2.2M lines, DataStage 11.5):
OSError: [Errno 63]Test plan
Resolves #2097