gapic-generator-java icon indicating copy to clipboard operation
gapic-generator-java copied to clipboard

[hermetic-build] java-bigtable generated `proto-*/src/main/proto/**/*.proto`s are different from existing ones

Open diegomarquezp opened this issue 11 months ago • 1 comments

Problem

There are some proto files that are differing, for example bigtable/admin/v2 :

Current (wrong) generation output

See https://github.com/googleapis/java-bigtable/pull/2159 for a demo PR

Details

Check googleapis - it has an update_mask entry: https://github.com/googleapis/googleapis/blob/9868a57470a969ffa1d21194a5c05d7a6e4e98cc/google/bigtable/admin/v2/bigtable_table_admin.proto#L775-L780

Check googleapis-gen - it also has an update_mask entry: https://github.com/googleapis/googleapis-gen/blob/b983c8f87e6643d9a74d7b8183d66349943b436e/google/bigtable/admin/v2/google-cloud-bigtable-admin-v2-java/proto-google-cloud-bigtable-admin-v2-java/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto#L775-L780

Check java-bigtable - it doesn't have it https://github.com/googleapis/java-bigtable/blob/27274b4088db707e2a4cd950d61bb14bea1ded3a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto#L772-L776

In owl-bot-copy PRs, the postprocessor doesn't touch the proto https://github.com/googleapis/java-bigtable/pull/2158/commits/0e95c921ad9c10a808fb54cb669c87f35e764918#diff-eb0acb7170b49f28d5f2eab282bb756fa72796e8db8cc65547987870ed197d20

The googleapis BUILD.bazel looks like it's not doing anything special:

proto_library(
    name = "admin_proto",
    srcs = [
        "bigtable_instance_admin.proto",
        "bigtable_table_admin.proto",
        "common.proto",
        "instance.proto",
        "table.proto",
        "types.proto",
    ],
    deps = [
        "//google/api:annotations_proto",
        "//google/api:client_proto",
        "//google/api:field_behavior_proto",
        "//google/api:resource_proto",
        "//google/iam/v1:iam_policy_proto",
        "//google/iam/v1:policy_proto",
        "//google/longrunning:operations_proto",
        "//google/rpc:status_proto",
        "@com_google_protobuf//:duration_proto",
        "@com_google_protobuf//:empty_proto",
        "@com_google_protobuf//:field_mask_proto",
        "@com_google_protobuf//:timestamp_proto",
    ],
)

This is the bigtable/admin/v2 folder: drawing

~@JoeWang1127 is this something you came across when dealing with special treatment cases of proto files?~ Looks like this is something occurring after generating the proto libraries

diegomarquezp avatar Mar 08 '24 04:03 diegomarquezp

Hopefully the only cause: There is a pending owl-bot-copy PR: https://github.com/googleapis/java-bigtable/pull/2158

I'll adjust the googleapis_commitish to something before this change in the meantime

diegomarquezp avatar Mar 08 '24 15:03 diegomarquezp

This was due to an unmerged owl-bot-copy pull request in java-bigtable

diegomarquezp avatar May 30 '24 15:05 diegomarquezp