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 13, 2024
1 parent cea6f24 commit 25b3317
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

1 comment on commit 25b3317

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:25b3317365f51ec2ac12ad3457da20161c07bc61
Artifacts available https://github.com/Kong/kong/actions/runs/8268132242

Please sign in to comment.