Commit 86abab2
* [#37209] Enhance serialization error messages for better DX
Improved error messages when user code fails to serialize (pickle)
for distributed execution. The original error was too technical and
didn't explain the cause or suggest fixes.
Changes:
- Enhanced RuntimeError message with clear explanation of why
serialization is required
- Added common causes (lambdas capturing file handles, DB connections,
thread locks)
- Provided three concrete fixes: module-level functions, setup()
methods, checking closure captures
- Broadened exception catching to include TypeError and other
pickling failures (not just RuntimeError)
- Added exception chaining (from e) to preserve original stack trace
- Added test case to verify the new error message content
This significantly improves developer experience when debugging
serialization issues, especially for new Apache Beam users.
Fixes #37209
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Apply yapf formatting
Fix Python formatter precommit check by applying yapf v0.43.0
formatting rules to modified files.
* [#37209] Make withBackOffSupplier public to enable bounded retry configuration
Users need to configure bounded backoff to prevent infinite retry loops. Making withBackOffSupplier public allows users to set FluentBackoff.DEFAULT.withMaxRetries(n) and control retry behavior.
Added integration test demonstrating bounded retry with maxRetries=3.
Related to #37198, #37176
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Revert unrelated Java changes
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 966762c commit 86abab2
2 files changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
886 | | - | |
887 | | - | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
888 | 895 | | |
889 | 896 | | |
890 | 897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
166 | 185 | | |
167 | 186 | | |
168 | 187 | | |
| |||
0 commit comments