Skip to content

Commit ddef7d2

Browse files
authored
chore(pubsub): migrate java-pubsub to monorepo (#12963)
Using script from here: #12962.
2 parents 6ce87b7 + 044c8d0 commit ddef7d2

365 files changed

Lines changed: 201695 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
/google-auth-library-java/ @googleapis/cloud-sdk-auth-team @googleapis/cloud-sdk-java-team @googleapis/aion-team
1515
/java-storage/ @googleapis/gcs-team @googleapis/cloud-sdk-java-team
1616
/java-storage-nio/ @googleapis/gcs-team @googleapis/cloud-sdk-java-team
17+
/java-pubsub/ @googleapis/pubsub-team @googleapis/cloud-sdk-java-team

.github/workflows/ci.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
with:
3737
filters: |
3838
src:
39-
- '!(java-bigquery|java-bigquerystorage|java-datastore|java-logging-logback|java-logging|java-spanner|java-storage|google-auth-library-java)/**/*.java'
40-
- '!(java-bigquery|java-bigquerystorage|java-datastore|java-logging-logback|java-logging|java-spanner|java-storage|google-auth-library-java)/**/pom.xml'
39+
- '!(google-auth-library-java|java-bigquery|java-bigquerystorage|java-datastore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/*.java'
40+
- '!(google-auth-library-java|java-bigquery|java-bigquerystorage|java-datastore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/pom.xml'
4141
- 'pom.xml'
4242
ci:
4343
- '.github/workflows/ci.yaml'
@@ -171,6 +171,13 @@ jobs:
171171
- 'sdk-platform-java/**/*.java'
172172
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
173173
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
174+
java-pubsub:
175+
- 'java-pubsub/**'
176+
- 'google-auth-library-java/**/*.java'
177+
- 'google-auth-library-java/**/pom.xml'
178+
- 'sdk-platform-java/**/*.java'
179+
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
180+
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
174181
split-units:
175182
runs-on: ubuntu-latest
176183
needs: changes
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
16+
on:
17+
push:
18+
branches:
19+
- main
20+
pull_request:
21+
name: java-pubsub ci
22+
env:
23+
BUILD_SUBDIR: java-pubsub
24+
jobs:
25+
filter:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
library: ${{ steps.filter.outputs.library }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: dorny/paths-filter@v3
32+
id: filter
33+
with:
34+
filters: |
35+
library:
36+
- 'java-pubsub/**'
37+
units:
38+
needs: filter
39+
if: ${{ needs.filter.outputs.library == 'true' }}
40+
runs-on: ubuntu-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
java: [11, 17, 21, 25]
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions/setup-java@v4
48+
with:
49+
distribution: temurin
50+
java-version: ${{matrix.java}}
51+
- run: java -version
52+
- run: .kokoro/build.sh
53+
env:
54+
JOB_TYPE: test
55+
units-java8:
56+
needs: filter
57+
if: ${{ needs.filter.outputs.library == 'true' }}
58+
# Building using Java 17 and run the tests with Java 8 runtime
59+
name: "units (8)"
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: actions/setup-java@v4
64+
with:
65+
java-version: 11
66+
distribution: temurin
67+
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
68+
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
69+
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
70+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java -P !java17" >> $GITHUB_ENV
71+
shell: bash
72+
- uses: actions/setup-java@v4
73+
with:
74+
java-version: 17
75+
distribution: temurin
76+
- run: .kokoro/build.sh
77+
env:
78+
JOB_TYPE: test
79+
windows:
80+
needs: filter
81+
if: ${{ needs.filter.outputs.library == 'true' }}
82+
runs-on: windows-latest
83+
steps:
84+
- name: Support longpaths
85+
run: git config --system core.longpaths true
86+
- uses: actions/checkout@v4
87+
- uses: actions/setup-java@v4
88+
with:
89+
distribution: temurin
90+
java-version: 11
91+
- run: java -version
92+
- run: .kokoro/build.sh
93+
env:
94+
JOB_TYPE: test
95+
dependencies:
96+
needs: filter
97+
if: ${{ needs.filter.outputs.library == 'true' }}
98+
runs-on: ubuntu-latest
99+
strategy:
100+
matrix:
101+
java: [17]
102+
steps:
103+
- uses: actions/checkout@v4
104+
- uses: actions/setup-java@v4
105+
with:
106+
distribution: temurin
107+
java-version: ${{matrix.java}}
108+
- run: java -version
109+
- run: .kokoro/dependencies.sh
110+
javadoc:
111+
needs: filter
112+
if: ${{ needs.filter.outputs.library == 'true' }}
113+
runs-on: ubuntu-latest
114+
steps:
115+
- uses: actions/checkout@v4
116+
- uses: actions/setup-java@v4
117+
with:
118+
distribution: temurin
119+
java-version: 17
120+
- run: java -version
121+
- run: .kokoro/build.sh
122+
env:
123+
JOB_TYPE: javadoc
124+
lint:
125+
needs: filter
126+
if: ${{ needs.filter.outputs.library == 'true' }}
127+
runs-on: ubuntu-latest
128+
steps:
129+
- uses: actions/checkout@v4
130+
with:
131+
fetch-depth: 0
132+
- uses: actions/setup-java@v4
133+
with:
134+
distribution: temurin
135+
java-version: 17
136+
- run: java -version
137+
- run: .kokoro/build.sh
138+
env:
139+
JOB_TYPE: lint
140+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
141+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
142+
clirr:
143+
needs: filter
144+
if: ${{ needs.filter.outputs.library == 'true' }}
145+
runs-on: ubuntu-latest
146+
steps:
147+
- uses: actions/checkout@v4
148+
- uses: actions/setup-java@v4
149+
with:
150+
distribution: temurin
151+
java-version: 11
152+
- run: java -version
153+
- run: .kokoro/build.sh
154+
env:
155+
JOB_TYPE: clirr
156+
BUILD_SUBDIR: java-pubsub

.kokoro/common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ excluded_modules=(
3636
'google-auth-library-java/oauth2_http'
3737
'java-storage'
3838
'java-storage-nio'
39+
'java-pubsub'
3940
)
4041

4142
function retry_with_backoff {
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.62.0" # {x-version-update:google-cloud-shared-dependencies:current}
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "graalvm-single"
12+
}
13+
14+
# TODO: remove this after we've migrated all tests and scripts
15+
env_vars: {
16+
key: "GCLOUD_PROJECT"
17+
value: "gcloud-devel"
18+
}
19+
20+
env_vars: {
21+
key: "GOOGLE_CLOUD_PROJECT"
22+
value: "gcloud-devel"
23+
}
24+
25+
env_vars: {
26+
key: "GOOGLE_APPLICATION_CREDENTIALS"
27+
value: "secret_manager/java-it-service-account"
28+
}
29+
30+
env_vars: {
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-it-service-account"
33+
}
34+
35+
env_vars: {
36+
key: "IT_SERVICE_ACCOUNT_EMAIL"
37+
value: "it-service-account@gcloud-devel.iam.gserviceaccount.com"
38+
}
39+
env_vars: {
40+
key: "BUILD_SUBDIR"
41+
value: "java-pubsub"
42+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "integration-single"
12+
}
13+
14+
# TODO: remove this after we've migrated all tests and scripts
15+
env_vars: {
16+
key: "GCLOUD_PROJECT"
17+
value: "gcloud-devel"
18+
}
19+
20+
env_vars: {
21+
key: "GOOGLE_CLOUD_PROJECT"
22+
value: "gcloud-devel"
23+
}
24+
25+
env_vars: {
26+
key: "GOOGLE_APPLICATION_CREDENTIALS"
27+
value: "secret_manager/java-it-service-account"
28+
}
29+
30+
env_vars: {
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-it-service-account"
33+
}
34+
35+
36+
env_vars: {
37+
key: "BUILD_SUBDIR"
38+
value: "java-pubsub"
39+
}

gapic-libraries-bom/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,13 @@
10951095
<type>pom</type>
10961096
<scope>import</scope>
10971097
</dependency>
1098+
<dependency>
1099+
<groupId>com.google.cloud</groupId>
1100+
<artifactId>google-cloud-pubsub-bom</artifactId>
1101+
<version>1.150.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-pubsub:current} -->
1102+
<type>pom</type>
1103+
<scope>import</scope>
1104+
</dependency>
10981105
<dependency>
10991106
<groupId>com.google.cloud</groupId>
11001107
<artifactId>google-cloud-rapidmigrationassessment-bom</artifactId>

generation/check_non_release_please_versions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ for pomFile in $(find . -mindepth 2 -name pom.xml | sort ); do
2121
[[ "${pomFile}" =~ .*google-auth-library-java.* ]] || \
2222
[[ "${pomFile}" =~ .*java-storage.* ]] || \
2323
[[ "${pomFile}" =~ .*java-storage-nio.* ]] || \
24+
[[ "${pomFile}" =~ .*java-pubsub.* ]] || \
2425
[[ "${pomFile}" =~ .*java-vertexai.* ]] || \
2526
[[ "${pomFile}" =~ .*java-compute.* ]] || \
2627
[[ "${pomFile}" =~ .*.github*. ]]; then

generation_config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3094,3 +3094,24 @@ libraries:
30943094
- proto_path: google/iam/v2beta
30953095
- proto_path: google/iam/v3
30963096
- proto_path: google/iam/v3beta
3097+
- api_shortname: pubsub
3098+
name_pretty: Cloud Pub/Sub
3099+
api_reference: https://cloud.google.com/pubsub/
3100+
product_documentation: https://cloud.google.com/pubsub/docs/
3101+
client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-pubsub/latest/history
3102+
api_description: is designed to provide reliable, many-to-many, asynchronous messaging
3103+
between applications. Publisher applications can send messages to a topic and
3104+
other applications can subscribe to that topic to receive the messages. By decoupling
3105+
senders and receivers, Google Cloud Pub/Sub allows developers to communicate between
3106+
independently written applications.
3107+
issue_tracker: https://issuetracker.google.com/savedsearches/559741
3108+
release_level: stable
3109+
language: java
3110+
distribution_name: com.google.cloud:google-cloud-pubsub
3111+
codeowner_team: '@googleapis/pubsub-team'
3112+
api_id: pubsub.googleapis.com
3113+
library_type: GAPIC_COMBO
3114+
requires_billing: true
3115+
recommended_package: com.google.cloud.pubsub.v1
3116+
GAPICs:
3117+
- proto_path: google/pubsub/v1

0 commit comments

Comments
 (0)