Skip to content

Conversation

@cloud-java-bot
Copy link
Collaborator

No description provided.

@cloud-java-bot cloud-java-bot requested review from a team as code owners July 26, 2024 13:06
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: firestore Issues related to the googleapis/java-firestore API. labels Jul 26, 2024
@diegomarquezp diegomarquezp marked this pull request as draft July 26, 2024 13:07
diegomarquezp added a commit to googleapis/sdk-platform-java that referenced this pull request Aug 31, 2024
Fixes googleapis/google-cloud-java#10037 ☕ ### Overview This will modify the behavior of library generation at the postprocessing stage. The main change is that generated _cloud_ poms (i.e. `google-cloud-${service}/pom.xml`) will now have the dependencies `proto-google-common-protos` and `grpc-google-iam-v1` declared as `<scope>test</scope>` if the libraries belong to a monorepo. ### Integration test It will be failing until we update the test branch. Once this approach is validated, I will proceed with updating the branch. ### Approach #### For new libraries Via template in `owlbot/teplates/poms/cloud_pom.xml.j2`. New libraries will have these two dependencies declared as test scope if they are part of a monorepo. #### For existing libraries The script `fix_poms.py` will now modify the existing poms by setting the two dependencies as test-scoped, only if they are part of a monorepo. ### Confirmation that it works * java-bigquerystorage: no effects since these dependencies are [not found in the pom](https://github.com/search?q=repo%3Agoogleapis%2Fjava-bigquerystorage%20path%3Agoogle-cloud-bigquerystorage%2Fpom.xml%20grpc-google&type=code) * java-datastore: [no relevant changes](https://github.com/googleapis/java-datastore/pull/1530/files) since the dependencies are [not found in the pom](https://github.com/googleapis/java-datastore/blob/main/google-cloud-datastore/pom.xml) * java-firestore: [no relevant changes](googleapis/java-firestore#1764) since the one targeted dependency is [already declared as test scoped](https://github.com/googleapis/java-firestore/blob/main/google-cloud-firestore/pom.xml#L160-L164) * java-logging: [no relevant changes](googleapis/java-logging#1660)] since the dependencies are [not declared in the pom](https://github.com/googleapis/java-logging/blob/main/google-cloud-logging/pom.xml) * java-pubsub: no changes. Relevant dependency [already declared as test scoped](https://github.com/googleapis/java-pubsub/blob/2b15b0a3f43c9ccef663fedf0398375f58fd9183/google-cloud-pubsub/pom.xml#L135-L139) * java-pubsublite: [no relevant changes](googleapis/java-pubsublite#1692) since there are [no relevant dependencies declared in the pom](https://github.com/googleapis/java-pubsublite/blob/main/google-cloud-pubsublite/pom.xml) * java-spanner: ignored - dependency kept as is * java-storage: ignored - kept as is * **google-cloud-java: [91 poms affected](https://github.com/googleapis/google-cloud-java/pull/11031/files) by converting dependencies to test-scoped (PR only contains pom changes for simplicity + outdated googleapis_committish)** * We had a special situation with `java-dataproc` because it references `google-iam-v1` via `grpc-google-iam-v1`. However this is incorrect because what this library really needs is the proto classes. The fix for this was to treat this library as any other library and add `proto-google-iam-v1` as a dependency.
ldetmer pushed a commit to googleapis/sdk-platform-java that referenced this pull request Sep 17, 2024
Fixes googleapis/google-cloud-java#10037 ☕ ### Overview This will modify the behavior of library generation at the postprocessing stage. The main change is that generated _cloud_ poms (i.e. `google-cloud-${service}/pom.xml`) will now have the dependencies `proto-google-common-protos` and `grpc-google-iam-v1` declared as `<scope>test</scope>` if the libraries belong to a monorepo. ### Integration test It will be failing until we update the test branch. Once this approach is validated, I will proceed with updating the branch. ### Approach #### For new libraries Via template in `owlbot/teplates/poms/cloud_pom.xml.j2`. New libraries will have these two dependencies declared as test scope if they are part of a monorepo. #### For existing libraries The script `fix_poms.py` will now modify the existing poms by setting the two dependencies as test-scoped, only if they are part of a monorepo. ### Confirmation that it works * java-bigquerystorage: no effects since these dependencies are [not found in the pom](https://github.com/search?q=repo%3Agoogleapis%2Fjava-bigquerystorage%20path%3Agoogle-cloud-bigquerystorage%2Fpom.xml%20grpc-google&type=code) * java-datastore: [no relevant changes](https://github.com/googleapis/java-datastore/pull/1530/files) since the dependencies are [not found in the pom](https://github.com/googleapis/java-datastore/blob/main/google-cloud-datastore/pom.xml) * java-firestore: [no relevant changes](googleapis/java-firestore#1764) since the one targeted dependency is [already declared as test scoped](https://github.com/googleapis/java-firestore/blob/main/google-cloud-firestore/pom.xml#L160-L164) * java-logging: [no relevant changes](googleapis/java-logging#1660)] since the dependencies are [not declared in the pom](https://github.com/googleapis/java-logging/blob/main/google-cloud-logging/pom.xml) * java-pubsub: no changes. Relevant dependency [already declared as test scoped](https://github.com/googleapis/java-pubsub/blob/2b15b0a3f43c9ccef663fedf0398375f58fd9183/google-cloud-pubsub/pom.xml#L135-L139) * java-pubsublite: [no relevant changes](googleapis/java-pubsublite#1692) since there are [no relevant dependencies declared in the pom](https://github.com/googleapis/java-pubsublite/blob/main/google-cloud-pubsublite/pom.xml) * java-spanner: ignored - dependency kept as is * java-storage: ignored - kept as is * **google-cloud-java: [91 poms affected](https://github.com/googleapis/google-cloud-java/pull/11031/files) by converting dependencies to test-scoped (PR only contains pom changes for simplicity + outdated googleapis_committish)** * We had a special situation with `java-dataproc` because it references `google-iam-v1` via `grpc-google-iam-v1`. However this is incorrect because what this library really needs is the proto classes. The fix for this was to treat this library as any other library and add `proto-google-iam-v1` as a dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the googleapis/java-firestore API. size: xs Pull request size is extra small.

3 participants