Skip to content

protos for cloud run service generate invalid client #572

@bcoe

Description

@bcoe

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.

Metadata

Metadata

Labels

🚨This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions