Qianlin1455 opened a new pull request, #1605:
URL: https://github.com/apache/dubbo-admin/pull/1605

   **Please provide a description of this PR:**
   
   ### Summary
   
   Implements **Module 2: Generic Invoke Wire Contract and API Validation** of 
apache/dubbo-go#3742.
   
   This PR aligns the Dubbo Admin generic invocation request validation with 
the Dubbo-Go wire contract and provides structured API errors for invalid 
arguments.
   
   ### Changes
   
   - Resolve method signatures and parameter types from provider metadata, 
rejecting unknown overload signatures.
   - Validate argument counts and decode JSON arguments according to their Java 
parameter types before initiating RPC calls.
   - Verify the Dubbo generic invocation contract: `[methodName, types, args]`.
   - Verify Triple non-IDL raw argument handling, including the reply argument 
and unary call semantics.
   - Normalize non-positive `timeoutMs` values to the existing 3000 ms default 
and propagate request attachments.
   - Return structured HTTP validation errors with `code`, `message`, `field`, 
`expected`, and `actual`.
   - Add unit tests, HTTP handler tests, wire-contract tests, and opt-in 
cross-language E2E tests.
   
   Parameter types are derived from trusted provider metadata rather than 
supplied independently by the HTTP client.
   
   ### Verification
   
   **Unit and handler tests**
   
   ```bash
   go test ./pkg/console/model ./pkg/console/service ./pkg/console/handler 
-count=1 -timeout 120s
   ```
   
   All three packages passed.
   
   **Cross-language E2E**
   
   Verified against a Java Dubbo 3.3.6 provider using:
   
   - Dubbo protocol on port 20880.
   - Triple protocol on port 50051.
   - SDK-level and Service-level generic invocation.
   - HTTP Handler → Service → Java Provider invocation.
   
   Both protocols successfully invoked `example.EchoService.echo("hello")` and 
returned `"hello"`.
   
   Additional validation confirmed:
   
   - Default timeout configuration of 3000 ms.
   - Attachment `traceId=abc` received by the Java provider over both protocols 
(`traceid` on Triple due to HTTP/2 key normalization).
   - Structured errors for argument count mismatches, invalid parameter types, 
missing required fields, and unknown signatures.
   - Invalid arguments rejected before RPC invocation.
   - Positive and negative argument decoding boundary tests.
   
   ### Scope
   
   This PR focuses on generic invocation wire contracts and request validation. 
It does not introduce streaming support or change the RPC retry policy.
   
   **To help us figure out who should review this PR, please put an X in all 
the areas that this PR affects.**
   
   - [ ] Docs
   - [ ] Installation
   - [ ] User Experience
   - [ ] Dubboctl
   - [x] Console
   - [ ] Core Component
   
   **Please check any characteristics that apply to this pull request.**
   
   Includes additional unit, integration, and opt-in cross-language E2E 
coverage.
   
   Refs: apache/dubbo-go#3742 (Module 2 only)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to