Skip to content

chore: migrate google-cloud-functions to librarian#8600

Open
quirogas wants to merge 1 commit into
googleapis:mainfrom
quirogas:scripted-migrate-google-cloud-functions
Open

chore: migrate google-cloud-functions to librarian#8600
quirogas wants to merge 1 commit into
googleapis:mainfrom
quirogas:scripted-migrate-google-cloud-functions

Conversation

@quirogas

Copy link
Copy Markdown
Contributor

No description provided.

@quirogas quirogas self-assigned this Jun 11, 2026
@quirogas quirogas requested a review from a team as a code owner June 11, 2026 19:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread librarian.yaml
- path: google/cloud/functions/v2beta
- path: google/cloud/functions/v2alpha
copyright_year: "2026"
skip_generate: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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,

@pearigee pearigee Jun 12, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@pearigee pearigee Jun 12, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 -%})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@quirogas quirogas added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 12, 2026
@quirogas quirogas force-pushed the scripted-migrate-google-cloud-functions branch from f81c0d0 to 9cea238 Compare June 12, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants