Skip to content

[Python] Improve GroupByKey coder validation errors - #39800

Merged
claudevdm merged 1 commit into
apache:masterfrom
goutamadwant:fix-gbk-coder-validation-errors
Sep 4, 2026
Merged

[Python] Improve GroupByKey coder validation errors#39800
claudevdm merged 1 commit into
apache:masterfrom
goutamadwant:fix-gbk-coder-validation-errors

Conversation

@goutamadwant

Copy link
Copy Markdown
Contributor

Summary

Improve GroupByKey coder 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:

  • Mention the appropriate issue in the description.
  • No CHANGES.md update is needed for this internal diagnostic improvement.
  • This contribution is not large, so the ICLA checklist item does not apply.

@github-actions

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@goutamadwant

Copy link
Copy Markdown
Contributor Author

retest this please

@goutamadwant

Copy link
Copy Markdown
Contributor Author

assign set of reviewers

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @claudevdm for label python.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Reminder, please take a look at this pr: @claudevdm

@claudevdm
claudevdm merged commit 2abc3fb into apache:master Sep 4, 2026
98 of 99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Error message for group by coders validation in portable local runner is misleading.

2 participants