-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http json params to grpc service have discarded some params when using grpc transcode #5591
Comments
@xiaokunliu Please provide more details like your APISIX version, the Route and Upstream objects you created, and if possible, providing us the gRPC IDL. |
ok, my problem is in my IDL, the repeated type filed could not using json array to transfer grpc repeated type,like example as follow: syntax = "proto3"; message GetUserByIdResult { message User { message UserProfile { message UserAddress { // the address could not get the value from http json array. and this is my curl request |
apisix version : apache/apisix:2.10.0-alpine |
So it's OK to pass it to the backend gRPC server if the APISIX proxy is skipped? |
yes, others could pass, but address couldnt recieved, this is my backend grpc server log: {"lv":"info","ts":1637747510,"caller":"grpcserver/users.go:63","msg":"UpdateUserById,uid=1111,user=name:"uname" email:"uemail" userProfile:<uid:1111 loginName:"user" password:"user" balances:100 > tags:1 tags:2 tags:3 hobbies:"footboall" hobbies:"basketball" "} |
I also encountered this problem. array of custom objects is lost |
@xiaokunliu code bug |
Issue description
http json params to grpc service have discarded some params when using grpc transcode, this is the curl :
curl --location --request POST 'http://apisix-gateway:9080/modelConfig/updateModelMessage'
--header 'Content-Type: application/json'
--data-raw '{"type":"lightGBM","joinTableList":[{"keyCol":"user_id","keyColInCombineTable":"user_id","table":{"conditions":[],"database":"dm","tableName":"dm_home_page_user_features"}},{"keyCol":"host_id","keyColInCombineTable":"host_id","table":{"conditions":[],"database":"dm","tableName":"dm_home_page_host_features"}}],"modelId":231,"trainDayDiff":1,"partitionArrange":[20211014,20211109],"name":"model12_copy","combineTable":{"conditions":[{"col":"ct","value":"click","op":"in_str"}],"database":"dm","tableName":"dm_feedctr_explose_click_sample_uid_ddi"}}
'
grpc service could not received the joinTableList, it is empty
Environment
apisix version
):uname -a
):nginx -V
oropenresty -V
):curl http://127.0.0.1:9090/v1/server_info
to get the info from server-info API):luarocks --version
):The text was updated successfully, but these errors were encountered: