You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/10/09 08:03:34 UTC

[GitHub] [apisix] tanjiancheng opened a new issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

tanjiancheng opened a new issue #2366:
URL: https://github.com/apache/apisix/issues/2366


   ###
   I use the `import google/api/annotations.proto` just for test 
   ```
   curl http://127.0.0.1:9080/apisix/admin/proto/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "content" : "syntax = \"proto3\";
       package helloworld;
   	import \"google/api/annotations.proto\";
       service Greeter {
           rpc SayHello (HelloRequest) returns (HelloReply) {}
       }
       message HelloRequest {
           string name = 1;
       }
       message HelloReply {
           string message = 1;
       }"
   }'
   ```
   and then return the error like this:
   ```
   2020/10/09 07:47:23 [error] 25#25: *168534 lua entry thread aborted: runtime error: /usr/local/apisix//deps/share/lua/5.1/protoc.lua:283: module load error: google/api/annotations.proto
           ./google/api/annotations.proto: No such file or directory
   stack traceback:
   coroutine 0:
           [C]: in function 'error'
           /usr/local/apisix//deps/share/lua/5.1/protoc.lua:283: in function 'parsefile'
           /usr/local/apisix//deps/share/lua/5.1/protoc.lua:447: in function 'top_parser'
           /usr/local/apisix//deps/share/lua/5.1/protoc.lua:771: in function 'f'
           /usr/local/apisix//deps/share/lua/5.1/protoc.lua:1028: in function 'do_compile'
           /usr/local/apisix//deps/share/lua/5.1/protoc.lua:1032: in function 'compile'
           /usr/local/apisix//deps/share/lua/5.1/protoc.lua:1042: in function 'load'
           /usr/local/apisix/apisix/plugins/grpc-transcode/proto.lua:46: in function 'create_obj_fun'
           /usr/local/apisix/apisix/core/lrucache.lua:134: in function 'fetch'
           /usr/local/apisix/apisix/plugins/grpc-transcode.lua:117: in function 'phase_func'
           /usr/local/apisix/apisix/init.lua:138: in function 'run_plugin'
           /usr/local/apisix/apisix/init.lua:595: in function 'grpc_access_phase'
   ```
   The actual use contains other more complex scenarios,how to support this?
   
   ### Environment
   
   * apisix version:1.5
   * OS: centos7


----------------------------------------------------------------
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.

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



[GitHub] [apisix] mehmetcuneyit commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
mehmetcuneyit commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-1069675585


   > Would be keen to see this handled eventually - it doesn't seem sustainable to have to copy proto definitions instead of imports, especially if you have several imports, or the types being imported are complex or liable to change frequently.
   
   Hi, check this out https://github.com/apache/apisix/discussions/6351 . It's been solved, for further instructions https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/grpc-transcode.md


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] nic-chen commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-706084744


   we don't support import proto yet. you can add the dependent content directly to the proto


----------------------------------------------------------------
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.

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



[GitHub] [apisix] ntyrrell commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
ntyrrell commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-1010922688


   Would be keen to see this handled eventually - it doesn't seem sustainable to have to copy proto definitions instead of imports, especially if you have several imports, or the types being imported are complex or liable to change frequently.


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] tanjiancheng commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
tanjiancheng commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-706720499


   ok,thanks


----------------------------------------------------------------
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.

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



[GitHub] [apisix] tanjiancheng closed issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
tanjiancheng closed issue #2366:
URL: https://github.com/apache/apisix/issues/2366


   


----------------------------------------------------------------
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.

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



[GitHub] [apisix] mehmetcuneyit edited a comment on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
mehmetcuneyit edited a comment on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-1069675585


   > Would be keen to see this handled eventually - it doesn't seem sustainable to have to copy proto definitions instead of imports, especially if you have several imports, or the types being imported are complex or liable to change frequently.
   
   Hi, check this out https://github.com/apache/apisix/discussions/6351 , it's been solved. According to https://github.com/apache/apisix/issues/6441#issuecomment-1053519138 , it will be released in the coming version. For further instructions https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/grpc-transcode.md


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] nic-chen commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-706530549


   > @nic-chen 
   > 
   > Do you means copy the import  content to the same file proto and use the apisix/admin/proto to put this merge proto content?
   
   
   Yes, it could be solved in this way. Proto import is quite troublesome to implement and would not be considered in the near future.


----------------------------------------------------------------
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.

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



[GitHub] [apisix] membphis commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-706053507


   @nic-chen do you know how to resolve this issue?


----------------------------------------------------------------
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.

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



[GitHub] [apisix] tanjiancheng commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
tanjiancheng commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-706521858


   @nic-chen 
   Do you means copy the import  content to the same file proto and use the apisix/admin/proto to put this merge proto content?


----------------------------------------------------------------
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.

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



[GitHub] [apisix] nic-chen commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-706084744


   we don't support import proto yet. you can add the dependent content directly to the proto


----------------------------------------------------------------
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.

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



[GitHub] [apisix] lizitao-sys commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
lizitao-sys commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-864512833


   > ok,thanks
   
   Hello, have you solved this problem? How did it work?


-- 
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.

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



[GitHub] [apisix] membphis commented on issue #2366: bug: gRPC transcoding plugin how to support import other proto file?

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2366:
URL: https://github.com/apache/apisix/issues/2366#issuecomment-706053507


   @nic-chen do you know how to resolve this issue?


----------------------------------------------------------------
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.

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