bvolpato opened a new pull request, #39992: URL: https://github.com/apache/beam/pull/39992
A runner-reported append or clear failure can currently complete a Python bundle successfully because runtime state commits ignore `StateResponse.error`. A clear followed by an append also loses the clear response. Check every pending write response before completing bag, set, and ordered-list state commits, and preserve both futures for clear-then-append. Regression tests cover failed appends and clears, multiple append chunks, set compaction, and successful commits. The new tests fail against the upstream implementation. ## Testing From `sdks/python`, with the SDK and test dependencies installed: ```sh python -m pytest apache_beam/runners/worker/bundle_processor_test.py apache_beam/runners/worker/sdk_worker_test.py -q ``` Python 3.12: 45 passed, plus 15 subtests passed. The new regression cases produced 15 failures against the unfixed implementation. YAPF 0.43.0, Ruff 0.15.22, and `git diff --check` pass for the changed files. ## Downsides Previously hidden backend failures now fail the bundle and invoke the runner's existing failure/retry handling. The successful path adds no state RPCs. Retry uses the existing runner contract that failed state handlers must not reuse their cache token. ------------------------ - [x] Describe the bug and include a reproducible regression test; no separate Python issue is linked. - [x] Update `CHANGES.md` with the behavior change. - [ ] Apache Individual Contributor License Agreement, if required for this contribution. See the [Contributor Guide](https://beam.apache.org/contribute) and [CI documentation](https://github.com/apache/beam/blob/master/CI.md). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
