Add enhanced error messages with execution context This commit implements comprehensive error reporting for DAG execution failures: Features: - New NodeExecutionError exception that wraps all execution failures - Captures the complete execution path showing which nodes were executed - Records all inputs passed to the failed node - Preserves the original exception for detailed debugging - Properly formatted error messages with visual separators - Full support for both sync and async execution - Picklable for multiprocessing support Changes: - Added NodeExecutionError class with rich context information - Updated ExecutionContext to track execution path - Modified run_sync and run_async to wrap exceptions with context - Updated all tests to work with new exception wrapping - Added comprehensive test suite for error messages - Created error_handling_example.py to demonstrate the feature All 82 tests pass, including 8 new tests for enhanced error messages.#6
Merged
JBloss1517 merged 6 commits intomainfrom Nov 11, 2025
Merged
Add enhanced error messages with execution context
This commit implements comprehensive error reporting for DAG execution failures:
Features:
- New NodeExecutionError exception that wraps all execution failures
- Captures the complete execution path showing which nodes were executed
- Records all inputs passed to the failed node
- Preserves the original exception for detailed debugging
- Properly formatted error messages with visual separators
- Full support for both sync and async execution
- Picklable for multiprocessing support
Changes:
- Added NodeExecutionError class with rich context information
- Updated ExecutionContext to track execution path
- Modified run_sync and run_async to wrap exceptions with context
- Updated all tests to work with new exception wrapping
- Added comprehensive test suite for error messages
- Created error_handling_example.py to demonstrate the feature
All 82 tests pass, including 8 new tests for enhanced error messages.#6JBloss1517 merged 6 commits intomainfrom
JBloss1517 merged 6 commits intomainfrom
Conversation
This commit implements comprehensive error reporting for DAG execution failures: Features: - New NodeExecutionError exception that wraps all execution failures - Captures the complete execution path showing which nodes were executed - Records all inputs passed to the failed node - Preserves the original exception for detailed debugging - Properly formatted error messages with visual separators - Full support for both sync and async execution - Picklable for multiprocessing support Changes: - Added NodeExecutionError class with rich context information - Updated ExecutionContext to track execution path - Modified run_sync and run_async to wrap exceptions with context - Updated all tests to work with new exception wrapping - Added comprehensive test suite for error messages - Created error_handling_example.py to demonstrate the feature All 82 tests pass, including 8 new tests for enhanced error messages.
- Use shutil.get_terminal_size() to get current terminal width - Dynamically adjust separator bars to match terminal width - Fallback to 80 columns if terminal size unavailable - Prevents ugly wrapping of error message separators
- Add proper type annotations for default_factory functions in ExecutionContext - Add type narrowing assertions in tests for NodeExecutionError - Add explicit type annotation for lines list in _format_inputs - Format code with ruff All 82 tests pass, pyright shows 0 errors, linting passes.
The type validation example now correctly expects NodeExecutionError instead of ValidationError, since all execution errors are now wrapped with execution context.
Added tests to cover: - Terminal width fallback when get_terminal_size fails - Error formatting with no inputs - Async input validation errors - Async output validation errors - Exception pickling/unpickling All 87 tests pass with 100% code coverage.
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.
No description provided.