GeezerVison is showing github.com — Generated clients are missing routing headers · Issue #401 · googleapis/gapic-generator-python
This repository was archived by the owner on Aug 25, 2026. It is now read-only.
This repository was archived by the owner on Aug 25, 2026. It is now read-only.
Generated clients are missing routing headers #401Labels conversion blockingA surface delta, bug, missing feature, or other issue that prevents API conversionpriority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release. Activitysoftware-dov commented on May 1, 2020 Just to clarify, is this an issue being seen with microgenerated client libraries? busunkim96 commented on May 1, 2020 ContributorAuthor More actions rebeccawshaw commented on May 18, 2020 Hi, is there any update on this bug? We need to get the python snippets in before our GA launch, as this is currently one of our blockers. added conversion blockingA surface delta, bug, missing feature, or other issue that prevents API conversion priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed priority: p2Moderately-important priority. Fix may not be included in next release. on Jun 4, 2020busunkim96 commented on Jun 4, 2020 ContributorAuthor More actions Bumping the priority on this as I'm seeing the same issue with KMS.
Errors look like:
EDIT: Looks like this is slightly different (perhaps related to pagination?). I don't see the error with my test project which has fewer resources.
E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.NOT_FOUND
E details = "The request concerns location 'us-east1' but was sent to location 'global'. Either Cloud KMS is not available in 'us-east1' or the request was misrouted. Make sure the 'x-goog-request-params' metadata is set correctly; see https://cloud.google.com/kms/docs/grpc for more information."
E debug_error_string = "{"created":"@1591243631.459760738","description":"Error received from peer ipv4:74.125.142.95:443","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"The request concerns location 'us-east1' but was sent to location 'global'. Either Cloud KMS is not available in 'us-east1' or the request was misrouted. Make sure the 'x-goog-request-params' metadata is set correctly; see https://cloud.google.com/kms/docs/grpc for more information.","grpc_status":5}"
E >
busunkim96 commented on Jun 4, 2020 ContributorAuthor More actions The original issue with service_directory seems to be that the generator currently adds the metadata only for http.get. The methods missing metadata are of other types: patch, delete, post
// Creates a namespace, and returns the new Namespace.
rpc CreateNamespace(CreateNamespaceRequest) returns (Namespace) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/namespaces"
body: "namespace"
};
option (google.api.method_signature) = "parent,namespace,namespace_id";
}
|
@property |
|
def field_headers(self) -> Sequence[str]: |
|
"""Return the field headers defined for this method.""" |
|
http = self.options.Extensions[annotations_pb2.http] |
|
if http.get: |
|
return tuple(re.findall(r'\{([a-z][\w\d_.]+)=', http.get)) |
|
return () |
|
# Certain fields should be provided within the metadata header; |
|
# add these here. |
|
metadata = tuple(metadata) + ( |
|
gapic_v1.routing_header.to_grpc_metadata(( |
|
{%- for field_header in method.field_headers %} |
|
('{{ field_header }}', request.{{ field_header }}), |
|
{%- endfor %} |
|
)), |
|
) |
|
{%- endif %} |
added a commit that references this issue on Jun 9, 2020This issue will close once commit f8e9712 is merged into the 'main' branch.f8e9712 software-dov commented on Jun 9, 2020
MetadataMetadataconversion blockingA surface delta, bug, missing feature, or other issue that prevents API conversionpriority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release. DevelopmentNo branches or pull requestsIssue actions
|