chore(generator): gapic generator centralization mtls#17749
Draft
hebaalazzeh wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors client certificate handling and environment variable parsing by extracting common logic from the GAPIC client template into centralized helper modules (client_cert.py and config_helpers.py) in google-api-core. This change simplifies the generated client code and eliminates redundant unit tests across multiple services. Feedback on the changes suggests a more robust mocking approach in the new unit tests, specifically recommending mocking the mtls module with an empty spec instead of patching the built-in hasattr function.
hebaalazzeh
force-pushed
the
feat/gapic-generator-centralization-mtls
branch
from
July 16, 2026 21:49
a23e10d to
5cc1bec
Compare
hebaalazzeh
changed the base branch from
main
to
feat/gapic-centralization-api-core-mtls
July 16, 2026 21:54
hebaalazzeh
force-pushed
the
feat/gapic-centralization-api-core-mtls
branch
4 times, most recently
from
July 21, 2026 14:28
58a8230 to
d392678
Compare
hebaalazzeh
force-pushed
the
feat/gapic-centralization-api-core-mtls
branch
from
July 21, 2026 16:18
f5cd957 to
10e7f4f
Compare
hebaalazzeh
force-pushed
the
feat/gapic-generator-centralization-mtls
branch
from
July 21, 2026 16:31
d3aa84f to
b47cd25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates client templates to
delegate _use_client_cert_effective,_read_environment_variables, and_get_client_cert_sourceto publicclient_certand config_helpersmodules ingoogle-api-core gapic_v1. Removes redundant unit tests from templates and regenerates golden files.Associated / Dependent API Core PR: #17750