nodejs-pubsub icon indicating copy to clipboard operation
nodejs-pubsub copied to clipboard

SubscriberClient.testIamPermissions invalid return type

Open HNicolas opened this issue 5 years ago • 3 comments

https://github.com/googleapis/nodejs-pubsub/blob/db1f69c4aac5b3abfea12f70d45ceb8b7c957388/src/v1/subscriber_client.ts#L2186

It seems that there is an error in SubsriberClient.testIamPermissions method return type. It says that the return type is IamProtos.google.iam.v1.TestIamPermissionsResponse but the method returns an array where the first element is IamProtos.google.iam.v1.TestIamPermissionsResponse.

HNicolas avatar Nov 05 '20 09:11 HNicolas

@summer-ji-eng It looks like this might be something wrong with the generated types? The method it's calling down into also has a similar return type:

    testIamPermissions(request: protos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<protos.google.iam.v1.TestIamPermissionsResponse, protos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<protos.google.iam.v1.TestIamPermissionsResponse, protos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<protos.google.iam.v1.TestIamPermissionsResponse>;

feywind avatar May 07 '21 17:05 feywind

I talked with one of the GAPIC folks today, and he said that it's likely this is a handwritten bit that just needs to be updated upstream. It's still on my list to look at this week if possible.

feywind avatar May 10 '21 19:05 feywind

Moving this to a backlog cleanup item, because it's probably going to involve some breaking changes in gax, which the whole googleapis world relies on. :|

The two linked PRs above will fix it, together, but I think we're not ready to merge those.

feywind avatar Jun 18 '21 19:06 feywind