Skip to content

Commit

Permalink
Merge branch 'apache:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sayyidhussain authored Jun 5, 2024
2 parents 9d8f6c2 + feb2de8 commit a5242f5
Show file tree
Hide file tree
Showing 8,437 changed files with 217,328 additions and 126,917 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 3 additions & 2 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ github:
dismiss_stale_reviews: true
required_approving_review_count: 1
collaborators:
- zhujunxxxxx
- Mouqiuyu
- zhuruixuan
- TherChenYang
- yydeng626
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup JDK 11 for Build
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-${{ hashFiles('**/pom.xml') }}
Expand All @@ -80,7 +80,7 @@ jobs:
- name: Build Project with Maven
run: ./mvnw clean install -B -ntp -DskipTests -T1C
- name: Setup JDK 8 for Test
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
Expand Down
73 changes: 64 additions & 9 deletions .github/workflows/e2e-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,50 @@ jobs:
global-environment:
name: Import Global Environment
uses: ./.github/workflows/required-reusable.yml


build-e2e-image:
name: Build E2E Image
needs: global-environment
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-e2e-cache-${{ github.sha }}
restore-keys: |
${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-e2e-cache-
${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-
- name: Build Project
run: ./mvnw -B clean install -DskipTests -Prelease
- name: Build Proxy E2E Image
run: ./mvnw clean install -DskipTests -Pit.env.proxy -f test/e2e/agent/plugins/common/pom.xml
- name: Save Proxy E2E Image
run: docker save -o /tmp/${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-proxy-agent-test.tar apache/shardingsphere-proxy-agent-test:latest
- uses: actions/upload-artifact@v4
with:
name: proxy-e2e-image
path: /tmp/${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-proxy-agent-test.tar
retention-days: 10
- name: Build JDBC E2E Image
run: ./mvnw clean install -DskipTests -Pit.env.jdbc -f test/e2e/agent/plugins/common/pom.xml
- name: Save JDBC E2E Image
run: docker save -o /tmp/${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-jdbc-agent-test.tar apache/shardingsphere-jdbc-agent-test:latest
- uses: actions/upload-artifact@v4
with:
name: jdbc-e2e-image
path: /tmp/${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-jdbc-agent-test.tar
retention-days: 10

agent-mysql:
if: ${{ needs.global-environment.outputs.GLOBAL_JOB_ENABLED == 'true' }}
name: E2E - Agent with MySQL
needs: global-environment
needs: [ global-environment, build-e2e-image ]
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
Expand Down Expand Up @@ -96,20 +135,36 @@ jobs:
feature: tracing
plugin: zipkin
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-
- name: Download Proxy E2E Image
if: matrix.adapter == 'proxy'
uses: actions/download-artifact@v4
with:
name: proxy-e2e-image
path: /tmp/
- name: Load Proxy E2E Image
if: matrix.adapter == 'proxy'
run: docker load -i /tmp/${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-proxy-agent-test.tar
- name: Download JDBC E2E Image
if: matrix.adapter == 'jdbc'
uses: actions/download-artifact@v4
with:
name: jdbc-e2e-image
path: /tmp/
- name: Load JDBC E2E Image
if: matrix.adapter == 'jdbc'
run: docker load -i /tmp/${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-jdbc-agent-test.tar
- name: Build Project
run:
./mvnw -B clean install -DskipITs -DskipTests -Prelease
run: ./mvnw -B clean install -am -pl test/e2e/agent/plugins/${{ matrix.feature }}/${{ matrix.plugin }} -DskipTests
- name: Run E2E Test
run:
./mvnw -B clean install -f test/e2e/agent/plugins/${{ matrix.feature }}/${{ matrix.plugin }}/pom.xml -Dspotless.apply.skip=true -Dit.env.adapter=${{ matrix.adapter }} -Dit.env.type=${{ matrix.plugin }} -Pit.env.${{ matrix.adapter }}.${{ matrix.plugin }}
run: ./mvnw -nsu -B clean install -f test/e2e/agent/plugins/${{ matrix.feature }}/${{ matrix.plugin }}/pom.xml -Dit.env.adapter=${{ matrix.adapter }} -Dit.env.plugin=${{ matrix.plugin }}
16 changes: 9 additions & 7 deletions .github/workflows/e2e-operation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
token: ${{ github.token }}
Expand All @@ -60,12 +60,14 @@ jobs:
fail-fast: false
matrix:
operation: [ transaction, pipeline, showprocesslist ]
image: [ { type: "it.docker.mysql.version", version: "mysql:5.7" }, { type: "it.docker.postgresql.version", version: "postgres:12-alpine" }, { type: "it.docker.opengauss.version", version: "enmotech/opengauss:2.1.0" } ]
image: [ { type: "it.docker.mysql.version", version: "mysql:5.7" }, { type: "it.docker.postgresql.version", version: "postgres:12-alpine" }, { type: "it.docker.mariadb.version", version: "mariadb:11" } ]
exclude:
- operation: transaction
image: { type: "it.docker.mariadb.version", version: "mariadb:11" }
- operation: showprocesslist
image: { type: "it.docker.postgresql.version", version: "postgres:12-alpine" }
- operation: showprocesslist
image: { type: "it.docker.opengauss.version", version: "enmotech/opengauss:2.1.0" }
image: { type: "it.docker.mariadb.version", version: "mariadb:11" }
steps:
- env:
changed_operations: ${{ needs.detect-changed-files.outputs.changed_operations }}
Expand All @@ -86,18 +88,18 @@ jobs:
fi
- name: Checkout Project
if: (env.skip_current_step == 'false')
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Retrieve Maven Caches
if: (env.skip_current_step == 'false')
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-e2e-cache-${{ github.sha }}
restore-keys: |
${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-e2e-cache-
${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-
- if: (env.skip_current_step == 'false')
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/e2e-sql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-e2e-cache-${{ github.sha }}
Expand All @@ -89,7 +89,7 @@ jobs:
run: ./mvnw -B clean install -am -pl test/e2e/sql -Pit.env.docker -DskipTests -Dspotless.apply.skip=true
- name: Save E2E Image
run: docker save -o /tmp/${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-proxy-test.tar apache/shardingsphere-proxy-test:latest
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: e2e-image
path: /tmp/${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-proxy-test.tar
Expand All @@ -110,13 +110,13 @@ jobs:
database: [ MySQL, PostgreSQL ]
# Fix me #25051
#scenario: [ dbtbl_with_readwrite_splitting, dbtbl_with_readwrite_splitting_and_encrypt, sharding_and_encrypt, encrypt_and_readwrite_splitting, encrypt_shadow, readwrite_splitting_and_shadow, sharding_and_shadow, sharding_encrypt_shadow, mask_encrypt, mask_sharding, mask_encrypt_sharding ]
scenario: [ empty_rules, rdl_empty_rules, passthrough, tbl, encrypt, readwrite_splitting, shadow, mask, dbtbl_with_readwrite_splitting_and_encrypt, sharding_and_encrypt, encrypt_and_readwrite_splitting, encrypt_shadow, readwrite_splitting_and_shadow, sharding_and_shadow, sharding_encrypt_shadow, mask_encrypt, mask_sharding, mask_encrypt_sharding ]
scenario: [ empty_rules, rdl_empty_rules, passthrough, db, tbl, encrypt, readwrite_splitting, shadow, mask, dbtbl_with_readwrite_splitting_and_encrypt, sharding_and_encrypt, encrypt_and_readwrite_splitting, encrypt_shadow, readwrite_splitting_and_shadow, sharding_and_shadow, sharding_encrypt_shadow, mask_encrypt, mask_sharding, mask_encrypt_sharding, db_tbl_sql_federation, empty_storage_units ]
additional-options: [ '' ]
include:
- adapter: proxy
database: MySQL
scenario: passthrough
additional-options: '-Dmysql-connector-java.version=8.0.30'
additional-options: '-Dmysql-connector-java.version=8.3.0'
exclude:
- adapter: jdbc
scenario: passthrough
Expand All @@ -131,19 +131,21 @@ jobs:
- adapter: proxy
mode: Standalone
scenario: passthrough
- adapter: proxy
scenario: empty_storage_units
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-e2e-cache-${{ github.sha }}
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- name: Download E2E Image
if: matrix.adapter == 'proxy'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: e2e-image
path: /tmp/
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#
# 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: NativeTest CI - GraalVM Native Image

# Only execute CI when changes involving GraalVM Reachability Metadata and nativeTest are involved. Because most Contributors don't use GraalVM CE.
on:
pull_request:
branches: [ master ]
paths:
- '.github/workflows/graalvm.yml'
- 'infra/reachability-metadata/src/**'
- 'test/native/native-image-filter/**'
- 'test/native/src/**'

concurrency:
group: graalvm-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

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:
nativetest:
if: github.repository == 'apache/shardingsphere'
name: GraalVM - GraalVM CE for JDK ${{ matrix.java-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
max-parallel: 20
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
java-version: [ '21.0.2' ]
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java-version }}
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
- name: Run nativeTest with GraalVM CE for ${{ matrix.java-version }}
run: ./mvnw -PnativeTestInShardingSphere -T1C -e clean test
Loading

0 comments on commit a5242f5

Please sign in to comment.