Skip to content

Add support to enable grpc_call_invoker#207

Merged
dwsupplee merged 9 commits intogoogleapis:masterfrom
WeiranFang:grpc-gcp-config
Aug 16, 2018
Merged

Add support to enable grpc_call_invoker#207
dwsupplee merged 9 commits intogoogleapis:masterfrom
WeiranFang:grpc-gcp-config

Conversation

@WeiranFang
Copy link
Copy Markdown
Contributor

@WeiranFang WeiranFang commented Aug 15, 2018

Per discussion in googleapis/google-cloud-php#1146, this PR is to move the logic of enabling channel management to gax library. Another part of the changes resides in gapic-generator library: googleapis/gapic-generator#2231

'serviceName' => 'test.interface.v1.api',
'clientConfig' => __DIR__ . '/testdata/test_service_client_config.json',
'descriptorsConfigPath' => __DIR__.'/testdata/test_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../testdata/test_service_grpc_config.json',

This comment was marked as spam.

This comment was marked as spam.

if (isset($options['gcpApiConfigPath'])
&& file_exists($options['gcpApiConfigPath'])
&& isset($options['serviceAddress'])) {
$grpcGcpConfig = initGrpcGcpConfig(

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

'serviceName' => 'test.interface.v1.api',
'clientConfig' => __DIR__ . '/testdata/test_service_client_config.json',
'descriptorsConfigPath' => __DIR__.'/testdata/test_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../testdata/test_service_grpc_config.json',

This comment was marked as spam.

This comment was marked as spam.

composer.json Outdated
"php": ">=5.5",
"google/auth": "^1.2.0",
"google/gpc-gcp": "^0.1.0",
"google/grpc-gcp": "^0.1.0",

This comment was marked as spam.

This comment was marked as spam.

'rest' => [],
];

if (isset($defaultOptions['gcpApiConfigPath'])

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 16, 2018

Codecov Report

Merging #207 into master will decrease coverage by 0.19%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #207     +/-   ##
=========================================
- Coverage   84.81%   84.61%   -0.2%     
=========================================
  Files          62       63      +1     
  Lines        2838     2373    -465     
=========================================
- Hits         2407     2008    -399     
+ Misses        431      365     -66
Impacted Files Coverage Δ
src/ApiCore/GapicClientTrait.php 87.61% <75%> (-1.28%) ⬇️
src/ApiCore/PathTemplate.php 86.66% <0%> (-12.35%) ⬇️
src/ApiCore/RequestBuilder.php 93.6% <0%> (ø) ⬆️
src/ApiCore/Parser.php
src/ApiCore/Jison/Segment.php
src/ApiCore/Jison/Parser.php
src/ApiCore/ResourceTemplate/Segment.php 82.22% <0%> (ø)
src/ApiCore/ResourceTemplate/Parser.php 91.42% <0%> (ø)
...Core/ResourceTemplate/RelativeResourceTemplate.php 100% <0%> (ø)
...Core/ResourceTemplate/AbsoluteResourceTemplate.php 97.14% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9a8568...d88ff14. Read the comment docs.

Copy link
Copy Markdown
Contributor

@dwsupplee dwsupplee left a comment

Choose a reason for hiding this comment

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

Thanks so much for this @WeiranFang :). Just a few minor style nits on my end, otherwise looks great.

$options['transportConfig']['grpc'] += $defaultOptions['transportConfig']['grpc'];
$options['transportConfig']['rest'] += $defaultOptions['transportConfig']['rest'];

This comment was marked as spam.

This comment was marked as spam.

{
$apiConfig = new ApiConfig();
$apiConfig->mergeFromJsonString(
file_get_contents(__DIR__.'/testdata/test_service_grpc_config.json'));

This comment was marked as spam.

This comment was marked as spam.

$this->modifyClientOptions($options);

if (isset($options['gcpApiConfigPath'])

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dwsupplee dwsupplee merged commit 66e37dc into googleapis:master Aug 16, 2018
@michaelbausor michaelbausor mentioned this pull request Aug 20, 2018
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.

5 participants