profile
viewpoint
Summer Ji summer-ji-eng @googleapis San Francisco Bay Area Software Engineer at Bay Area

googleapis/gapic-generator-java 12

Generates GAPIC Java client libraries from protobufs.

summer-ji-eng/brew 0

🍺 The missing package manager for macOS

summer-ji-eng/cadence 0

Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.

summer-ji-eng/d3-transition 0

Animated transitions for D3 selections.

summer-ji-eng/git 0

Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.

summer-ji-eng/groovy 0

Mirror of Apache Groovy

Pull request review commentgoogleapis/gapic-generator-typescript

fix: change dynamic routing header field to camelCase

 request.{{ oneComment.paramName.toCamelCase() }}     let routingParameter = {}; {%- for paramArray in method.dynamicRoutingRequestParams %}   {%- for sameParamArray in paramArray %}

nit: could we rename sameParamArray as param for simplicity. go/tott/431 is good reference.

alicejli

comment created time in 11 hours

Pull request review commentgoogleapis/gapic-generator-typescript

fix: change dynamic routing header field to camelCase

 describe('src/schema/proto.ts', () => {     });   }); +  describe('should return a string set to camelCase', () => {+    it('should return this to camelCase', () => {+      assert.deepStrictEqual(+        convertFieldToCamelCase('name.name2.name3'),+        'name.name2.name3'+      );+      assert.deepStrictEqual(convertFieldToCamelCase(''), '');+      assert.deepStrictEqual(convertFieldToCamelCase('parent_id'), 'parentId');+      assert.deepStrictEqual(+        convertFieldToCamelCase('app_profile_id'),+        'appProfileId'+      );+      assert.deepStrictEqual(+        convertFieldToCamelCase('name.parent_id.another_parent_id'),+        'name.parentId.anotherParentId'+      );

Can we add a unit test on a field name with non-alphanumeric letter like name?_(1). I expect the result is same name?_(1).

alicejli

comment created time in 11 hours

PullRequestReviewEvent
PullRequestReviewEvent

issue closedgoogleapis/gax-nodejs

Confusing behavior when trying to set deadlines on a gRPC call

I want to set a server-side deadline on a gRPC call so that the call is cancelled if it takes too long, This works in Java/GAX by setting the totalTimeout in RetrySettings, so the server-side appears to be working correctly.

Attempting to do the same in Node.js/GAX seems to be very confusing, and not matching the documentation:

TL/DR:

  • it seems that the CallOptions.timeout which is documented as a client-side timeout seems to also work as a server-side timeout, but only when RetryOptions are specified, which seems to go against the documentation.
  • Certain values for RetryOptions give unexpected errors when specified together.
  • RetryOptions are ignored completely unless at least one RetryCode is given.
  • Cannot set both totalTimeoutMillis and maxRetries in BackoffSettings
  • BackoffSettings.totalTimeoutMillis seems to be completely ignored

https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L157

Demonstration of CallOptions.timeout on DEADLINE_EXCEEDED

callOptions = {
  retry: {
    backoffSettings: {
      totalTimeoutMillis: 200
    }
  }
}

Has no effect - the long-running gRPC is not timed out.

callOptions = {
  timeout: 200
}

Has no effect - the long-running gRPC is not timed out.

callOptions = {
  timeout: 200,
  retry: {}
  }
}

Has no effect - the long-running gRPC is not timed out.

callOptions = {
  timeout: 200,
  retry: {
    retryCodes: [],
    }
  }

DEADLINE_EXCEEDED Raised

These tests indicate that the CallOptions.timeout is being passed as a deadline to the server (when it is documented as a client-side timeout), BUT only when a CallOptions.retry.retryCodes object is specified. The values in the CallOptions.retry object seem to be ignored.

Demonstration of totalTimeoutMillis

callOptions = {
  timeout: 200000,
  retry: {
    retryCodes: [],
    backoffSettings: {
      totalTimeoutMillis: 200
    }
  }
}

Has no effect - the long-running gRPC is not timed out.

callOptions = {
  timeout: 200000,
  retry: {
    retryCodes: [ 99999 ],
      backoffSettings: {
        totalTimeoutMillis: 200
     }
  }
}

Has no effect - the long-running gRPC is not timed out. totalTimeoutMillis seems to be ignored

Demonstration of CallOptions.retry on DEADLINE_EXCEEDED

callOptions = {
  retry: {
    retryCodes: [ 99999 ],
      backoffSettings: {
        totalTimeoutMillis: 200
     }
  }
}

Has no effect - the long-running gRPC is not timed out.

callOptions = {
  retry: {
    retryCodes: [ 99999 ],
      backoffSettings: {
        maxRetries: 1,
        totalTimeoutMillis: 200
     }
  }
}

Client-side error:

Error: Cannot set both totalTimeoutMillis and maxRetries in backoffSettings

This makes no sense, as it seems perfectly possible to have retries and a total timeout (and the documentation implies this: regardless of the retrying attempts made meanwhile.

callOptions = {
  retry: {
    retryCodes: [ 99999 ],
      backoffSettings: {
        maxRetries: 1,
        initialRpcTimeoutMillis: 200,
        maxRpcTimeoutMillis: 200
     }
  }
}

DEADLINE_EXCEEDED Raised (woohoo!)

callOptions = {
  timeout: 200,
  retry: {
    retryCodes: [ 99999 ],
      backoffSettings: {
        maxRetries: 1,
        initialRpcTimeoutMillis: 200000,
        maxRpcTimeoutMillis: 200000
     }
  }
}

Has no effect - the long-running gRPC is not timed out. This does correspond to the docs - that CallOptions.timeout is ignored for retryable calls.

callOptions = {
  retry: {
    retryCodes: [ ],
      backoffSettings: {
        maxRetries: 1,
        initialRpcTimeoutMillis: 200,
        maxRpcTimeoutMillis: 200
     }
  }
}

Has no effect - the long-running gRPC is not timed out.

So at least 1 retryCode must be specified

Environment details

OS: Debian Rodete (20210511.01.04RD) node: v12.21.0 npm: 7.5.2 google-gax@2.13.0 grpc/grpc-js@1.3.2 grpc-gcp@0.3.3

closed time in 12 hours

nielm

issue commentgoogleapis/gax-nodejs

Confusing behavior when trying to set deadlines on a gRPC call

This has been fixed #1100. Close for now.

Feel free to open for any further question.

nielm

comment created time in 12 hours

issue commentgoogleapis/gax-nodejs

Missing dependency `request` causes an error when using Google Cloud's Vision API

Hi @tferrerm,

Thanks for opening an issue. Quick try on @google-cloud/vision without serverless. It works for mode in grpc, fallback/webpack and rest.

Not sure if the missing dependency relate to webpack configuration, find couple similar asking (link1, link2).

Could you provide me the serverless quick start guidance, try to reproduce the error on my local. Thanks, Summer

tferrerm

comment created time in 12 hours

Pull request review commentgoogleapis/gax-nodejs

fix: match http error with grpc error pattern

 export class GoogleError extends Error {     );     // Map Http Status Code to gRPC Status Code     if (json['error']['code']) {-      error.code = rpcCodeFromHttpStatusCode(json['error']['code']);+      const rpcCode = rpcCodeFromHttpStatusCode(json['error']['code']);+      if (+        !json['error']['status'] ||+        Status[rpcCode] !== json['error']['status']+      ) {+        console.warn(

A user can't do anything if mismatch. HTTP server should do provide grpc-matched status. https://cloud.google.com/apis/design/errors#error_mapping

In rare case, if http doesn't match grpc status, we have two options:

  1. Use http code associated grpc code to find correct status. This option would hide the mismatch information.
  2. Create new error message. But we have to decide which code and status need to use. code and status has to be grpc status. This option changed the HTTP code. The way to make it clear, is to add more details in message.

My opinion is option 2. Given detailed message include the http code and matched grpc code/status to explain the mismatch error, assign new error with code 2 status UNKNOWN.

UNKNOWN description: Unknown error. For example, this error may be returned when a Status value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error.

INTERNAL is not the first choice because it reserve for the serious errors.

summer-ji-eng

comment created time in 13 hours

PullRequestReviewEvent

push eventgoogleapis/gax-nodejs

Summer Ji

commit sha f98ebd42b2b47f5ba507ffc34e33056e0d5bda18

fix typo in src/googleError.ts Co-authored-by: Alexander Fenster <fenster@google.com>

view details

push time in 14 hours

push eventgoogleapis/gax-nodejs

Summer Ji

commit sha a693903149b804bddc690cc64f187a2f6186b671

fix: stream callback is undefined (#1170)

view details

Summer Ji

commit sha dbd51c4170cda3fec4ce5624d92d71119e6b044a

Merge branch 'main' into err_msg_match

view details

push time in 14 hours

delete branch googleapis/gax-nodejs

delete branch : callback_undefined

delete time in 14 hours

push eventgoogleapis/gax-nodejs

Summer Ji

commit sha a693903149b804bddc690cc64f187a2f6186b671

fix: stream callback is undefined (#1170)

view details

push time in 14 hours

PR merged googleapis/gax-nodejs

fix: handle undefined stream callback

If a callback is undefined, rest stream call throw error Uncaught TypeError: callback is not a function.

+4 -1

0 comment

1 changed file

summer-ji-eng

pr closed time in 14 hours

issue openedgoogleapis/gapic-generator-typescript

Fail to generate a proto with "routing" annotation

Can't compile the generated code with a proto with new introduced google.api.routing annotation. proto

Generator is able to generate surface client library, but the generated client library fails on compiling. Because to access the proto message property it require camelcase word than snakecase.

To reproduce the error, under the generator repo:

$ bazel build //...
$ bazel run //:gapic_generator_typescript --      --iam-service     --output-dir /tmp/bigtable2     -I "$GOOGLEAPIS"     --grpc-service-config "$GOOGLEAPIS/google/$APINAME/v2/${APINAME}_grpc_service_config.json"     --service-yaml "$GOOGLEAPIS/google/$APINAME/v2/${APINAME}_v2.yaml"      `find "$GOOGLEAPIS/google/$APINAME/v2" -name '*.proto'`     "$GOOGLEAPIS/google/cloud/common_resources.proto"

created time in 14 hours

push eventgoogleapis/nodejs-bigtable

danieljbruce

commit sha ef3f5100138cc0c98ce175f97faed7f6e29d2478

test: add test for close() (#992) Added a test case for the new close function

view details

Summer Ji

commit sha 93b589fb0f20beff273f271a878afbcc87740208

Merge branch 'main' into owl-bot-491bc189-379d-47d8-bf06-1c9b22217c64

view details

push time in 19 hours

PR opened googleapis/gax-nodejs

fix: match http error with grpc error pattern

grpc error message pattern: ${grpcCode} ${grpcStatus}: ${error message}.

To provide same debugging experience between HTTP/JSON and grpc, we should compose HTTP error message using the same pattern with grpc error message.

+163 -57

0 comment

2 changed files

pr created time in a day

create barnchgoogleapis/gax-nodejs

branch : err_msg_match

created branch time in a day

push eventgoogleapis/proto3-json-serializer-nodejs

Summer Ji

commit sha 537beb075e3200f1167ebfb99612384714377b11

clear console.log

view details

push time in a day

PR opened googleapis/proto3-json-serializer-nodejs

fix: timestamp without millisecond

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • [ ] Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • [ ] Ensure the tests and linter pass
  • [ ] Code coverage does not decrease (if any source code was changed)
  • [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

+36 -3

0 comment

2 changed files

pr created time in a day

create barnchgoogleapis/proto3-json-serializer-nodejs

branch : fix_slice

created branch time in a day

create barnchgoogleapis/gax-nodejs

branch : callback_undefined

created branch time in 2 days

pull request commentgoogleapis/nodejs-spanner

refactor: return GoogleError instead of Error in handwritten library.

LGTM, let's wait see any comment from the spanner experts.

rajatbhatta

comment created time in 3 days

PullRequestReviewEvent

push eventgoogleapis/gax-nodejs

gcf-owl-bot[bot]

commit sha 61957907387da295898692c8318f8da099f52eef

build(node): switch back to keystore for publication (#1328) (#1168) Source-Link: https://github.com/googleapis/synthtool/commit/89dd35d6f194f0ab2b5a26b5834a3c91392a2e08 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:89c5b2f3decec8ad64febbebea671076c119d1ab43700da380846a315600de8a Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Summer Ji <summerji@google.com>

view details

Summer Ji

commit sha 96bca0a804dc35d09b57941ca260f1846b21c833

Merge branch 'main' into release-please--branches--main

view details

push time in 3 days

PullRequestReviewEvent

delete branch googleapis/gax-nodejs

delete branch : owl-bot-update-lock-89c5b2f3decec8ad64febbebea671076c119d1ab43700da380846a315600de8a

delete time in 3 days

push eventgoogleapis/gax-nodejs

gcf-owl-bot[bot]

commit sha 61957907387da295898692c8318f8da099f52eef

build(node): switch back to keystore for publication (#1328) (#1168) Source-Link: https://github.com/googleapis/synthtool/commit/89dd35d6f194f0ab2b5a26b5834a3c91392a2e08 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:89c5b2f3decec8ad64febbebea671076c119d1ab43700da380846a315600de8a Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Summer Ji <summerji@google.com>

view details

push time in 3 days

more