Skip to content

test: Add regression tests for protobuf >= 7.34.0 compatibility (#6435)#6450

Merged
ntkathole merged 1 commit into
feast-dev:masterfrom
Jwrede:fix/protobuf-float-precision
May 29, 2026
Merged

test: Add regression tests for protobuf >= 7.34.0 compatibility (#6435)#6450
ntkathole merged 1 commit into
feast-dev:masterfrom
Jwrede:fix/protobuf-float-precision

Conversation

@Jwrede

@Jwrede Jwrede commented May 29, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds regression tests to guard against reintroduction of the float_precision kwarg usage that was removed in PR #6015. The MessageToDict(float_precision=...) call caused feature_server.py to crash on protobuf >= 7.34.0 (see #6435). While the fix landed in #6015, there were no tests preventing reintroduction.

Two tests added:

  • test_no_message_to_dict_dependency -- patches MessageToDict to raise if called, proving convert_response_to_dict is independent of it
  • test_double_precision_without_float_precision_kwarg -- verifies doubles (including edge cases like very small and very large values) round-trip correctly without the removed parameter

Which issue(s) this PR fixes:

Fixes #6435

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests

@Jwrede Jwrede requested a review from a team as a code owner May 29, 2026 05:52
@Jwrede Jwrede changed the title test: add regression tests for protobuf >= 7.34.0 compatibility (#6435) test: Add regression tests for protobuf >= 7.34.0 compatibility (#6435) May 29, 2026
…t-dev#6435)

PR feast-dev#6015 replaced MessageToDict with a custom dict builder in
feature_server.py, which incidentally fixed the crash caused by the
removed float_precision kwarg in protobuf >= 7.34.0.

Add explicit regression tests to prevent reintroduction:
- Verify convert_response_to_dict never calls MessageToDict
- Verify double precision round-trips without float_precision kwarg

Fixes feast-dev#6435

Assisted-by: Claude Opus 4.6
Signed-off-by: Jonathan Wrede <wrede.jonathan00@gmail.com>
@ntkathole ntkathole force-pushed the fix/protobuf-float-precision branch from fec2a08 to 02f200b Compare May 29, 2026 08:15
@ntkathole ntkathole merged commit a6a2a81 into feast-dev:master May 29, 2026
21 of 25 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.

feature_server.py crashes with TypeError: MessageToDict() got an unexpected keyword argument 'float_precision' on protobuf >= 7.34.0

2 participants