Skip to content

refactor(server): replace ServerCommand enum and binary mapper with wire types#3027

Merged
hubcio merged 1 commit intomasterfrom
refactor-binary-6-server-integration
Mar 26, 2026
Merged

refactor(server): replace ServerCommand enum and binary mapper with wire types#3027
hubcio merged 1 commit intomasterfrom
refactor-binary-6-server-integration

Conversation

@hubcio
Copy link
Copy Markdown
Contributor

@hubcio hubcio commented Mar 25, 2026

Server binary handlers duplicated wire format logic from
iggy_binary_protocol. Replace request decoding (ServerCommand
enum + enum_dispatch + BytesSerializable) with direct WireDecode
dispatch, and response encoding (mapper.rs) with WireEncode on
wire response types. Handlers become standalone async functions.

Fix CreateUserRequest/UpdatePermissionsRequest wire format:
perm_len was written unconditionally but iggy_common only
writes it when has_permissions == 1.

Deleted: command.rs, macros.rs, mapper.rs, handlers/utils.rs,
enum_dispatch dependency.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 83.25893% with 225 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.78%. Comparing base (38e392a) to head (35892b4).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
core/server/src/binary/dispatch.rs 85.08% 12 Missing and 42 partials ⚠️
core/server/src/websocket/connection_handler.rs 54.34% 20 Missing and 1 partial ⚠️
...er/src/binary/handlers/system/get_stats_handler.rs 80.70% 9 Missing and 2 partials ⚠️
...rs/consumer_offsets/get_consumer_offset_handler.rs 72.22% 2 Missing and 8 partials ⚠️
core/server/src/quic/listener.rs 59.09% 7 Missing and 2 partials ⚠️
core/server/src/tcp/connection_handler.rs 71.87% 8 Missing and 1 partial ⚠️
...lers/consumer_groups/get_consumer_group_handler.rs 78.37% 1 Missing and 7 partials ⚠️
...ers/consumer_groups/get_consumer_groups_handler.rs 71.42% 2 Missing and 6 partials ⚠️
...consumer_offsets/delete_consumer_offset_handler.rs 65.21% 1 Missing and 7 partials ⚠️
...ccess_tokens/get_personal_access_tokens_handler.rs 65.21% 3 Missing and 5 partials ⚠️
... and 19 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3027      +/-   ##
============================================
- Coverage     72.14%   71.78%   -0.36%     
  Complexity      930      930              
============================================
  Files          1120     1117       -3     
  Lines         93489    93031     -458     
  Branches      70838    70391     -447     
============================================
- Hits          67445    66782     -663     
- Misses        23475    23632     +157     
- Partials       2569     2617      +48     
Components Coverage Δ
Rust Core 72.42% <83.25%> (-0.46%) ⬇️
Java SDK 62.08% <ø> (ø)
C# SDK 67.43% <ø> (-0.21%) ⬇️
Python SDK 81.43% <ø> (ø)
Node SDK 91.40% <ø> (ø)
Go SDK 38.68% <ø> (ø)
Files with missing lines Coverage Δ
...inary_protocol/src/requests/system/get_snapshot.rs 100.00% <100.00%> (ø)
..._protocol/src/requests/users/update_permissions.rs 95.91% <100.00%> (-0.99%) ⬇️
...y/handlers/cluster/get_cluster_metadata_handler.rs 100.00% <100.00%> (+10.52%) ⬆️
...s/consumer_groups/create_consumer_group_handler.rs 100.00% <100.00%> (+10.52%) ⬆️
...s/consumer_groups/delete_consumer_group_handler.rs 100.00% <100.00%> (+10.52%) ⬆️
...ers/consumer_groups/join_consumer_group_handler.rs 100.00% <100.00%> (+10.52%) ⬆️
...rs/consumer_groups/leave_consumer_group_handler.rs 100.00% <100.00%> (+10.52%) ⬆️
.../binary/handlers/messages/send_messages_handler.rs 100.00% <100.00%> (ø)
...y/handlers/partitions/create_partitions_handler.rs 100.00% <100.00%> (+10.52%) ⬆️
...y/handlers/partitions/delete_partitions_handler.rs 100.00% <100.00%> (+10.52%) ⬆️
... and 51 more

... and 48 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hubcio hubcio force-pushed the refactor-binary-6-server-integration branch from c0fc5c0 to ac31fe9 Compare March 25, 2026 10:13
…ire types

Server binary handlers duplicated wire format logic from
iggy_binary_protocol. Replace request decoding (ServerCommand
enum + enum_dispatch + BytesSerializable) with direct WireDecode
dispatch, and response encoding (mapper.rs) with WireEncode on
wire response types. Handlers become standalone async functions.

Fix CreateUserRequest/UpdatePermissionsRequest wire format:
perm_len was written unconditionally but iggy_common only
writes it when has_permissions == 1.

Deleted: command.rs, macros.rs, mapper.rs, handlers/utils.rs,
enum_dispatch dependency.
@hubcio hubcio force-pushed the refactor-binary-6-server-integration branch from ac31fe9 to 35892b4 Compare March 26, 2026 11:41
@hubcio hubcio merged commit f8be024 into master Mar 26, 2026
79 checks passed
@hubcio hubcio deleted the refactor-binary-6-server-integration branch March 26, 2026 15:38
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.

3 participants