Skip to content

Commit 3ea90ef

Browse files
chingor13cloud-java-botmeltsufin
authored
refactor: move java-common-protos, java-iam, java-showcase to top level (#12839)
Currently, the hermetic code generator can only move files to top level folders. Rather than changing the generator, we will move the generated code to the top level to also make it compatible with librarian. Other fixes: * The hermetic_build scripts had special case logic to force regeneration of the entire repository if the common protos were found in the generation_config.yaml. This is no longer necessary in google-cloud-java as the nightly build regenerates everything * Includes the OTel wait for metrics fix similar to #12880 * Removes configuration for GCS Maven Mirror as that mirror is no longer updated and is missing dependencies Towards #12735 Towards #12702 --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com> Co-authored-by: Mike Eltsufin <meltsufin@google.com>
1 parent d0c6e9a commit 3ea90ef

1,305 files changed

Lines changed: 9967 additions & 1631 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/workflows/hermetic_library_generation.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ jobs:
4747
head_ref: ${{ github.head_ref }}
4848
token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
4949
force_regenerate_all: ${{ github.event.pull_request.head.ref == 'generate-libraries-main' }}
50+
showcase_mode: true
5051
image_tag: ${{ env.GENERATOR_VERSION }}

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

Lines changed: 0 additions & 196 deletions
Original file line numberDiff line numberDiff line change
@@ -300,202 +300,6 @@ jobs:
300300
echo "All class files are compatible with Java 8."
301301
working-directory: sdk-platform-java
302302

303-
build-java8-showcase:
304-
needs: filter
305-
if: ${{ needs.filter.outputs.library == 'true' }}
306-
name: "build(8) for showcase"
307-
runs-on: ubuntu-22.04
308-
steps:
309-
- uses: actions/checkout@v4
310-
- uses: actions/setup-java@v4
311-
with:
312-
java-version: 11
313-
distribution: temurin
314-
cache: maven
315-
- name: Install all modules using Java 11
316-
shell: bash
317-
run: .kokoro/build.sh
318-
env:
319-
BUILD_SUBDIR: sdk-platform-java
320-
JOB_TYPE: install
321-
- uses: actions/setup-java@v3
322-
with:
323-
java-version: 8
324-
distribution: temurin
325-
- run: java -version
326-
- name: Parse showcase version
327-
working-directory: sdk-platform-java/java-showcase/gapic-showcase
328-
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
329-
- name: Install showcase server
330-
run: |
331-
sudo mkdir -p /usr/src/showcase
332-
sudo chown -R ${USER} /usr/src/
333-
curl --location https://github.com/googleapis/gapic-showcase/releases/download/v${{env.SHOWCASE_VERSION}}/gapic-showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz --output /usr/src/showcase/showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz
334-
cd /usr/src/showcase/
335-
tar -xf showcase-*
336-
./gapic-showcase run &
337-
cd -
338-
- name: Showcase integration tests
339-
working-directory: sdk-platform-java/java-showcase
340-
run: |
341-
mvn verify \
342-
-P enable-integration-tests \
343-
--batch-mode \
344-
--no-transfer-progress
345-
# The `slf4j1_logback` profile brings logging dependency and compiles logging tests, require env var to be set
346-
- name: Showcase integration tests - Logging SLF4J 1.x
347-
working-directory: sdk-platform-java/java-showcase
348-
run: |
349-
mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,slf4j1_logback' \
350-
--batch-mode \
351-
--no-transfer-progress
352-
# Set the Env Var for this step only
353-
env:
354-
GOOGLE_SDK_JAVA_LOGGING: true
355-
# The `disabledLogging` profile tests logging disabled when logging dependency present,
356-
# do not set env var for this step
357-
- name: Showcase integration tests - Logging disabed
358-
working-directory: sdk-platform-java/java-showcase
359-
run: |
360-
mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,disabledLogging' \
361-
--batch-mode \
362-
--no-transfer-progress
363-
- name: Showcase integration tests - Protobuf gen code 3.25.8
364-
working-directory: sdk-platform-java/java-showcase-3.25.8
365-
run: |
366-
mvn verify \
367-
-P enable-integration-tests \
368-
--batch-mode \
369-
--no-transfer-progress
370-
- name: Showcase integration tests - Protobuf gen code 3.21.0
371-
working-directory: sdk-platform-java/java-showcase-3.21.0
372-
run: |
373-
mvn verify \
374-
-P enable-integration-tests \
375-
--batch-mode \
376-
--no-transfer-progress
377-
showcase:
378-
needs: filter
379-
if: ${{ needs.filter.outputs.library == 'true' }}
380-
runs-on: ubuntu-22.04
381-
strategy:
382-
matrix:
383-
java: [ 11, 17, 21, 25 ]
384-
steps:
385-
- uses: actions/checkout@v4
386-
- uses: actions/setup-java@v4
387-
with:
388-
java-version: ${{ matrix.java }}
389-
distribution: temurin
390-
- run: mvn -version
391-
- name: Install Maven modules
392-
shell: bash
393-
run: .kokoro/build.sh
394-
env:
395-
BUILD_SUBDIR: sdk-platform-java
396-
JOB_TYPE: test
397-
- name: Showcase golden tests
398-
working-directory: sdk-platform-java/java-showcase
399-
run: |
400-
mvn test \
401-
-P enable-golden-tests \
402-
--batch-mode \
403-
--no-transfer-progress
404-
- name: Parse showcase version
405-
working-directory: sdk-platform-java/java-showcase/gapic-showcase
406-
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
407-
- name: Install showcase server
408-
run: |
409-
sudo mkdir -p /usr/src/showcase
410-
sudo chown -R ${USER} /usr/src/
411-
curl --location https://github.com/googleapis/gapic-showcase/releases/download/v${{env.SHOWCASE_VERSION}}/gapic-showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz --output /usr/src/showcase/showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz
412-
cd /usr/src/showcase/
413-
tar -xf showcase-*
414-
./gapic-showcase run &
415-
cd -
416-
- name: Showcase integration tests
417-
working-directory: sdk-platform-java/java-showcase
418-
run: |
419-
mvn verify \
420-
-P enable-integration-tests \
421-
--batch-mode \
422-
--no-transfer-progress
423-
# The `slf4j2_logback` profile brings logging dependency and compiles logging tests, require env var to be set
424-
- name: Showcase integration tests - Logging SLF4J 2.x
425-
working-directory: sdk-platform-java/java-showcase
426-
run: |
427-
mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,slf4j2_logback' \
428-
--batch-mode \
429-
--no-transfer-progress
430-
# Set the Env Var for this step only
431-
env:
432-
GOOGLE_SDK_JAVA_LOGGING: true
433-
# The `slf4j1_logback` profile brings logging dependency and compiles logging tests, require env var to be set
434-
- name: Showcase integration tests - Logging SLF4J 1.x
435-
working-directory: sdk-platform-java/java-showcase
436-
run: |
437-
mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,slf4j1_logback' \
438-
--batch-mode \
439-
--no-transfer-progress
440-
# Set the Env Var for this step only
441-
env:
442-
GOOGLE_SDK_JAVA_LOGGING: true
443-
# The `disabledLogging` profile tests logging disabled when logging dependency present,
444-
# do not set env var for this step
445-
- name: Showcase integration tests - Logging disabed
446-
working-directory: sdk-platform-java/java-showcase
447-
run: |
448-
mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,disabledLogging' \
449-
--batch-mode \
450-
--no-transfer-progress
451-
- name: Showcase integration tests - Protobuf 3 compatibility with third party library Tensorflow
452-
working-directory: sdk-platform-java/java-showcase
453-
run: |
454-
mvn clean verify -P 'enable-integration-tests,protobuf3,showcase' \
455-
--batch-mode \
456-
--no-transfer-progress
457-
458-
showcase-clirr:
459-
needs: filter
460-
if: ${{ (needs.filter.outputs.library == 'true') && github.base_ref != '' }} # Only execute on pull_request trigger event
461-
runs-on: ubuntu-22.04
462-
steps:
463-
- name: Checkout @ target branch
464-
uses: actions/checkout@v4
465-
with:
466-
ref: ${{ github.base_ref }}
467-
- uses: actions/setup-java@v4
468-
with:
469-
java-version: 17
470-
distribution: temurin
471-
cache: maven
472-
- name: Install Maven modules
473-
shell: bash
474-
run: .kokoro/build.sh
475-
env:
476-
BUILD_SUBDIR: sdk-platform-java
477-
JOB_TYPE: install
478-
- name: Install showcase to local maven repository
479-
run: |
480-
mvn install -B -ntp -T 1C -DskipTests
481-
SHOWCASE_CLIENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
482-
echo "SHOWCASE_CLIENT_VERSION=$SHOWCASE_CLIENT_VERSION" >> "$GITHUB_ENV"
483-
working-directory: sdk-platform-java/java-showcase
484-
- name: Checkout sdk-platform-java @ PR merge commit
485-
uses: actions/checkout@v3
486-
- name: Install sdk-platform-java @ PR merge commit
487-
shell: bash
488-
run: .kokoro/build.sh
489-
env:
490-
JOB_TYPE: install
491-
BUILD_SUBDIR: sdk-platform-java
492-
# Showcase golden test ensures that src changes are already reflected in the PR.
493-
- name: Clirr check
494-
working-directory: sdk-platform-java/java-showcase
495-
run: |
496-
mvn versions:set -B -ntp -DnewVersion=local
497-
mvn clirr:check -B -ntp -DcomparisonVersion=$SHOWCASE_CLIENT_VERSION
498-
499303
gapic-generator-java-bom:
500304
needs: filter
501305
if: ${{ needs.filter.outputs.library == 'true' }}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070

7171
# Set up local showcase server to run the showcase ITs
7272
- name: Parse showcase version
73-
working-directory: sdk-platform-java/java-showcase/gapic-showcase
73+
working-directory: java-showcase/gapic-showcase
7474
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
7575
- name: Install showcase server
7676
run: |
@@ -89,8 +89,8 @@ jobs:
8989
# Need to cd out of the directory to get the scripts as this step is run inside the java-showcase directory
9090
run: |
9191
if [[ -n "${{ env.DEPENDENCIES_LIST }}" ]]; then
92-
../.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}
92+
../sdk-platform-java/.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}
9393
else
94-
../.github/scripts/test_dependency_compatibility.sh -f ../dependencies.txt
94+
../sdk-platform-java/.github/scripts/test_dependency_compatibility.sh -f ../sdk-platform-java/dependencies.txt
9595
fi
96-
working-directory: sdk-platform-java/java-showcase
96+
working-directory: java-showcase

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ jobs:
5656
- name: Install java-showcase
5757
shell: bash
5858
run: mvn install -T 1C -DskipTests -ntp -B
59-
working-directory: sdk-platform-java/java-showcase
59+
working-directory: java-showcase
6060
- name: Parse showcase version
61-
working-directory: sdk-platform-java/java-showcase/gapic-showcase
61+
working-directory: java-showcase/gapic-showcase
6262
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
6363
- name: Install showcase server
6464
run: |

0 commit comments

Comments
 (0)