apache / apache/apisix

feat: in standalone mode (without etcd), protobuf with import is not loaded

Open
#11,486 6 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.