CAICAIIs opened a new pull request, #186: URL: https://github.com/apache/dubbo-go-pixiu-samples/pull/186
**What this PR does**: Adds `dubbogo/simple/generic`, an end-to-end sample for the generic invocation mode added in apache/dubbo-go-pixiu#1054. It starts one non-IDL Triple provider (`com.dubbogo.pixiu.GenericGreeter` with `SayHello` and `GetUser`) without any registry, and configures Pixiu with two direct `tri://127.0.0.1:20001` routes: - `/api/v1/generic/map` uses `generic: "true"`: the request carries a typed argument list (`types` and `values`), and the JSON-encoded string result comes back as `"Hello pixiu"`. - `/api/v1/generic/gson` uses `generic: gson`: the whole request message travels as JSON text and the provider's JSON text is written back verbatim, without a second encoding (the test reads `id`, `code`, `name`, `age`). `integrate_test.sh` now resolves the samples root through git and passes `-C "$P_DIR"` to make. A sample that is its own Go module makes `go env GOMOD` point at the sample directory, and the build and test steps then need to run inside that directory so they use the sample's own `go.mod`. **Which issue(s) this PR fixes**: Related: apache/dubbo-go-pixiu#1054, apache/dubbo-go-pixiu#709, apache/dubbo-go-pixiu#918 **Special notes for your reviewer**: - This is a draft because the sample uses `integrationRequest.generic`, which arrives with apache/dubbo-go-pixiu#1054. Pixiu `develop` does not have that field yet, so the Samples Integration Test job of this PR fails on this sample until #1054 merges. Merge order: #1054 first, then this PR. - The sample is a separate Go module. gson mode needs the pointer handling that is in `dubbo-go v3.3.2-20260910`; the root module pins `v3.3.2-20260419`, whose generalizer returns a pointer type that the provider's reflection call rejects. A repository-wide bump is not possible today: `v3.3.2-20260910` removes the `dubbo.apache.org/dubbo-go/v3/config` package that `github.com/apache/dubbo-go-pixiu v1.1.0` (used by the `shutdown/*` samples) still imports. - Verified locally: `./integrate_test.sh dubbogo/simple/generic` passes both cases (`TestMapMode`, `TestGsonMode`), and building a root-module sample (`dubbogo/simple/body`) still works with the new `-C "$P_DIR"`. - `gofmt -s` and the license headers are clean, and the imports use the repository's two-block layout. **Does this PR introduce a user-facing change?**: ```release-note Add a sample for direct generic invocation over Triple with a configurable generic mode. ``` -- 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]
