-
Notifications
You must be signed in to change notification settings - Fork 66
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
chore: demo of fixes in fix_poms.py
#1764
Draft
cloud-java-bot
wants to merge
1
commit into
main
Choose a base branch
from
demo-fix-poms-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.