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

Generate native image reflect-config.json for com.google.firestore.bundle

Open mpeddada1 opened this issue 2 years ago • 5 comments

We generate configurations for com.google.firestore.v1 classes but not com.google.firestore.bundle classes. These needed to be manually added in https://github.com/googleapis/java-firestore/pull/1419.

mpeddada1 avatar Sep 19 '23 22:09 mpeddada1

Do we know how the com.google.firestore.bundle classes are added to java-firestore repo? I don't see them being passed into the generator in the Bazel build file.

blakeli0 avatar Sep 20 '23 14:09 blakeli0

The bazel rule for assembling this code is located under the google/firestore/bundle directory. Originally, it looks like this package was manually generated (https://github.com/googleapis/java-firestore/pull/271) in the repo and then the bazel rules were migrated over to third_party?

mpeddada1 avatar Sep 20 '23 23:09 mpeddada1

I see, this is a proto only module that does not involve the generator, it is generated using protoc plugin directly. If that's the case, I don't think we have a way to generate it through generator. Is this the only occurrence of this issue? Do you see it happening in other handwritten libraries?

blakeli0 avatar Sep 21 '23 15:09 blakeli0

Hm I could be wrong but these classes seem to get generator updates through Owlbot (example, https://github.com/googleapis/java-firestore/pull/1304) which make me think that they aren't fully disconnected?

Is this the only occurrence of this issue? Do you see it happening in other handwritten libraries?

From what we've observed so far, Firestore is the only one that has this issue. From the native image perspective, Spanner needed manually added configs but for different reason as there were explicitly using + reflectively calling some com.google.rpc classes (https://github.com/googleapis/java-spanner/pull/2617)

mpeddada1 avatar Sep 27 '23 19:09 mpeddada1

Hm I could be wrong but these classes seem to get generator updates through Owlbot (example, googleapis/java-firestore#1304) which make me think that they aren't fully disconnected?

Yes they are generated into googleapis-gen through the Bazel configurations , hence we can configure owlbot to copy the code from googleapis-gen. But the Bazel configurations only include firestore_bundle_java_proto and firestore_bundle_proto, which do not go through the gapic-generator-java code, compare to a firestore v1 Bazel configuration, that includes a firestore_java_gapic dependency.

This issue suffers from the same root cause as I mentioned in https://github.com/googleapis/sdk-platform-java/issues/2048, if we do prioritize these issues, I would suggest to fix https://github.com/googleapis/sdk-platform-java/issues/2048 first.

blakeli0 avatar Dec 19 '23 16:12 blakeli0