[Python] Improve GroupByKey coder validation errors - #39800
Merged
claudevdm merged 1 commit intoSep 4, 2026
Conversation
Closed
15 tasks
Contributor
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
Contributor
Author
|
retest this please |
Contributor
Author
|
assign set of reviewers |
Contributor
|
Assigning reviewers: R: @claudevdm for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Contributor
|
Reminder, please take a look at this pr: @claudevdm |
claudevdm
approved these changes
Sep 4, 2026
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
Improve
GroupByKeycoder validation errors by reporting the specific mismatched coder IDs or invalid output coder URN.The previous validation combined three conditions into one error and passed its formatting arguments in the wrong order. This change gives each condition a focused message and adds regression coverage for valid coders, mismatched key coders, non-iterable output coders, and mismatched value coders.
Fixes #27929
Testing
pytest -q sdks/python/apache_beam/runners/pipeline_utils_test.py(8 passed)pytest -q sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner_test.py::FnApiRunnerTest::test_group_by_key(1 passed)Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
CHANGES.mdupdate is needed for this internal diagnostic improvement.