Skip to content
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(java): pom generation to look at root versions.txt #1706

Merged

Conversation

suztomo
Copy link
Member

@suztomo suztomo commented Nov 10, 2022

For #1707

For the Java monorepo, owlbot-java postprocessor's pom generation should look at root versions.txt.

@suztomo
Copy link
Member Author

suztomo commented Nov 10, 2022

With the first attempt, all modules written in the the root versions.txt appear in java-eventarc/google-cloud-eventarc-bom/pom.xml. This is not good.

suztomo@suztomo:~/google-cloud-java$ git diff
diff --git a/java-eventarc/google-cloud-eventarc-bom/pom.xml b/java-eventarc/google-cloud-eventarc-bom/pom.xml
index faa03532050..6838d9bf41d 100644
--- a/java-eventarc/google-cloud-eventarc-bom/pom.xml
+++ b/java-eventarc/google-cloud-eventarc-bom/pom.xml
@@ -29,6 +29,466 @@
         <artifactId>google-cloud-eventarc</artifactId>
         <version>1.5.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-eventarc:current} -->
       </dependency>
+      <dependency>
+        <groupId>com.google.api.grpc</groupId>
+        <artifactId>grpc-google-cloud-accessapproval-v1</artifactId>
+        <version>2.6.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-accessapproval-v1:current} -->
+      </dependency>
+      <dependency>
+        <groupId>com.google.api.grpc</groupId>
+        <artifactId>grpc-google-identity-accesscontextmanager-v1</artifactId>
+        <version>1.6.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-identity-accesscontextmanager-v1:current} -->
+      </dependency>
+      <dependency>
+        <groupId>com.google.api.grpc</groupId>
+        <artifactId>grpc-google-cloud-aiplatform-v1</artifactId>
+        <version>3.6.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-aiplatform-v1:current} -->
+      </dependency>
+      <dependency>
+        <groupId>com.google.api.grpc</groupId>
+        <artifactId>grpc-google-cloud-aiplatform-v1beta1</artifactId>
+        <version>0.22.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-aiplatform-v1beta1:current} -->
+      </dependency>
+      <dependency>
+        <groupId>com.google.api.grpc</groupId>
+        <artifactId>grpc-google-analytics-admin-v1alpha</artifactId>
+        <version>0.15.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-analytics-admin-v1alpha:current} -->
+      </dependency>
+      <dependency>
+        <groupId>com.google.api.grpc</groupId>
+        <artifactId>grpc-google-analytics-admin-v1beta</artifactId>
+        <version>0.15.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-analytics-admin-v1beta:current} -->
+      </dependency>
+      <dependency>
+        <groupId>com.google.api.grpc</groupId>
+        <artifactId>grpc-google-analytics-data-v1beta</artifactId>
+        <version>0.16.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-analytics-data-v1beta:current} -->
+      </dependency>
+      <dependency>
+        <groupId>com.google.api.grpc</groupId>
+        <artifactId>grpc-google-analytics-data-v1alpha</artifactId>
+        <version>0.16.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-analytics-data-v1alpha:current} -->
+      </dependency>

@suztomo suztomo marked this pull request as draft November 10, 2022 21:32
@suztomo suztomo closed this Nov 11, 2022
@suztomo suztomo reopened this Nov 15, 2022
@suztomo
Copy link
Member Author

suztomo commented Nov 15, 2022

It still tries to create unnecessary pom files

googleapis/google-cloud-java@9582175

image

@suztomo
Copy link
Member Author

suztomo commented Nov 15, 2022

With 97fed3c, now it does not create unnecessary bom artifacts: googleapis/google-cloud-java@b5fb1f0

print("creating missing versions.txt")
# For monorepo, we use the versions.txt at the root. The "./" is needed
# for the templates.render(), which tries to create a directory.
versions_txt_file = "../versions.txt" if monorepo else "./versions.txt"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the core of this change.

@suztomo suztomo marked this pull request as ready for review November 16, 2022 13:43
@suztomo suztomo added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 16, 2022
@suztomo suztomo merged commit 909f3c8 into googleapis:master Nov 16, 2022
@suztomo suztomo deleted the owlbot_java_monorepo_single_component branch November 16, 2022 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kokoro:force-run Add this label to force Kokoro to re-run the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants