feat: in standalone mode (without etcd), protobuf with import is not loaded
- Dominant language
- Lua
- Stars
- 17.1k
- Forks
- 2.9k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 63
Description
### Current Behavior
When provide config and protobuf files using [standalone mode](https://apisix.apache.org/docs/apisix/deployment-modes/#how-to-configure-protos), and configured with a proper protobuf with `import`, the protobuf will not be loaded with error `No such file or directory`.
### Expected Behavior
_No response_
### Error Logs
_No response_
### Steps to Reproduce
Try use this proto, and reference it in a route:
```protobuf
protos:
- id: helloworld2
desc: hello world
content: >
syntax = "proto3";
package helloworld2;
import "helloworld.proto";
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
message HelloRequest {
string name = 1;
}
message HelloReply {
string message = 1;
}
- id: helloworld
desc: hello world
content: >
syntax = "proto3";
package helloworld;
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
message HelloRequest {
string name = 1;
}
message HelloReply {
string message = 1;
}
#END
```
### Environment
- APISIX version (run `apisix version`): 2.x
Contributor guide
Research direction
Reproduce the failure using the standalone-mode configuration and protobuf example in the issue, then trace the protobuf loading path for imported files. Done means a protobuf that imports helloworld.proto loads successfully and can be referenced by a route without a “No such file or directory” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100