googleapis / googleapis/google-cloud-java

Update new-client.py to set `transport` based on Bazel

Đang mở
#8,747 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
priority: p3 type: feature request
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
154

Mô tả

**Is your feature request related to a problem? Please describe.**
[new-client.py](https://github.com/googleapis/google-cloud-java/blob/main/generation/new_client/new-client.py) generates the `repo-metadata.json` file with the `transport` option set to `grpc` was default. This can lead to discrepancies between `repo-metadata.json` and the `BUILD.bazel` file which is technically the source of truth.

For instance, for `java-api-gateway`: the `repo-metadata.json` file shows `transport: grpc`: https://github.com/googleapis/java-api-gateway/blob/main/.repo-metadata.json#L8, however the `BUILD.bazel` file shows that actually `transport: grpc+rest`: https://github.com/googleapis/googleapis/blob/master/google/cloud/apigateway/v1/BUILD.bazel#L96.

This will not fix the issue where the `BUILD.bazel` file gets updated post initial library generation to a different transport; that can be addressed in a follow up.

**Describe the solution you'd like**
new-client.py should generate the `transport` option based on the `BUILD.bazel` file if possible.

Alternatively, if there's a way to automatically update `repo-metadata.json` based on the `BUILD.bazel` file in general, that could solve both new client generation and existing library updates.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.