Skip to content

fix: grpc-transcode request support object array #7231

Merged
spacewander merged 13 commits into
apache:masterfrom
Jon-Gaara:master
Jun 17, 2022
Merged

fix: grpc-transcode request support object array #7231
spacewander merged 13 commits into
apache:masterfrom
Jon-Gaara:master

Conversation

@Jon-Gaara

@Jon-Gaara Jon-Gaara commented Jun 10, 2022

Copy link
Copy Markdown
Contributor

Description

grpc-trancode if request have object array,upstream accept is empty

Fixes #5591

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@Jon-Gaara Jon-Gaara changed the title fix: grpc-transcode support fix: grpc-transcode request support object array Jun 10, 2022

@spacewander spacewander left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please make the CI pass, thanks!

Comment thread apisix/plugins/grpc-transcode/util.lua Outdated
if request_table[name] == nil then
sub = default_values and default_values[name]
elseif core.table.isarray(request_table[name]) then
local sub_array = core.table.new(#request_table[name],0)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
local sub_array = core.table.new(#request_table[name],0)
local sub_array = core.table.new(#request_table[name], 0)

Comment thread apisix/plugins/grpc-transcode/util.lua Outdated
sub = default_values and default_values[name]
elseif core.table.isarray(request_table[name]) then
local sub_array = core.table.new(#request_table[name],0)
for i,value in ipairs(request_table[name]) do

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
for i,value in ipairs(request_table[name]) do
for i, value in ipairs(request_table[name]) do

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have modified and submitted,but the CI not pass

@spacewander

Copy link
Copy Markdown
Member

@spacewander
spacewander merged commit 2ed96c0 into apache:master Jun 17, 2022
spacewander added a commit to spacewander/incubator-apisix that referenced this pull request Jun 20, 2022
spacewander pushed a commit to spacewander/incubator-apisix that referenced this pull request Jun 20, 2022
spacewander pushed a commit that referenced this pull request Jun 20, 2022
spacewander pushed a commit that referenced this pull request Jun 30, 2022
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http json params to grpc service have discarded some params when using grpc transcode

4 participants