This is an automated email from the ASF dual-hosted git repository.

HTHou pushed a commit to branch rc/2.0.10
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rc/2.0.10 by this push:
     new 0c08f96f8b2 CI: replace paths-filter with bash on rc/2.0.10 (#18074)
0c08f96f8b2 is described below

commit 0c08f96f8b21d8af2565e8b9e031b836ee6f7087
Author: Hongzhi Gao <[email protected]>
AuthorDate: Tue Jun 30 18:42:04 2026 +0800

    CI: replace paths-filter with bash on rc/2.0.10 (#18074)
    
    Backport the client workflow path detection change from eef45ff778 so
    apache/iotdb Actions startup is not blocked by the dorny/paths-filter
    allowlist policy on rc branch pushes.
---
 .github/workflows/client-cpp-package.yml    | 34 +++++++++----
 .github/workflows/multi-language-client.yml | 79 ++++++++++++++++++-----------
 2 files changed, 73 insertions(+), 40 deletions(-)

diff --git a/.github/workflows/client-cpp-package.yml 
b/.github/workflows/client-cpp-package.yml
index 4eb889b0136..3c8c2b2844f 100644
--- a/.github/workflows/client-cpp-package.yml
+++ b/.github/workflows/client-cpp-package.yml
@@ -46,18 +46,32 @@ jobs:
     steps:
       - uses: actions/checkout@v5
         if: github.event_name == 'push' && startsWith(github.ref, 
'refs/heads/rc/')
-      - uses: dorny/paths-filter@v3
+        with:
+          fetch-depth: 0
+      - name: Detect C++ package changes
         id: filter
         if: github.event_name == 'push' && startsWith(github.ref, 
'refs/heads/rc/')
-        with:
-          filters: |
-            cpp:
-              - 'iotdb-client/client-cpp/**'
-              - 'iotdb-client/pom.xml'
-              - 'iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift'
-              - 'iotdb-protocol/thrift-commons/src/main/thrift/common.thrift'
-              - '.github/workflows/client-cpp-package.yml'
-              - '.github/scripts/package-client-cpp-*.sh'
+        shell: bash
+        run: |
+          set -euo pipefail
+
+          BASE="${{ github.event.before }}"
+          HEAD="${{ github.sha }}"
+          if [[ "$BASE" =~ ^0+$ ]]; then
+            BASE="$(git hash-object -t tree /dev/null)"
+          fi
+
+          cpp=false
+          while IFS= read -r file; do
+            case "$file" in
+              
iotdb-client/client-cpp/*|iotdb-client/pom.xml|iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift|iotdb-protocol/thrift-commons/src/main/thrift/common.thrift|.github/workflows/client-cpp-package.yml|.github/scripts/package-client-cpp-*.sh)
+                cpp=true
+                break
+                ;;
+            esac
+          done < <(git diff --name-only "$BASE" "$HEAD")
+
+          echo "cpp=${cpp}" >> "$GITHUB_OUTPUT"
       - id: result
         shell: bash
         run: |
diff --git a/.github/workflows/multi-language-client.yml 
b/.github/workflows/multi-language-client.yml
index d40168e556e..14b36af9ecf 100644
--- a/.github/workflows/multi-language-client.yml
+++ b/.github/workflows/multi-language-client.yml
@@ -1,4 +1,4 @@
-# Shared client CI: run only affected language jobs via paths-filter.
+# Shared client CI: run only affected language jobs via changed path detection.
 name: Multi-Language Client
 on:
   push:
@@ -50,36 +50,55 @@ jobs:
       go: ${{ steps.filter.outputs.go }}
     steps:
       - uses: actions/checkout@v5
-      - uses: dorny/paths-filter@v3
-        id: filter
         with:
-          filters: |
-            cpp:
-              - 'iotdb-client/pom.xml'
-              - 'iotdb-client/client-cpp/**'
-              - 'iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift'
-              - 'iotdb-protocol/thrift-commons/src/main/thrift/common.thrift'
-              - '.github/workflows/multi-language-client.yml'
-              - '.github/workflows/client-cpp-package.yml'
-              - '.github/scripts/package-client-cpp-*.sh'
-            python:
-              - 'pom.xml'
-              - 'iotdb-client/pom.xml'
-              - 'iotdb-client/client-py/**'
-              - 'docker/src/main/Dockerfile-1c1d'
-              - '.github/workflows/multi-language-client.yml'
-            go:
-              - 'pom.xml'
-              - 'iotdb-core/**'
-              - 'iotdb-api/**'
-              - 'iotdb-protocol/**'
-              - 'distribution/**'
-              - 'integration-test/**'
-              - 'iotdb-client/session/**'
-              - 'iotdb-client/jdbc/**'
-              - 'iotdb-client/cli/**'
-              - 'iotdb-client/service-rpc/**'
-              - '.github/workflows/multi-language-client.yml'
+          fetch-depth: 0
+      - name: Detect changed client paths
+        id: filter
+        shell: bash
+        run: |
+          set -euo pipefail
+
+          if [[ "${{ github.event_name }}" == "pull_request" ]]; then
+            BASE="${{ github.event.pull_request.base.sha }}"
+            HEAD="${{ github.sha }}"
+          elif [[ "${{ github.event_name }}" == "push" ]]; then
+            BASE="${{ github.event.before }}"
+            HEAD="${{ github.sha }}"
+          else
+            echo "cpp=true" >> "$GITHUB_OUTPUT"
+            echo "python=true" >> "$GITHUB_OUTPUT"
+            echo "go=true" >> "$GITHUB_OUTPUT"
+            exit 0
+          fi
+
+          if [[ "$BASE" =~ ^0+$ ]]; then
+            BASE="$(git hash-object -t tree /dev/null)"
+          fi
+
+          cpp=false
+          python=false
+          go=false
+          while IFS= read -r file; do
+            case "$file" in
+              
iotdb-client/pom.xml|iotdb-client/client-cpp/*|iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift|iotdb-protocol/thrift-commons/src/main/thrift/common.thrift|.github/workflows/multi-language-client.yml|.github/workflows/client-cpp-package.yml|.github/scripts/package-client-cpp-*.sh)
+                cpp=true
+                ;;
+            esac
+            case "$file" in
+              
pom.xml|iotdb-client/pom.xml|iotdb-client/client-py/*|docker/src/main/Dockerfile-1c1d|.github/workflows/multi-language-client.yml)
+                python=true
+                ;;
+            esac
+            case "$file" in
+              
pom.xml|iotdb-core/*|iotdb-api/*|iotdb-protocol/*|distribution/*|integration-test/*|iotdb-client/session/*|iotdb-client/jdbc/*|iotdb-client/cli/*|iotdb-client/service-rpc/*|.github/workflows/multi-language-client.yml)
+                go=true
+                ;;
+            esac
+          done < <(git diff --name-only "$BASE" "$HEAD")
+
+          echo "cpp=${cpp}" >> "$GITHUB_OUTPUT"
+          echo "python=${python}" >> "$GITHUB_OUTPUT"
+          echo "go=${go}" >> "$GITHUB_OUTPUT"
 
   cpp:
     needs: changes

Reply via email to