8000 Service stub method generates without rpc parameter sometimes. · Issue #427 · danielgtaylor/python-betterproto · GitHub
[go: up one dir, main page]

Skip to content
Service stub method generates without rpc parameter sometimes. #427
@adriangaro

Description

@adriangaro

As the title says, got the following code generated, generate_geo_condition_sql_request missing from the method signature. From a quick look in code seems that sometimes the message does not exist in ServiceMethodCompiler.request.all_messages, py_input_message returning none and thus the jinja template not writing it.

class SqlStub(betterproto.ServiceStub):
    async def geo_conditions(
        self,
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "GenerateSqlResponse":
        return await self._unary_unary(
            "/csm.shaihulud.sql.SQL/geo_conditions",
            generate_geo_condition_sql_request,
            GenerateSqlResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

Proto:

message GenerateGeoConditionSQLRequest {
  csm.common.RequestHeader header = 1;
  GenerateGeoConditionSQL payload = 2;
}
...
  
service SQL {
  rpc geo_conditions(GenerateGeoConditionSQLRequest) returns (GenerateSQLResponse);
  ...
}

Other grpc services work fine so am not sure what is causing in this case. Betterproto version 2.0.0beta5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0