From b4ed6421a3e32b9d249be33d20335ab45049a825 Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 21 Apr 2026 21:55:36 +0000 Subject: [PATCH 01/10] ci: add conditional-required-check for hermetic-build-scripts ci --- .github/workflows/hermetic-build-scripts-ci.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/hermetic-build-scripts-ci.yaml b/.github/workflows/hermetic-build-scripts-ci.yaml index 82657950c635..19c4434980c6 100644 --- a/.github/workflows/hermetic-build-scripts-ci.yaml +++ b/.github/workflows/hermetic-build-scripts-ci.yaml @@ -97,3 +97,14 @@ jobs: # exclude generated golden files # exclude owlbot until further refaction black --check hermetic_build --exclude "(library_generation/tests/resources/goldens)" + required: + needs: [ library-generation-unit-tests, library-generation-lint-shell, library-generation-lint-python ] + name: conditional-required-check + if: ${{ always() }} # Always run even if any "needs" jobs fail + runs-on: ubuntu-22.04 + steps: + - name: Fail if any previous failure + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + - name: Success otherwise + run: echo "Success!" \ No newline at end of file From 4b10a4a05edf94488e550aedb6019f2857a18bae Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 21 Apr 2026 22:01:59 +0000 Subject: [PATCH 02/10] ci: add conditional-required-check for split units --- .github/workflows/ci.yaml | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 862add9f8a30..075b6a9de99d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -246,6 +246,17 @@ jobs: JOB_TYPE: test JOB_NAME: units-8-runtime-${{matrix.java}} working-directory: ${{matrix.package}} + required: + needs: [ split-units, split-units-8 ] + name: conditional-required-check + if: ${{ always() }} # Always run even if any "needs" jobs fail + runs-on: ubuntu-22.04 + steps: + - name: Fail if any previous failure + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + - name: Success otherwise + run: echo "Success!" windows: runs-on: windows-latest steps: @@ -332,30 +343,3 @@ jobs: env: library_generation_image_tag: 2.68.0 workspace_name: /workspace - -# TODO: Uncomment the needed Github Actions -# dependencies: -# runs-on: ubuntu-latest -# strategy: -# matrix: -# java: [8, 11, 17] -# steps: -# - uses: actions/checkout@v3 -# - uses: actions/setup-java@v3 -# with: -# distribution: zulu -# java-version: ${{matrix.java}} -# - run: java -version -# - run: .kokoro/dependencies.sh -# clirr: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# - uses: actions/setup-java@v3 -# with: -# distribution: zulu -# java-version: 8 -# - run: java -version -# - run: .kokoro/build.sh -# env: -# JOB_TYPE: clirr From 3458af0ea1403496c53c3a6be6ad1119c4a7952b Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 21 Apr 2026 22:02:54 +0000 Subject: [PATCH 03/10] ci: add conditional-required-check for auth units --- .github/workflows/google-auth-library-java-ci.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/google-auth-library-java-ci.yaml b/.github/workflows/google-auth-library-java-ci.yaml index 39e584d3b6a5..1062e84d092b 100644 --- a/.github/workflows/google-auth-library-java-ci.yaml +++ b/.github/workflows/google-auth-library-java-ci.yaml @@ -34,6 +34,7 @@ jobs: filters: | library: - 'google-auth-library-java/**' + - ''.github/workflows/google-auth-library-java-ci.yaml' units-logging: needs: filter if: ${{ needs.filter.outputs.library == 'true' }} @@ -54,3 +55,14 @@ jobs: BUILD_SUBDIR: google-auth-library-java JOB_TYPE: test SUREFIRE_JVM_OPT: "-P '!slf4j2x,slf4j2x-test'" + required: + needs: [ units-logging ] + name: conditional-required-check + if: ${{ always() }} # Always run even if any "needs" jobs fail + runs-on: ubuntu-22.04 + steps: + - name: Fail if any previous failure + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + - name: Success otherwise + run: echo "Success!" \ No newline at end of file From f062f6bb846fec51b1b6e85745c2382aca7d9723 Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 21 Apr 2026 22:05:10 +0000 Subject: [PATCH 04/10] ci: add conditional-required-check for spanner-jdbc units --- .github/workflows/java-spanner-jdbc-ci.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/java-spanner-jdbc-ci.yaml b/.github/workflows/java-spanner-jdbc-ci.yaml index 7277662f729c..c3696d1b3291 100644 --- a/.github/workflows/java-spanner-jdbc-ci.yaml +++ b/.github/workflows/java-spanner-jdbc-ci.yaml @@ -34,6 +34,7 @@ jobs: filters: | library: - 'java-spanner-jdbc/**' + - '.github/workflows/java-spanner-jdbc-ci.yaml' units: needs: filter if: ${{ needs.filter.outputs.library == 'true' }} @@ -141,3 +142,14 @@ jobs: JOB_TYPE: lint HEAD_SHA: ${{ github.event.pull_request.head.sha }} BASE_SHA: ${{ github.event.pull_request.base.sha }} + required: + needs: [ units, units-java8, windows, dependencies, javadoc, lint ] + name: conditional-required-check + if: ${{ always() }} # Always run even if any "needs" jobs fail + runs-on: ubuntu-22.04 + steps: + - name: Fail if any previous failure + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + - name: Success otherwise + run: echo "Success!" From ecec7974d6664291c47752daceb1d51e0a5915b7 Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 21 Apr 2026 22:06:28 +0000 Subject: [PATCH 05/10] ci: add conditional-required-check for storage-nio units --- .github/workflows/java-storage-nio-ci.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/java-storage-nio-ci.yaml b/.github/workflows/java-storage-nio-ci.yaml index 857fc2cee181..06228e08737c 100644 --- a/.github/workflows/java-storage-nio-ci.yaml +++ b/.github/workflows/java-storage-nio-ci.yaml @@ -34,6 +34,7 @@ jobs: filters: | library: - 'java-storage-nio/**' + - '.github/workflows/java-storage-nio-ci.yaml' units: needs: filter if: ${{ needs.filter.outputs.library == 'true' }} @@ -141,3 +142,14 @@ jobs: JOB_TYPE: lint HEAD_SHA: ${{ github.event.pull_request.head.sha }} BASE_SHA: ${{ github.event.pull_request.base.sha }} + required: + needs: [ units, units-java8, windows, dependencies, javadoc, lint ] + name: conditional-required-check + if: ${{ always() }} # Always run even if any "needs" jobs fail + runs-on: ubuntu-22.04 + steps: + - name: Fail if any previous failure + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + - name: Success otherwise + run: echo "Success!" From 37f8889cefce20370c71f87b8f6f41725e3a8afc Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 21 Apr 2026 22:08:12 +0000 Subject: [PATCH 06/10] ci: add conditional-required-check for sdk-platform-java downstream tests --- .github/workflows/sdk-platform-java-downstream.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/sdk-platform-java-downstream.yaml b/.github/workflows/sdk-platform-java-downstream.yaml index 99c1864d2f6c..46adb4eea84d 100644 --- a/.github/workflows/sdk-platform-java-downstream.yaml +++ b/.github/workflows/sdk-platform-java-downstream.yaml @@ -24,6 +24,7 @@ jobs: library: - 'sdk-platform-java/**' - .kokoro/downstream-compatibility.sh + - .github/workflows/sdk-platform-java-downstream.yaml downstream-compatibility: needs: filter if: ${{ needs.filter.outputs.library == 'true' }} @@ -71,3 +72,14 @@ jobs: sudo apt-get -y install libxml2-utils - name: Perform downstream compatibility testing run: .kokoro/downstream-compatibility-spring.sh + required: + needs: [ downstream-compatibility, downstream-compatibility-spring-generator ] + name: conditional-required-check + if: ${{ always() }} # Always run even if any "needs" jobs fail + runs-on: ubuntu-22.04 + steps: + - name: Fail if any previous failure + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + - name: Success otherwise + run: echo "Success!" From 665b0e9813a1281ed55e256abbcf90a2bd2c16cd Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 21 Apr 2026 22:15:40 +0000 Subject: [PATCH 07/10] ci: add at least 1 job for split units confitional-required-check --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 075b6a9de99d..b7f73270605b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -247,7 +247,7 @@ jobs: JOB_NAME: units-8-runtime-${{matrix.java}} working-directory: ${{matrix.package}} required: - needs: [ split-units, split-units-8 ] + needs: [ changes, split-units, split-units-8 ] name: conditional-required-check if: ${{ always() }} # Always run even if any "needs" jobs fail runs-on: ubuntu-22.04 From 400081c2e64b447b9bcaacb9cfb4731d0483cf3c Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 21 Apr 2026 22:27:07 +0000 Subject: [PATCH 08/10] ci: add conditional-required-check for shared-dependencies downstream tests --- ...a-downstream_unmanaged_dependency_check.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml b/.github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml index e68610513e00..0a7593bd5613 100644 --- a/.github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml +++ b/.github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml @@ -3,9 +3,6 @@ on: branches: - main pull_request: - paths: - - .github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml - - sdk-platform-java/java-shared-dependencies/** name: sdk-platform-java Downstream Unmanaged Dependency Check env: @@ -22,7 +19,8 @@ jobs: with: filters: | library: - - 'sdk-platform-java/**' + - 'sdk-platform-java/java-shared-dependencies/**' + - '.github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml' validate: needs: filter if: ${{ needs.filter.outputs.library == 'true' }} @@ -96,3 +94,14 @@ jobs: exit 1 fi echo "Unmanaged dependency check passed" + required: + needs: [ validate ] + name: conditional-required-check + if: ${{ always() }} # Always run even if any "needs" jobs fail + runs-on: ubuntu-22.04 + steps: + - name: Fail if any previous failure + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + - name: Success otherwise + run: echo "Success!" From fda797bcb6d6f8c712b37fb41b982421388433c2 Mon Sep 17 00:00:00 2001 From: chingor13 Date: Wed, 22 Apr 2026 00:18:57 +0000 Subject: [PATCH 09/10] trigger auth tests when workflow touched --- .github/workflows/google-auth-library-java-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/google-auth-library-java-ci.yaml b/.github/workflows/google-auth-library-java-ci.yaml index 1062e84d092b..1f1ff7e78467 100644 --- a/.github/workflows/google-auth-library-java-ci.yaml +++ b/.github/workflows/google-auth-library-java-ci.yaml @@ -34,7 +34,7 @@ jobs: filters: | library: - 'google-auth-library-java/**' - - ''.github/workflows/google-auth-library-java-ci.yaml' + - '.github/workflows/google-auth-library-java-ci.yaml' units-logging: needs: filter if: ${{ needs.filter.outputs.library == 'true' }} From 4d875fff59bd76f7f429a59c28482d174bf4976d Mon Sep 17 00:00:00 2001 From: chingor13 Date: Wed, 22 Apr 2026 00:19:28 +0000 Subject: [PATCH 10/10] fix logic when split units is empty --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b7f73270605b..65d84a8e06b7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -247,13 +247,13 @@ jobs: JOB_NAME: units-8-runtime-${{matrix.java}} working-directory: ${{matrix.package}} required: - needs: [ changes, split-units, split-units-8 ] + needs: [ changes, split-units ] name: conditional-required-check if: ${{ always() }} # Always run even if any "needs" jobs fail runs-on: ubuntu-22.04 steps: - name: Fail if any previous failure - if: ${{ contains(needs.*.result, 'failure') }} + if: ${{ needs.changes.outputs.packages != '[]' && contains(needs.*.result, 'failure') }} run: exit 1 - name: Success otherwise run: echo "Success!"