-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gapic): Support request-response debug logging from generated GA…
…PICs (#1113)
- Loading branch information
Showing
218 changed files
with
4,491 additions
and
2,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,4 +128,4 @@ DEPENDENCIES | |
yard (~> 0.9) | ||
|
||
BUNDLED WITH | ||
2.4.19 | ||
2.5.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,4 +128,4 @@ DEPENDENCIES | |
yard (~> 0.9) | ||
|
||
BUNDLED WITH | ||
2.4.19 | ||
2.5.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,4 +121,4 @@ DEPENDENCIES | |
yard (~> 0.9) | ||
|
||
BUNDLED WITH | ||
2.4.19 | ||
2.5.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,5 @@ | |
options: options | ||
) | ||
yield result, response if block_given? | ||
return result | ||
throw :response, result | ||
end |
4 changes: 0 additions & 4 deletions
4
gapic-generator/templates/default/service/client/method/def/_response_normal.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
<%- assert_locals method -%> | ||
@<%= method.service.stub_name %>.call_rpc :<%= method.name %>, request, options: options do |response, operation| | ||
<%- if method.lro? -%> | ||
response = ::Gapic::Operation.new response, <%= method.service.lro_client_ivar %>, options: options | ||
<%- end -%> | ||
yield response, operation if block_given? | ||
return response | ||
end |
6 changes: 6 additions & 0 deletions
6
gapic-generator/templates/default/service/client/method/def/_response_normal_lro.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<%- assert_locals method -%> | ||
@<%= method.service.stub_name %>.call_rpc :<%= method.name %>, request, options: options do |response, operation| | ||
response = ::Gapic::Operation.new response, <%= method.service.lro_client_ivar %>, options: options | ||
yield response, operation if block_given? | ||
throw :response, response | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,5 @@ | |
options: options | ||
) | ||
yield result, response if block_given? | ||
return result | ||
result | ||
end |
4 changes: 0 additions & 4 deletions
4
gapic-generator/templates/default/service/rest/client/method/def/_response_normal.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
<%- assert_locals method -%> | ||
<%- boverr_str = method.service.rest.is_main_mixin_service? ? ", bindings_override: bindings_override" : "" -%> | ||
@<%= method.service.stub_name %>.<%= method.name %> request, options<%= boverr_str %> do |result, operation| | ||
<%- if method.lro? -%> | ||
result = ::Gapic::Operation.new result, <%= method.service.lro_client_ivar %>, options: options | ||
<%- end -%> | ||
yield result, operation if block_given? | ||
return result | ||
end |
7 changes: 7 additions & 0 deletions
7
gapic-generator/templates/default/service/rest/client/method/def/_response_normal_lro.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<%- assert_locals method -%> | ||
<%- boverr_str = method.service.rest.is_main_mixin_service? ? ", bindings_override: bindings_override" : "" -%> | ||
@<%= method.service.stub_name %>.<%= method.name %> request, options<%= boverr_str %> do |result, operation| | ||
result = ::Gapic::Operation.new result, <%= method.service.lro_client_ivar %>, options: options | ||
yield result, operation if block_given? | ||
throw :response, result | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.