Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport section in module README.md files is incorrect for most modules #10118

Open
meltsufin opened this issue Dec 6, 2023 · 7 comments
Open
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@meltsufin
Copy link
Member

In most modules it says "gRPC", even though REST is enabled.

@suztomo

@suztomo
Copy link
Member

suztomo commented Dec 6, 2023

This https://github.com/googleapis/google-cloud-java/tree/main/java-dialogflow

Screenshot 2023-12-06 at 11 13 57 AM

This comes from template: https://github.com/googleapis/synthtool/blob/master/synthtool/gcp/templates/java_library/README.md

## Transport

{% if metadata['repo']['transport'] == 'grpc' -%}
{{metadata['repo']['name_pretty']}} uses gRPC for the transport layer.
{% elif metadata['repo']['transport'] == 'http' -%}
{{metadata['repo']['name_pretty']}} uses HTTP/JSON for the transport layer.
{% elif metadata['repo']['transport'] == 'both' -%}
{{metadata['repo']['name_pretty']}} uses both gRPC and HTTP/JSON for the transport layer.
{% endif %}
{% endif -%}

Our procedure omits the transport option, resulting in the default value "grpc" https://github.com/googleapis/google-cloud-java/blob/main/generation/new_client/README.md.

@meltsufin In your observation, how did you check REST is enabled for an API?

@meltsufin
Copy link
Member Author

The source of truth is in googleapis/googleapis BUILD.bazel https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2/BUILD.bazel#L107. New client generation should not even have to ask about it, since it's already specified.

@suztomo
Copy link
Member

suztomo commented Dec 6, 2023

java_gapic_library(
    name = "dialogflow_java_gapic",
    srcs = [":dialogflow_proto_with_info"],
...
    transport = "grpc+rest",

Interesting. I thought that BUILD.bazel files are generated from the service yaml file. https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2/dialogflow_v2.yaml does not have any mention in grpc, rest, or transport.

@meltsufin
Copy link
Member Author

cc: @blakeli0

@blakeli0
Copy link
Contributor

blakeli0 commented Dec 6, 2023

The source of truth is in googleapis/googleapis BUILD.bazel https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2/BUILD.bazel#L107. New client generation should not even have to ask about it, since it's already specified.

Agreed. In addition, repo-metadata.json was generated with wrong transport and also never got updated, which might be the root cause.

@alicejli alicejli added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Dec 7, 2023
@alicejli
Copy link
Contributor

alicejli commented Dec 7, 2023

Rectifying this should be considered as part of #10090 whenever that is being worked on

@suztomo suztomo added priority: p3 Desirable enhancement or fix. May not be included in next release. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Mar 7, 2024
@suztomo
Copy link
Member

suztomo commented Mar 7, 2024

Let's work on this after the README files are created by the hermetic build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants