chore: migrate google-cloud-functions to librarian#8600
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the skip_generate: true flag from librarian.yaml, updates repository metadata, and removes IAM-related clients, methods (getIamPolicy, setIamPolicy, testIamPermissions), and their corresponding tests across the v2, v2alpha, and v2beta versions of the Cloud Functions client. However, removing skip_generate: true without adding google.iam.v1.IAMPolicy to the mixins list under nodejs in librarian.yaml causes these IAM-related methods to be omitted from the generated clients, resulting in a breaking change for this stable library. It is recommended to add google.iam.v1.IAMPolicy to the mixins list to preserve these methods.
| - path: google/cloud/functions/v2beta | ||
| - path: google/cloud/functions/v2alpha | ||
| copyright_year: "2026" | ||
| skip_generate: true |
There was a problem hiding this comment.
Removing skip_generate: true without adding google.iam.v1.IAMPolicy to the mixins list under nodejs causes the IAM-related methods (getIamPolicy, setIamPolicy, testIamPermissions) to be removed from the generated clients. This is a breaking change for this stable library. Add google.iam.v1.IAMPolicy to the mixins list to preserve these methods.
| PaginationCallback, | ||
| GaxCall, | ||
| IamClient, | ||
| IamProtos, |
There was a problem hiding this comment.
I am not sure what is causing this. I see that these lines are still included in googleapis-gen:
https://github.com/googleapis/googleapis-gen/blob/master/google/cloud/functions/v2/functions-v2-nodejs/src/v2/function_service_client.ts#L30
However, it appears to have been last updated a month ago with our prior generator rollout: chore: update generator version to newest release v4.11.14. It could be stale?
There was a problem hiding this comment.
It looks like this imports are added by enabling the IamPolicy Mixin:
https://github.com/googleapis/google-cloud-node/blob/main/core/generator/gapic-generator-typescript/templates/cjs/typescript_gapic/src/%24version/%24service_client.ts.njk#L40
{%- if service.IAMPolicyMixin > 0 %}, IamClient, IamProtos{%- endif -%} ({%- if service.IAMPolicyMixin > 0 %}, IamClient, IamProtos{%- endif -%})
There was a problem hiding this comment.
The service yaml for v2 DOES include IAM: https://github.com/googleapis/googleapis/blob/master/google/cloud/functions/v2/cloudfunctions_v2.yaml#L9
This could be genuine issue. If I understand the generator correctly, a service yaml like this should trigger the inclusion of these lines.
f81c0d0 to
9cea238
Compare
No description provided.