Refactor MCPToolElicitationHandler #300
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # | |
| name: JDK 21 Subchain - E2E | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| paths: | |
| - '.github/workflows/jdk21-subchain-ci.yml' | |
| - 'pom.xml' | |
| - 'mcp/**' | |
| - 'distribution/pom.xml' | |
| - '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: | |
| concurrency: | |
| group: jdk21-subchain-e2e-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dspotless.apply.skip=true | |
| jobs: | |
| global-environment: | |
| name: Import Global Environment | |
| uses: ./.github/workflows/required-reusable.yml | |
| mcp-default-e2e: | |
| name: MCP E2E - Default Reactor | |
| if: github.repository == 'apache/shardingsphere' | |
| needs: global-environment | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| - uses: ./.github/workflows/resources/actions/setup-build-environment | |
| with: | |
| java-version: '21' | |
| cache-prefix: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }} | |
| cache-suffix: 'mcp' | |
| enable-docker-setup: 'true' | |
| - name: Run MCP Default 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 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| - uses: ./.github/workflows/resources/actions/setup-build-environment | |
| with: | |
| java-version: '21' | |
| cache-prefix: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }} | |
| cache-suffix: 'mcp' | |
| enable-docker-setup: 'true' | |
| - name: Install MCP E2E Test Dependencies | |
| run: ./mvnw -pl test/e2e/mcp -am install -DskipTests -DskipITs -Dspotless.skip=true -B -ntp | |
| - name: Run MCP MySQL HTTP and STDIO E2E | |
| run: > | |
| ./mvnw -pl test/e2e/mcp test | |
| -DskipITs -Dspotless.skip=true | |
| -Dtest=ProductionMySQLRuntimeE2ETest,HttpProductionProxyEncryptWorkflowE2ETest,HttpProductionProxyMaskWorkflowE2ETest | |
| -Dsurefire.failIfNoSpecifiedTests=true | |
| -Dmcp.e2e.production.mysql.enabled=true | |
| -Dmcp.e2e.production.stdio.enabled=true | |
| -B -ntp | |
| mcp-distribution-e2e: | |
| name: MCP E2E - Distribution | |
| if: github.repository == 'apache/shardingsphere' | |
| needs: global-environment | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| - uses: ./.github/workflows/resources/actions/setup-build-environment | |
| with: | |
| java-version: '21' | |
| cache-prefix: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }} | |
| cache-suffix: 'mcp' | |
| enable-docker-setup: 'true' | |
| - name: Test MCP Registry Metadata Command | |
| run: ./mvnw -pl mcp/registry -am -DskipITs -Dspotless.skip=true -Dtest=MCPRegistryMetadataCommandTest -Dsurefire.failIfNoSpecifiedTests=false install -B -ntp | |
| - name: Package MCP Distribution | |
| run: ./mvnw -pl distribution/mcp -am -DskipTests package -B -ntp | |
| - name: Build MCP Docker Image | |
| run: docker build -f distribution/mcp/Dockerfile -t shardingsphere-mcp-ci:local distribution/mcp/target | |
| - name: Validate MCP Registry Metadata | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| DISTRIBUTION_HOME=$(find distribution/mcp/target -maxdepth 1 -type d -name 'apache-shardingsphere-mcp-*' | head -n 1) | |
| if [[ -z "${DISTRIBUTION_HOME}" ]]; then | |
| echo "Packaged MCP distribution was not found." 1>&2 | |
| exit 1 | |
| fi | |
| test -f "${DISTRIBUTION_HOME}/conf/mcp-http.yaml" | |
| test -f "${DISTRIBUTION_HOME}/conf/mcp-stdio.yaml" | |
| ./mvnw -pl mcp/registry -DskipTests -DskipITs -Dspotless.skip=true \ | |
| -Dexec.mainClass=org.apache.shardingsphere.mcp.registry.MCPRegistryMetadataCommand \ | |
| -Dexec.args="--validate-only --allow-snapshot --dockerfile-path distribution/mcp/Dockerfile" \ | |
| compile exec:java -B -ntp | |
| - name: Install MCP E2E Test Dependencies | |
| run: ./mvnw -pl test/e2e/mcp -am install -DskipTests -DskipITs -Dspotless.skip=true -B -ntp | |
| - name: Run MCP Distribution E2E | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| DISTRIBUTION_HOME=$(find distribution/mcp/target -maxdepth 1 -type d -name 'apache-shardingsphere-mcp-*' | head -n 1) | |
| if [[ -z "${DISTRIBUTION_HOME}" ]]; then | |
| echo "Packaged MCP distribution was not found." 1>&2 | |
| exit 1 | |
| fi | |
| DISTRIBUTION_HOME=$(cd "${DISTRIBUTION_HOME}" && pwd) | |
| ./mvnw -pl test/e2e/mcp test -DskipITs -Dspotless.skip=true \ | |
| -Dtest=PackagedDistributionE2ETest \ | |
| -Dsurefire.failIfNoSpecifiedTests=true \ | |
| -Dmcp.e2e.distribution.enabled=true \ | |
| -Dmcp.e2e.container.image=shardingsphere-mcp-ci:local \ | |
| -Dmcp.distribution.home="${DISTRIBUTION_HOME}" \ | |
| -B -ntp |