You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/10 02:31:13 UTC

[I] [Bug] Proxy gRPC telemetry maps invalid language metadata to INTERNAL [rocketmq]

Aias00 opened a new issue, #10890:
URL: https://github.com/apache/rocketmq/issues/10890

   ### Runtime platform environment
   All platforms; reproduced by a unit test on the current `develop` branch.
   
   ### RocketMQ version
   `develop` at `e3458616d207ee636b1762f0f8dcf788a590d59d`.
   
   ### Describe the Bug
   `ContextInitPipeline` copies the client-controlled gRPC `language` metadata into `ProxyContext` without validation. `ClientActivity` later calls `LanguageCode.valueOf(ctx.getLanguage())` while registering producer and consumer channels.
   
   An unknown language therefore throws `IllegalArgumentException`. The telemetry exception handler converts it to gRPC `INTERNAL`, so malformed client input is reported as a server failure.
   
   ### Steps to Reproduce
   1. Create a producer `Settings` telemetry command.
   2. Set the context language to `UNKNOWN_LANGUAGE`.
   3. Submit it to `ClientActivity.telemetry`.
   4. Observe gRPC status `INTERNAL`.
   
   ### Expected Behavior
   Invalid or missing language metadata is rejected as a client-input error (`INVALID_ARGUMENT`) before channel registration.
   
   ### Actual Behavior
   The request receives `INTERNAL`.
   
   ### Proposed Fix
   Centralize `LanguageCode` parsing in `ClientActivity`, convert invalid values to `GrpcProxyException` with a bad-request code, and add regression coverage for the telemetry path.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Proxy gRPC telemetry maps invalid language metadata to INTERNAL [rocketmq]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 commented on issue #10890:
URL: https://github.com/apache/rocketmq/issues/10890#issuecomment-5235425772

   Verified on `develop` at `e3458616d207ee636b1762f0f8dcf788a590d59d` (before the proposed fix).
   
   ### Steps to reproduce
   1. Create a gRPC telemetry context whose `language` metadata is an unknown value, for example `NOT_A_LANGUAGE`.
   2. Invoke `ClientActivity.heartbeat(...)` (the added `ClientActivityTest#testInvalidLanguageIsReportedAsInvalidArgument` does this deterministically).
   
   ### Expected behavior
   Invalid client metadata is rejected as a client-input error: `Code.BAD_REQUEST`, which the gRPC layer maps to `INVALID_ARGUMENT`.
   
   ### Actual behavior
   `LanguageCode.valueOf(ctx.getLanguage())` throws `IllegalArgumentException`. It is not translated to `GrpcProxyException`, so the gRPC layer returns `INTERNAL`.
   
   ### Evidence
   The regression test failed against the commit above with: `expected:<INVALID_ARGUMENT> but was:<INTERNAL>`. PR #10891 adds the reproducer and translates blank/unsupported language metadata to `Code.BAD_REQUEST`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Proxy gRPC telemetry maps invalid language metadata to INTERNAL [rocketmq]

Posted by "Aias00 (via GitHub) via commits" <co...@rocketmq.apache.org>.
Aias00 closed issue #10890: [Bug] Proxy gRPC telemetry maps invalid language metadata to INTERNAL
URL: https://github.com/apache/rocketmq/issues/10890


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Proxy gRPC telemetry maps invalid language metadata to INTERNAL [rocketmq]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #10890:
URL: https://github.com/apache/rocketmq/issues/10890#issuecomment-5246065887

   Thank you for the detailed verification, @Aias00! The test evidence clearly confirms that invalid language metadata throws `IllegalArgumentException` instead of being translated to `INVALID_ARGUMENT`.
   
   I see that PR #10891 already addresses this with proper error code translation and a regression test. Since a fix is already in progress, I will not generate a duplicate PR.
   
   **Status:** Fix in progress via PR #10891 — closing the loop on this evaluation.
   
   ---
   *Automated follow-up by RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Proxy gRPC telemetry maps invalid language metadata to INTERNAL [rocketmq]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #10890:
URL: https://github.com/apache/rocketmq/issues/10890#issuecomment-5235417601

   **Issue Evaluation**
   
   Category: `bug` | Status: **Needs Verification**
   
   Thank you for reporting this issue. To help verify and fix it, please provide:
   - [ ] Version/tag where this occurs
   - [ ] Steps to reproduce
   - [ ] Expected vs actual behavior
   - [ ] Relevant logs or stack traces
   
   ---
   *Automated evaluation by github-manager-bot*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org