Skip to content

Add missing config sections to migration guide, fix testing codec#64

Merged
gmr merged 1 commit intomainfrom
fix/migration-docs-and-testing-codec
Apr 4, 2026
Merged

Add missing config sections to migration guide, fix testing codec#64
gmr merged 1 commit intomainfrom
fix/migration-docs-and-testing-codec

Conversation

@gmr
Copy link
Copy Markdown
Owner

@gmr gmr commented Apr 4, 2026

Summary

  • Migration guide: Added missing configuration change documentation for the 3.x → 4.0 migration — connection ssl/frame_max/socket_timeout fields, SSL protocol default change to PROTOCOL_TLS_CLIENT, influxdb_measurement consumer field removal, debug_only logging handler removal, -n/--max-messages CLI flag, and SIGHUP config reload
  • Testing codec fix: AsyncTestCase.process_message was not running codec.decode before consumer.execute, so consumers under test received raw JSON strings instead of decoded dicts. Now matches process.py message flow including raw_body preservation

Test plan

  • All 208 tests pass
  • Pre-commit (ruff format + ruff check) passes
  • Verify migration guide renders correctly with mkdocs serve
  • Write a test that explicitly asserts self.body is a dict (not a string) after process_message with a JSON body

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated migration guide for version 4.0 with breaking configuration changes, including SSL setup, removed fields (influxdb_measurement, debug_only), and new optional connection fields.
    • Added CLI option documentation for maximum message limits.
    • Documented configuration reload capability via SIGHUP.
  • Tests

    • Enhanced message handling with UTF-8 encoding and codec decode error handling in test utilities.

The migration guide was missing several configuration changes between
3.x and 4.0: connection ssl/frame_max/socket_timeout fields, SSL
protocol default change, influxdb_measurement removal, debug_only
logging handler removal, new --max-messages CLI flag, and SIGHUP
reload support.

AsyncTestCase.process_message was not running the codec decode step
before calling consumer.execute, so consumers under test received raw
JSON strings instead of decoded dicts. Now matches the process.py
message flow by running codec.decode and setting raw_body.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ccd47f70-3176-4170-989a-3cb9c65945ef

📥 Commits

Reviewing files that changed from the base of the PR and between 34ffe5e and 7333431.

📒 Files selected for processing (2)
  • docs/migrating.md
  • rejected/testing.py

📝 Walkthrough

Walkthrough

Documentation for version 4.0 migration is expanded with explicit SSL configuration guidance, new connection options (frame_max, socket_timeout), CLI documentation (-n/--max-messages), and removal of deprecated fields (influxdb_measurement, debug_only). Testing utilities are enhanced with UTF-8 encoding for string message bodies and codec-based message decoding with error handling.

Changes

Cohort / File(s) Summary
Migration Documentation
docs/migrating.md
Expanded migration guide documenting breaking changes for 4.0: explicit ssl: <boolean> configuration with PROTOCOL_TLS_CLIENT default and certificate verification, new connection fields (frame_max, socket_timeout), removal of influxdb_measurement and debug_only options, new CLI option -n/--max-messages N, and SIGHUP-based configuration reload behavior.
Testing Utilities
rejected/testing.py
Enhanced message handling in test helpers: UTF-8 encoding for string message bodies in create_context, codec-based message body decoding in process_message with proper error handling for DecodeError exceptions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 SSL toggles now explicit and clear,
New fields for sockets we hold dear,
Codecs decode with a hop and a bound,
Four-point-oh changes, safe and sound! 🔒✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the two main changes: expanding migration documentation and fixing testing codec behavior.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/migration-docs-and-testing-codec

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gmr gmr merged commit 4254d70 into main Apr 4, 2026
6 checks passed
@gmr gmr deleted the fix/migration-docs-and-testing-codec branch April 4, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant