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

SubscriberClient.testIamPermissions invalid return type #1460

Open
HNicolas opened this issue Nov 5, 2020 · 4 comments
Open

SubscriberClient.testIamPermissions invalid return type #1460

HNicolas opened this issue Nov 5, 2020 · 4 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@HNicolas
Copy link

HNicolas commented Nov 5, 2020

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.

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Nov 5, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Nov 6, 2020
@meredithslota meredithslota added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Nov 9, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Feb 7, 2021
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label May 5, 2021
@feywind
Copy link
Contributor

feywind commented May 7, 2021

@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
Copy link
Contributor

feywind commented May 10, 2021

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 feywind changed the title SubsriberClient.testIamPermissions invalid return type SubscriberClient.testIamPermissions invalid return type Jun 18, 2021
@feywind feywind added type: cleanup An internal cleanup or hygiene concern. and removed 🚨 This issue needs some love. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jun 18, 2021
@feywind
Copy link
Contributor

feywind commented Jun 18, 2021

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 feywind added the priority: p3 Desirable enhancement or fix. May not be included in next release. label Mar 7, 2023
@feywind feywind transferred this issue from googleapis/nodejs-pubsub Jun 20, 2023
@feywind
Copy link
Contributor

feywind commented Jul 19, 2023

For Pub/Sub, this pull request is related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

4 participants