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

terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 06b7fab7478 Scope heavyweight MCP E2E triggers (#38769)
06b7fab7478 is described below

commit 06b7fab74783f88fdb131e50616066df14a0cbd1
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Jun 2 12:14:13 2026 +0800

    Scope heavyweight MCP E2E triggers (#38769)
    
    * Scope heavyweight MCP E2E triggers
    
    Refine heavyweight GitHub Action triggers so unrelated changes avoid running
    MCP, LLM, distribution, and agent E2E jobs unnecessarily.
    
    - Narrow MCP LLM smoke and usability E2E path filters to runtime and LLM 
harness inputs.
    - Gate JDK 21 MCP subchain jobs with inline path-filter categories.
    - Rename the programmatic contract category to mcp_http_contract.
    - Exclude MCP and release-doc-only changes from agent E2E triggers.
    
    * Scope heavyweight MCP E2E triggers
    
    Refine heavyweight GitHub Action triggers so unrelated changes avoid running
    MCP, LLM, distribution, and agent E2E jobs unnecessarily.
    
    - Narrow MCP LLM smoke and usability E2E path filters to runtime and LLM 
harness inputs.
    - Gate JDK 21 MCP subchain jobs with inline path-filter categories.
    - Rename the programmatic contract category to mcp_http_contract.
    - Exclude MCP and release-doc-only changes from agent E2E triggers.
---
 .github/workflows/e2e-agent.yml             |  2 +
 .github/workflows/jdk21-subchain-ci.yml     | 62 ++++++++++++++++++++++++-----
 .github/workflows/mcp-llm-e2e.yml           |  2 +-
 .github/workflows/mcp-llm-usability-e2e.yml |  2 +-
 4 files changed, 56 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/e2e-agent.yml b/.github/workflows/e2e-agent.yml
index eeabcbd9e24..7ea83ae38c5 100644
--- a/.github/workflows/e2e-agent.yml
+++ b/.github/workflows/e2e-agent.yml
@@ -24,12 +24,14 @@ on:
       - '.github/workflows/e2e-agent.yml'
       - '**/pom.xml'
       - '**/src/main/**'
+      - '!mcp/**'
       - '!test/**'
       - 'test/pom.xml'
       - 'test/e2e/agent/**'
       - '!distribution/**'
       - 'distribution/proxy/**'
       - 'distribution/jdbc/**'
+      - '!distribution/**/src/main/release-docs/**'
       - '!examples/**'
       - '!*.md'
   workflow_dispatch:
diff --git a/.github/workflows/jdk21-subchain-ci.yml 
b/.github/workflows/jdk21-subchain-ci.yml
index a2ae20aaf18..ff027793a1a 100644
--- a/.github/workflows/jdk21-subchain-ci.yml
+++ b/.github/workflows/jdk21-subchain-ci.yml
@@ -28,8 +28,6 @@ on:
       - 'distribution/mcp/**'
       - 'test/e2e/pom.xml'
       - 'test/e2e/mcp/**'
-      - '.specify/specs/*mcp*/**'
-      - '.github/workflows/mcp-llm-usability-e2e.yml'
       - '.github/workflows/mcp-build.yml'
   workflow_dispatch:
 
@@ -48,10 +46,54 @@ jobs:
     name: Import Global Environment
     uses: ./.github/workflows/required-reusable.yml
 
-  mcp-default-e2e:
-    name: MCP E2E - Default Reactor
+  detect-changed-files:
+    name: Detect Changed Files
     if: github.repository == 'apache/shardingsphere'
-    needs: global-environment
+    runs-on: ubuntu-latest
+    timeout-minutes: 5
+    steps:
+      - uses: actions/[email protected]
+      - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d
+        id: filter
+        with:
+          token: ${{ github.token }}
+          filters: |
+            mcp_http_contract:
+              - '.github/workflows/jdk21-subchain-ci.yml'
+              - 'pom.xml'
+              - 'mcp/**'
+              - 'test/e2e/pom.xml'
+              - 'test/e2e/mcp/**'
+            mcp_mysql:
+              - '.github/workflows/jdk21-subchain-ci.yml'
+              - 'pom.xml'
+              - 'mcp/**'
+              - 'test/e2e/pom.xml'
+              - 'test/e2e/mcp/**'
+            mcp_distribution:
+              - '.github/workflows/jdk21-subchain-ci.yml'
+              - '.github/workflows/mcp-build.yml'
+              - 'pom.xml'
+              - 'mcp/**'
+              - 'distribution/pom.xml'
+              - 'distribution/mcp/**'
+              - 'test/e2e/pom.xml'
+              - 'test/e2e/mcp/**'
+      - name: Logs
+        run: |
+          echo "changed-categories=${{ steps.filter.outputs.changes }}"
+          echo "mcp-http-contract=${{ steps.filter.outputs.mcp_http_contract 
}}"
+          echo "mcp-mysql=${{ steps.filter.outputs.mcp_mysql }}"
+          echo "mcp-distribution=${{ steps.filter.outputs.mcp_distribution }}"
+    outputs:
+      mcp_http_contract: ${{ steps.filter.outputs.mcp_http_contract }}
+      mcp_mysql: ${{ steps.filter.outputs.mcp_mysql }}
+      mcp_distribution: ${{ steps.filter.outputs.mcp_distribution }}
+
+  mcp-http-contract-e2e:
+    name: MCP E2E - HTTP Contract
+    if: github.repository == 'apache/shardingsphere' && (github.event_name == 
'workflow_dispatch' || needs.detect-changed-files.outputs.mcp_http_contract == 
'true')
+    needs: [ global-environment, detect-changed-files ]
     runs-on: ubuntu-latest
     timeout-minutes: 30
     steps:
@@ -62,13 +104,13 @@ jobs:
           cache-prefix: ${{ 
needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}
           cache-suffix: 'mcp'
           enable-docker-setup: 'true'
-      - name: Run MCP Default E2E
+      - name: Run MCP HTTP Contract E2E
         run: ./mvnw -pl mcp,test/e2e/mcp -am install -DskipITs 
-Dspotless.skip=true -Dsurefire.failIfNoSpecifiedTests=false 
-Dmcp.e2e.contract.enabled=true -B -ntp
 
   mcp-mysql-e2e:
     name: MCP E2E - MySQL HTTP and STDIO
-    if: github.repository == 'apache/shardingsphere'
-    needs: global-environment
+    if: github.repository == 'apache/shardingsphere' && (github.event_name == 
'workflow_dispatch' || needs.detect-changed-files.outputs.mcp_mysql == 'true')
+    needs: [ global-environment, detect-changed-files ]
     runs-on: ubuntu-latest
     timeout-minutes: 30
     steps:
@@ -93,8 +135,8 @@ jobs:
 
   mcp-distribution-e2e:
     name: MCP E2E - Distribution
-    if: github.repository == 'apache/shardingsphere'
-    needs: global-environment
+    if: github.repository == 'apache/shardingsphere' && (github.event_name == 
'workflow_dispatch' || needs.detect-changed-files.outputs.mcp_distribution == 
'true')
+    needs: [ global-environment, detect-changed-files ]
     runs-on: ubuntu-latest
     timeout-minutes: 60
     steps:
diff --git a/.github/workflows/mcp-llm-e2e.yml 
b/.github/workflows/mcp-llm-e2e.yml
index fec2770185f..21b9193c21a 100644
--- a/.github/workflows/mcp-llm-e2e.yml
+++ b/.github/workflows/mcp-llm-e2e.yml
@@ -28,7 +28,7 @@ on:
     paths:
       - '.github/workflows/mcp-llm-e2e.yml'
       - 'mcp/**'
-      - 'distribution/mcp/**'
+      - 'test/e2e/pom.xml'
       - 'test/e2e/mcp/**'
   schedule:
     - cron: '0 17 * * 1-5'
diff --git a/.github/workflows/mcp-llm-usability-e2e.yml 
b/.github/workflows/mcp-llm-usability-e2e.yml
index 41c2e4a66b3..88222c6cc94 100644
--- a/.github/workflows/mcp-llm-usability-e2e.yml
+++ b/.github/workflows/mcp-llm-usability-e2e.yml
@@ -28,7 +28,7 @@ on:
     paths:
       - '.github/workflows/mcp-llm-usability-e2e.yml'
       - 'mcp/**'
-      - 'distribution/mcp/**'
+      - 'test/e2e/pom.xml'
       - 'test/e2e/mcp/**'
   schedule:
     - cron: '0 19 * * 1-5'

Reply via email to