Skip to content

[Python] Improve GroupByKey coder validation errors - #39800

Open
goutamadwant wants to merge 1 commit into
apache:masterfrom
goutamadwant:fix-gbk-coder-validation-errors
Open

[Python] Improve GroupByKey coder validation errors#39800
goutamadwant wants to merge 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

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.

1 participant