Skip to content

Commit 26d4914

Browse files
committed
fix(workflow): resolve downstream path issues and remove deprecated pubsublite
1 parent be779aa commit 26d4914

5 files changed

Lines changed: 49 additions & 61 deletions

.github/workflows/ci.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
workflows:
4747
- '.github/workflows/**'
4848
src:
49-
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-pubsub|java-shared-config|java-spanner|java-storage)/**/*.java'
50-
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-pubsub|java-shared-config|java-spanner|java-storage)/**/pom.xml'
49+
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-shared-config|java-spanner|java-storage)/**/*.java'
50+
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-shared-config|java-spanner|java-storage)/**/pom.xml'
5151
- 'pom.xml'
5252
ci:
5353
- '.github/workflows/ci.yaml'
@@ -169,6 +169,13 @@ jobs:
169169
- 'sdk-platform-java/**/*.java'
170170
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
171171
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
172+
java-logging-logback:
173+
- 'java-logging-logback/**'
174+
- 'google-auth-library-java/**/*.java'
175+
- 'google-auth-library-java/**/pom.xml'
176+
- 'sdk-platform-java/**/*.java'
177+
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
178+
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
172179
java-logging:
173180
- 'java-logging/**'
174181
- 'google-auth-library-java/**/*.java'

.github/workflows/java-shared-config-downstream-dependencies.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,19 @@ jobs:
5151
run: |
5252
LIB_DIR="${{matrix.repo}}"
5353
LIB_NAME="google-cloud-${LIB_DIR#java-}"
54-
mvn install -pl ${LIB_DIR}/${LIB_NAME} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
54+
TARGET_PATH="${LIB_DIR}/${LIB_NAME}"
55+
# Check if target matches standard structure (e.g. java-bigquery/google-cloud-bigquery)
56+
if [ ! -d "${TARGET_PATH}" ]; then
57+
# Fallback 1: Look for any google-cloud-* directory, excluding samples, retrofit, or BOMs (e.g. java-storage-nio/google-cloud-nio)
58+
ALT_PATH=$(find "${LIB_DIR}" -maxdepth 1 -type d -name "google-cloud-*" ! -name "*-bom" ! -name "*-parent" ! -name "*-deps-bom" ! -name "*-examples" ! -name "*samples" ! -name "*-retrofit" | head -n 1)
59+
if [ -n "${ALT_PATH}" ]; then
60+
TARGET_PATH="${ALT_PATH}"
61+
else
62+
# Fallback 2: Assume single-module project where pom.xml is in the root directory (e.g. java-logging-logback)
63+
TARGET_PATH="${LIB_DIR}"
64+
fi
65+
fi
66+
mvn install -pl ${TARGET_PATH} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
5567
- run: .kokoro/client-library-check.sh ${{matrix.repo}} dependencies
5668

5769
flatten-plugin-check:

.github/workflows/java-shared-config-downstream-maven-plugins.yaml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,19 @@ jobs:
9696
run: |
9797
LIB_DIR="${{matrix.repo}}"
9898
LIB_NAME="google-cloud-${LIB_DIR#java-}"
99-
mvn install -pl ${LIB_DIR}/${LIB_NAME} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
99+
TARGET_PATH="${LIB_DIR}/${LIB_NAME}"
100+
# Check if target matches standard structure (e.g. java-bigquery/google-cloud-bigquery)
101+
if [ ! -d "${TARGET_PATH}" ]; then
102+
# Fallback 1: Look for any google-cloud-* directory, excluding samples, retrofit, or BOMs (e.g. java-storage-nio/google-cloud-nio)
103+
ALT_PATH=$(find "${LIB_DIR}" -maxdepth 1 -type d -name "google-cloud-*" ! -name "*-bom" ! -name "*-parent" ! -name "*-deps-bom" ! -name "*-examples" ! -name "*samples" ! -name "*-retrofit" | head -n 1)
104+
if [ -n "${ALT_PATH}" ]; then
105+
TARGET_PATH="${ALT_PATH}"
106+
else
107+
# Fallback 2: Assume single-module project where pom.xml is in the root directory (e.g. java-logging-logback)
108+
TARGET_PATH="${LIB_DIR}"
109+
fi
110+
fi
111+
mvn install -pl ${TARGET_PATH} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
100112
- run: .kokoro/client-library-check.sh ${{matrix.repo}} ${{matrix.job-type}}
101113
javadoc-with-doclet:
102114
needs: filter
@@ -113,8 +125,8 @@ jobs:
113125
- java-spanner
114126
- java-spanner-jdbc
115127
- java-pubsub
116-
- java-pubsublite
117128
- java-logging
129+
- java-logging-logback
118130
- java-firestore
119131
- java-datastore
120132
- java-bigquerystorage
@@ -136,5 +148,17 @@ jobs:
136148
run: |
137149
LIB_DIR="${{matrix.repo}}"
138150
LIB_NAME="google-cloud-${LIB_DIR#java-}"
139-
mvn install -pl ${LIB_DIR}/${LIB_NAME} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
151+
TARGET_PATH="${LIB_DIR}/${LIB_NAME}"
152+
# Check if target matches standard structure (e.g. java-bigquery/google-cloud-bigquery)
153+
if [ ! -d "${TARGET_PATH}" ]; then
154+
# Fallback 1: Look for any google-cloud-* directory, excluding samples, retrofit, or BOMs (e.g. java-storage-nio/google-cloud-nio)
155+
ALT_PATH=$(find "${LIB_DIR}" -maxdepth 1 -type d -name "google-cloud-*" ! -name "*-bom" ! -name "*-parent" ! -name "*-deps-bom" ! -name "*-examples" ! -name "*samples" ! -name "*-retrofit" | head -n 1)
156+
if [ -n "${ALT_PATH}" ]; then
157+
TARGET_PATH="${ALT_PATH}"
158+
else
159+
# Fallback 2: Assume single-module project where pom.xml is in the root directory (e.g. java-logging-logback)
160+
TARGET_PATH="${LIB_DIR}"
161+
fi
162+
fi
163+
mvn install -pl ${TARGET_PATH} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
140164
- run: .kokoro/client-library-check-doclet.sh ${{matrix.repo}}

.github/workflows/sdk-platform-java-downstream.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
- java-bigtable
3838
- java-firestore
3939
- java-pubsub
40-
- java-pubsublite
4140
steps:
4241
- uses: actions/checkout@v3
4342
- uses: actions/setup-java@v3

.github/workflows/sdk-platform-java-downstream_protobuf_compatibility_check_nightly.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)