Skip to content

Commit

Permalink
fix(pluginsocket.proto): type for set_upstream
Browse files Browse the repository at this point in the history
Fix the return type for the `.Service.SetUpstream` external plugin PDK
method.

Fixes issue Kong/go-pdk#114.

Sister PR: Kong/go-pdk#191
  • Loading branch information
gszr committed Mar 12, 2024
1 parent 3c9d09c commit 66712fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/pluginsocket-proto-wrong-type.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: |
Fix an issue where external plugins using the protobuf-based protocol would fail to call the `kong.Service.SetUpstream` method with an error `bad argument #2 to 'encode' (table expected, got boolean)`.
type: bugfix
2 changes: 1 addition & 1 deletion kong/include/kong/pluginsocket.proto
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ service Kong {
rpc Router_GetRoute(google.protobuf.Empty) returns (Route);
rpc Router_GetService(google.protobuf.Empty) returns (Service);

rpc Service_SetUpstream(String) returns (google.protobuf.Empty);
rpc Service_SetUpstream(String) returns (Bool);
rpc Service_SetTarget(Target) returns (google.protobuf.Empty);

rpc Service_Request_SetScheme(String) returns (google.protobuf.Empty);
Expand Down

0 comments on commit 66712fb

Please sign in to comment.