Uh oh!
There was an error while loading. Please reload this page.
feat: gapic centralization into api core - #17628
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new client_helpers module in google-api-core containing helper functions for GAPIC client initialization, and adds global lazy imports control (__lazy_modules__) to google-cloud-compute. The review feedback suggests optimizing performance by compiling the mTLS endpoint regular expression at the module level rather than inside the function. Additionally, it recommends correcting the type annotations in get_api_endpoint to use Optional[Any] for client_cert_source and Optional[str] for the return type.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…rs.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
5e1eb20 to
ad1c01fComparehebaalazzeh
commented
Jul 6, 2026
/gemini |
…al client_helpers methods
c27695d to
2353e82Compare1d7b5c2 to
3f02e35Compare…ers.py Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
…n-grpc environments
713b557 to
70445efCompareparthea
commented
Jul 14, 2026
The Github status checks appear to be stuck. Closing and re-opening this PR may help |
…s to public Rename _client_cert, _config_helpers, _method_helpers, and _routing submodules and their functions to public names, as they are consumed across package boundaries by generated client libraries. Updates unit tests and top-level gapic_v1 imports accordingly.
Update and Release google-api-core
This PR introduces centralized helper functions into
google.api_core.gapic_v1. The goal of this centralization is to reduce package size, improve maintainability, and boost import performance of generated GAPIC clients by moving redundant, service-agnostic boilerplate logic intogoogle-api-core.Key Changes
google.api_core.gapic_v1:_routing.py(get_default_mtls_endpoint,get_api_endpoint,get_universe_domain)_client_cert.py(use_client_cert_effective,get_client_cert_source)_config_helpers.py(read_environment_variables)_method_helpers.py(setup_request_id)_prefix from these functions so they can be securely imported and utilized by external generated clients._use_client_cert_effective = use_client_cert_effective) to prevent breaking changes for existing GAPIC clients (over 2,400+ repos) that have not yet been regenerated.test_routing.py,test_client_cert.py,test_config_helpers.py,test_method_helpers.py).install_grpc=Falseenvironments.google-auth(e.g.<=2.14.1) pass in the CI test matrix by safely validatingshould_use_client_certavailability.NOTE