Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protos for cloud run service generate invalid client #1137

Closed
bcoe opened this issue May 20, 2022 · 6 comments · Fixed by #1138
Closed

protos for cloud run service generate invalid client #1137

bcoe opened this issue May 20, 2022 · 6 comments · Fixed by #1138
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bcoe
Copy link
Contributor

bcoe commented May 20, 2022

googleapis/stable/google/cloud/run/v2 generates a client that fails to compile with the following errors:

src/v2/services_client.ts:1017:14 - error TS2533: Object is possibly 'null' or 'undefined'.

1017       typeof request.service.name !== 'undefined' &&
                  ~~~~~~~~~~~~~~~

src/v2/services_client.ts:1019:9 - error TS2533: Object is possibly 'null' or 'undefined'.

1019         request.service.name!
             ~~~~~~~~~~~~~~~

src/v2/services_client.ts:1023:19 - error TS2533: Object is possibly 'null' or 'undefined'.

1023         location: request.service.name!.match(RegExp('(?<location>[^/]+)'))![0],
                       ~~~~~~~~~~~~~~~

This client also has the following warnings when linting:

  675:13  warning  'expectedHeaderRequestParams' is assigned a value but never used  @typescript-eslint/no-unused-vars
  714:13  warning  'expectedHeaderRequestParams' is assigned a value but never used  @typescript-eslint/no-unused-vars
  748:13  warning  'expectedHeaderRequestParams' is assigned a value but never used  @typescript-eslint/no-unused-vars
  779:13  warning  'expectedHeaderRequestParams' is assigned a value but never used  @typescript-eslint/no-unused-vars

The final generated client throws errors when run against the run API:

UNIMPLEMENTED: Operation is not implemented, or supported, or enabled.

All signs point to a client that is potentially not working.

@bcoe bcoe added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels May 20, 2022
@bcoe
Copy link
Contributor Author

bcoe commented May 20, 2022

@averikitsch the npm client for Cloud Run has been published:

https://www.npmjs.com/package/@google-cloud/run

Are you able to help us smoke test that it's working appropriately? I was bumping into UNIMPLEMENTED: Operation is not implemented, or supported, or enabled. trying to interact with the API.

@averikitsch
Copy link

@bcoe I plan to take a look at the libraries next week. Thanks for flagging this issue.

@bcoe
Copy link
Contributor Author

bcoe commented Jun 22, 2022

@alexander-fenster while the Cloud Run client library generates, it seems to be getting errors when attempting to create requests:

UNIMPLEMENTED: Operation is not implemented, or supported, or enabled.

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Jun 22, 2022
@averikitsch
Copy link

averikitsch commented Jun 22, 2022

GRPC verbose:

D 2022-06-22T18:25:38.672Z | call_stream | Starting stream [0] on subchannel (3) 2607:f8b0:400a:80b::200a:443 with headers
		x-goog-api-client: gax/3.1.2 gapic/0.1.1 gl-node/14.19.2 grpc/1.6.7
		x-goog-request-params: location=projects
		authorization: Bearer XXXX
		x-goog-user-project: XXXX
		grpc-timeout: 9773m
		grpc-accept-encoding: identity,deflate,gzip
		accept-encoding: identity
		:authority: run.googleapis.com:443
		user-agent: grpc-node-js/1.6.7
		content-type: application/grpc
		:method: POST
		:path: /google.cloud.run.v2.Services/ListServices
		te: trailers

D 2022-06-22T18:25:38.673Z | subchannel_flowctrl | (3) 2607:f8b0:400a:80b::200a:443 local window size: 65535 remote window size: 1048576
D 2022-06-22T18:25:38.673Z | subchannel_internals | (3) 2607:f8b0:400a:80b::200a:443 session.closed=false session.destroyed=false session.socket.destroyed=false
D 2022-06-22T18:25:38.673Z | call_stream | [0] attachHttp2Stream from subchannel 2607:f8b0:400a:80b::200a:443
D 2022-06-22T18:25:38.673Z | subchannel_refcount | (3) 2607:f8b0:400a:80b::200a:443 callRefcount 0 -> 1
D 2022-06-22T18:25:38.673Z | call_stream | [0] sending data chunk of length 53 (deferred)
D 2022-06-22T18:25:38.674Z | call_stream | [0] calling end() on HTTP/2 stream
D 2022-06-22T18:25:38.738Z | call_stream | [0] Received server headers:
		:status: 200
		content-type: application/grpc
		grpc-accept-encoding: identity, deflate, gzip
		content-length: 0
		date: Wed, 22 Jun 2022 18:25:38 GMT
		alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"

D 2022-06-22T18:25:38.739Z | call_stream | [0] Received server trailers:
		grpc-status: 12
		grpc-message: Operation is not implemented, or supported, or enabled.
		grpc-server-stats-bin: AAC4Z5sBAAAAAA

D 2022-06-22T18:25:38.739Z | call_stream | [0] received status code 12 from server
D 2022-06-22T18:25:38.739Z | call_stream | [0] received status details string "Operation is not implemented, or supported, or enabled." from server
D 2022-06-22T18:25:38.740Z | call_stream | [0] ended with status: code=12 details="Operation is not implemented, or supported, or enabled."
D 2022-06-22T18:25:38.740Z | subchannel_refcount | (3) 2607:f8b0:400a:80b::200a:443 callRefcount 1 -> 0
D 2022-06-22T18:25:38.740Z | call_stream | [0] close http2 stream with code 8
D 2022-06-22T18:25:38.741Z | call_stream | [0] HTTP/2 stream closed with code 8

@bcoe
Copy link
Contributor Author

bcoe commented Jun 22, 2022

Refs: googleapis/google-cloud-node#2941

@alexander-fenster
Copy link
Contributor

Fixed in #1160 and released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants