From 00e8d2d2ae5cd3d839cd0efef19abc81a2240aec Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 12:07:33 +0800 Subject: [PATCH 01/39] add connect test --- .github/workflows/connect-test2.yml | 70 +++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/connect-test2.yml diff --git a/.github/workflows/connect-test2.yml b/.github/workflows/connect-test2.yml new file mode 100644 index 0000000..fa5a48e --- /dev/null +++ b/.github/workflows/connect-test2.yml @@ -0,0 +1,70 @@ +name: Serverless Connect Test2 + +on: + schedule: + - cron: "0/30 * * * *" # every 30 minutes + workflow_dispatch: + +jobs: + setup: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up ticloud + uses: tidbcloud/setup-tidbcloud-cli@v0 + with: + api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} + api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} + + - name: Delete all serverless + run: | + # delete all serverless + ticloud cluster list 1372813089447741295 -o json > cluster + total=$(jq '.total' cluster); + for i in {1..$total} + do + id=`echo $(jq '.items[$i-1].id' cluster) | sed 's/"//g'` + ticloud cluster delete -p 1372813089447741295 -c $id --force; + done + + connect-test: + needs: setup + strategy: + matrix: + region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up ticloud + uses: tidbcloud/setup-tidbcloud-cli@v0 + with: + api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} + api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} + + - name: Set projectID + run: echo "::set-env name=PROJECT_ID::1372813089447741295" + + - name: Create cluster + run: | + ticloud cluster create -p $PROJECT_ID --cluster-name ${{ matrix.region }} --cloud-provider AWS -r ${{ matrix.region }} --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS > ${{ matrix.region }} + echo "::set-env name=CLUSTER_ID::`cat ${{ matrix.region }} | sed 's/[^0-9]//g'`" + ticloud cluster get -p $PROJECT_ID -c $CLUSTER_ID > ${{ matrix.region }} + cat ${{ matrix.region }} + echo "::set-env name=CLUSTER_USER::(jq '.status.connection_strings.default_user' ${{ matrix.region }})" + echo "::set-env name=CLUSTER_HOST::(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" + + - name: Get mysql + uses: shogo82148/actions-setup-mysql@v1 + + - name: Run test + run: mysql -u $CLUSTER_USER -h $CLUSTER_HOST -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} + + - name: Delete cluster + run: | + ticloud cluster delete -p $PROJECT_ID -c $CLUSTER_ID --force From bea98cead98b8568c0559bc27fdcf635bdaf1d41 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 12:14:58 +0800 Subject: [PATCH 02/39] add connect test --- .github/workflows/compatibility-test.yml | 475 ++++++++++++++++++++++ .github/workflows/connect-notify.yml | 6 +- .github/workflows/connect-test.yml | 492 +++-------------------- .github/workflows/connect-test2.yml | 70 ---- 4 files changed, 529 insertions(+), 514 deletions(-) create mode 100644 .github/workflows/compatibility-test.yml delete mode 100644 .github/workflows/connect-test2.yml diff --git a/.github/workflows/compatibility-test.yml b/.github/workflows/compatibility-test.yml new file mode 100644 index 0000000..761c622 --- /dev/null +++ b/.github/workflows/compatibility-test.yml @@ -0,0 +1,475 @@ +name: Serverless Compatibility Test + +on: + schedule: + - cron: "0 22 * * *" # every day at 22:00 + workflow_dispatch: + +jobs: + setup: + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up ticloud + uses: tidbcloud/setup-tidbcloud-cli@v0 + with: + api_public_key: ${{ secrets.TLS_PUBLIC_KEY }} + api_private_key: ${{ secrets.TLS_PRIVATE_KEY }} + + - name: Get Connection Info + run: | + # delete cluster if exists + ticloud cluster list 1372813089206721319 -o json > cluster + if [ $(jq '.total' cluster) == 1 ]; + then + id=`echo $(jq '.items[0].id' cluster) | sed 's/"//g'` + ticloud cluster delete -p 1372813089206721319 -c $id --force; + fi + + # create cluster + ticloud cluster create --project-id 1372813089206721319 --cluster-name tls-test --cloud-provider AWS -r us-east-1 --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS; + ticloud cluster list 1372813089206721319 -o json > cluster + cat cluster + echo "TIDB_CLOUD_USER=$(jq '.items[0].status.connection_strings.default_user' cluster)" >> $GITHUB_ENV + echo "TIDB_CLOUD_HOST=$(jq '.items[0].status.connection_strings.standard.host' cluster)" >> $GITHUB_ENV + outputs: + TiDB_CLOUD_USER: ${{ env.TIDB_CLOUD_USER }} + TiDB_CLOUD_HOST: ${{ env.TIDB_CLOUD_HOST }} + + mysql: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + include: + - os: ubuntu-22.04 + cert: /etc/ssl/certs/ca-certificates.crt + - os: macos-12 + cert: /etc/ssl/cert.pem + - os: windows-2022 + cert: ./example_code/x1.pem + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Get mysql + uses: shogo82148/actions-setup-mysql@v1 + + - name: Run test on ${{ matrix.os }} + run: mysql -u ${{needs.setup.outputs.TIDB_CLOUD_USER}} -h ${{needs.setup.outputs.TIDB_CLOUD_HOST}} -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=${{ matrix.cert }} -p${{ secrets.TIDB_CLOUD_PASSWORD }} + + no_tls: + needs: setup + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Get mysql + uses: shogo82148/actions-setup-mysql@v1 + + - name: Run test + run: "! mysql -u ${{needs.setup.outputs.TIDB_CLOUD_USER}} -h ${{needs.setup.outputs.TIDB_CLOUD_HOST}} -P 4000 -D test --ssl-mode=DISABLED -p${{ secrets.TIDB_CLOUD_PASSWORD }}" + + invalid_tls_version: + needs: setup + runs-on: ubuntu-22.04 + timeout-minutes: 10 + strategy: + matrix: + tls: [ TLSv1, TLSv1.1 ] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Run test on ${{ matrix.tls }} + run: | + # Starting from 8.0.26, TLSv1 & TLSv1.1 are deprecated. From 8.0.28, they are completely removed. + pip3 install mysql-connector-python==8.0.25 + cd example_code/python + ! python3 tls_version.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{secrets.TIDB_CLOUD_PASSWORD}} /etc/ssl/certs/ca-certificates.crt ${{ matrix.tls }} + + valid_tls_version: + needs: setup + runs-on: ubuntu-22.04 + timeout-minutes: 10 + strategy: + matrix: + tls: [ TLSv1.2, TLSv1.3 ] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Run test on ${{ matrix.tls }} + run: | + pip3 install mysql-connector-python + cd example_code/python + python3 tls_version.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{secrets.TIDB_CLOUD_PASSWORD}} /etc/ssl/certs/ca-certificates.crt ${{ matrix.tls }} + + mycli: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + include: + - os: ubuntu-22.04 + cert: /etc/ssl/certs/ca-certificates.crt + - os: macos-12 + cert: /etc/ssl/cert.pem + - os: windows-2022 + cert: ./example_code/x1.pem + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install python + uses: actions/setup-python@v3 + + - name: Install mycli + run: pip3 install mycli + + - name: Run test on ${{ matrix.os }} + run: + mycli -u ${{needs.setup.outputs.TIDB_CLOUD_USER}} -h ${{needs.setup.outputs.TIDB_CLOUD_HOST}} -P 4000 -D test --ssl-ca=${{ matrix.cert }} --ssl-verify-server-cert -p${{ secrets.TIDB_CLOUD_PASSWORD}} + + java_jdbc: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '8' + - name: Run test on ubuntu or macos + if: ${{ matrix.os != 'windows-2022' }} + run: | + cd example_code/java + javac ConnectTest.java + java -cp mysql-connector-j-8.0.31.jar: ConnectTest ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + + - name: Run test on windows + if: ${{ matrix.os == 'windows-2022' }} + # Need to use Chinese semicolon and an extra space before ConnectTest (don't know why) + run: | + cd example_code/java + javac ConnectTest.java + java -cp mysql-connector-j-8.0.31.jar; ConnectTest ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + + # https://jira.mariadb.org/browse/CONJ-1023 + java_jdbc_mariadb_CONJ-1023: + needs: setup + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '8' + - name: Run test + run: | + cd example_code/java + javac ConnectTestMariaDB.java + java -cp mariadb-java-client-3.0.9.jar: ConnectTestMariaDB ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + + python_mysqlclient: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + include: + - os: ubuntu-22.04 + cert: /etc/ssl/certs/ca-certificates.crt + - os: macos-12 + cert: /etc/ssl/cert.pem + - os: windows-2022 + cert: ../x1.pem + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install mysql in macos + if: ${{ matrix.os == 'macos-12' }} + run: | + # https://github.com/Homebrew/homebrew-core/issues/130258 + ln -sv $(brew --prefix zlib)/lib/libz.dylib $(brew --prefix)/lib/libzlib.dylib + brew install mysql + export PATH=$PATH:/usr/local/mysql/bin + - name: Run test on ${{ matrix.os }} + run: | + pip3 install mysqlclient + cd example_code/python + python3 ConnectTest_mysqlclient.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{ matrix.cert }} + + python_mysql_connector: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + include: + - os: ubuntu-22.04 + cert: /etc/ssl/certs/ca-certificates.crt + - os: macos-12 + cert: /etc/ssl/cert.pem + - os: windows-2022 + cert: ../x1.pem + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Run test on ${{ matrix.os }} + run: | + pip3 install mysql-connector-python + cd example_code/python + python3 ConnectTest_mysql-connector-python.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{ matrix.cert }} + + python_pymysql: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + include: + - os: ubuntu-22.04 + cert: /etc/ssl/certs/ca-certificates.crt + - os: macos-12 + cert: /etc/ssl/cert.pem + - os: windows-2022 + cert: ../x1.pem + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Run test on ${{ matrix.os }} + run: | + pip3 install pymysql + cd example_code/python + python3 ConnectTest_pymysql.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{ matrix.cert }} + + python_sqlalchemy: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + include: + - os: ubuntu-22.04 + cert: /etc/ssl/certs/ca-certificates.crt + - os: macos-12 + cert: /etc/ssl/cert.pem + - os: windows-2022 + cert: ../x1.pem + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install mysql in macos + if: ${{ matrix.os == 'macos-12' }} + run: | + # https://github.com/Homebrew/homebrew-core/issues/130258 + ln -sv $(brew --prefix zlib)/lib/libz.dylib $(brew --prefix)/lib/libzlib.dylib + brew install mysql + - name: Run test on ${{ matrix.os }} + run: | + pip3 install mysqlclient + pip3 install sqlalchemy + cd example_code/sqlalchemy + python3 ConnectTest.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{ matrix.cert }} + + go_godriver: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.20.0' + - name: Run test on ${{ matrix.os }} + run: | + cd example_code/go + go mod tidy + go run ConnectTest.go ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + + go_gorm: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.20.0' + - name: Run test on ${{ matrix.os }} + run: | + cd example_code/gorm + go mod tidy + go run ConnectTest.go ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + + node_mysql2: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Run test on ${{ matrix.os }} + run: | + cd example_code/node + npm install --save mysql2 + node ConnectTest.js ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + + node_sequelize: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Run test on ${{ matrix.os }} + run: | + cd example_code/sequelize + npm install --save mysql2 + npm install --save sequelize + node ConnectTest.js ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + + rust_mysql: + needs: setup + strategy: + matrix: + os: [ windows-2022, macos-12 ] # skip ubuntu-22.04 as it get stuck for unknown reasons + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + steps: + - uses: actions/checkout@v3 + - uses: moonrepo/setup-rust@v0 + - name: Run test on ${{ matrix.os }} + run: | + cd example_code/rust + cargo run ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + + ruby_mysql2: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, macos-12 ] # install mysql2 in windows is a little difficult, dismiss it for now + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Install mysql on macos + if: ${{ matrix.os == 'macos-12' }} + run: | + brew install mysql + cd example_code/ruby + # https://github.com/Homebrew/homebrew-core/issues/130258 + gem install mysql2 -- --with-mysql-dir=$(brew --prefix mysql) + ruby ConnectTest.rb ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + - name: Run test on ubuntu + if: ${{ matrix.os == 'ubuntu-22.04' }} + run: | + cd example_code/ruby + gem install mysql2 + ruby ConnectTest.rb ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + + php_mysqli: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, windows-2022, macos-12 ] + include: + - os: ubuntu-22.04 + cert: /etc/ssl/certs/ca-certificates.crt + - os: macos-12 + cert: /etc/ssl/cert.pem + - os: windows-2022 + cert: ../x1.pem + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + ini-values: extension=php_mysqli.dll + - name: Run test on ${{ matrix.os }} + run: | + cd example_code/php + php ConnectTest.php ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{matrix.cert}} + + cpp_libmysqlclient: + needs: setup + strategy: + matrix: + os: [ ubuntu-22.04, macos-12 ] + include: + - os: ubuntu-22.04 + cert: /etc/ssl/certs/ca-certificates.crt + - os: macos-12 + cert: /etc/ssl/cert.pem + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: rlalik/setup-cpp-compiler@v1.2 + - name: Run test on macos + if: ${{ matrix.os == 'macos-12' }} + run: | + brew install mysql + cd example_code/cpp + g++ ConnectTest.cpp -o test -I/usr/local/include/mysql -lmysqlclient + ./test ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{matrix.cert}} + - name: Run test on ubuntu + if: ${{ matrix.os == 'ubuntu-22.04' }} + run: | + sudo apt install -y libmysqlclient-dev + cd example_code/cpp + g++ ConnectTest.cpp -o test -I/usr/include/mysql -lmysqlclient + ./test ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{matrix.cert}} diff --git a/.github/workflows/connect-notify.yml b/.github/workflows/connect-notify.yml index a57bfff..a7e9ba6 100644 --- a/.github/workflows/connect-notify.yml +++ b/.github/workflows/connect-notify.yml @@ -2,7 +2,9 @@ name: Serverless Connect Notify on: workflow_run: - workflows: ["Serverless Connect Test"] + workflows: + - "Serverless Connect Test" + - "Serverless Compatibility Test" types: - completed @@ -23,7 +25,7 @@ jobs: "elements": [{ "tag": "div", "text": { - "content": "**Message** \nServerless connection test #${{ github.event.workflow_run.run_number }} failed", + "content": "**Message** \n${{ github.event.workflow_run.name}} #${{ github.event.workflow_run.run_number }} failed", "tag": "lark_md" } }, { diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index ba7e38a..3b7dabd 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -1,4 +1,4 @@ -name: Serverless Connect Test +name: Serverless Connect Test1 on: schedule: @@ -16,460 +16,68 @@ jobs: - name: Set up ticloud uses: tidbcloud/setup-tidbcloud-cli@v0 with: - api_public_key: ${{ secrets.TLS_PUBLIC_KEY }} - api_private_key: ${{ secrets.TLS_PRIVATE_KEY }} + api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} + api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} - - name: Get Connection Info + - name: Delete all serverless run: | - # delete cluster if exists - ticloud cluster list 1372813089206721319 -o json > cluster - if [ $(jq '.total' cluster) == 1 ]; - then - id=`echo $(jq '.items[0].id' cluster) | sed 's/"//g'` - ticloud cluster delete -p 1372813089206721319 -c $id --force; - fi + # delete all serverless + ticloud cluster list 1372813089447741295 -o json > cluster + total=$(jq '.total' cluster); + for i in $(seq 1 $total); + do + id=`echo $(jq ".items[$i-1].id" cluster) | sed 's/"//g'` + ticloud cluster delete -p 1372813089447741295 -c $id --force; + done - # create cluster - ticloud cluster create --project-id 1372813089206721319 --cluster-name tls-test --cloud-provider AWS -r us-east-1 --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS; - ticloud cluster list 1372813089206721319 -o json > cluster - cat cluster - echo "TIDB_CLOUD_USER=$(jq '.items[0].status.connection_strings.default_user' cluster)" >> $GITHUB_ENV - echo "TIDB_CLOUD_HOST=$(jq '.items[0].status.connection_strings.standard.host' cluster)" >> $GITHUB_ENV - outputs: - TiDB_CLOUD_USER: ${{ env.TIDB_CLOUD_USER }} - TiDB_CLOUD_HOST: ${{ env.TIDB_CLOUD_HOST }} - - mysql: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - include: - - os: ubuntu-22.04 - cert: /etc/ssl/certs/ca-certificates.crt - - os: macos-12 - cert: /etc/ssl/cert.pem - - os: windows-2022 - cert: ./example_code/x1.pem - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Get mysql - uses: shogo82148/actions-setup-mysql@v1 - - - name: Run test on ${{ matrix.os }} - run: mysql -u ${{needs.setup.outputs.TIDB_CLOUD_USER}} -h ${{needs.setup.outputs.TIDB_CLOUD_HOST}} -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=${{ matrix.cert }} -p${{ secrets.TIDB_CLOUD_PASSWORD }} - - no_tls: - needs: setup - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Get mysql - uses: shogo82148/actions-setup-mysql@v1 - - - name: Run test - run: "! mysql -u ${{needs.setup.outputs.TIDB_CLOUD_USER}} -h ${{needs.setup.outputs.TIDB_CLOUD_HOST}} -P 4000 -D test --ssl-mode=DISABLED -p${{ secrets.TIDB_CLOUD_PASSWORD }}" - - invalid_tls_version: + connect-test: needs: setup - runs-on: ubuntu-22.04 - timeout-minutes: 10 strategy: matrix: - tls: [ TLSv1, TLSv1.1 ] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Run test on ${{ matrix.tls }} - run: | - # Starting from 8.0.26, TLSv1 & TLSv1.1 are deprecated. From 8.0.28, they are completely removed. - pip3 install mysql-connector-python==8.0.25 - cd example_code/python - ! python3 tls_version.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{secrets.TIDB_CLOUD_PASSWORD}} /etc/ssl/certs/ca-certificates.crt ${{ matrix.tls }} - - valid_tls_version: - needs: setup + region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] runs-on: ubuntu-22.04 - timeout-minutes: 10 - strategy: - matrix: - tls: [ TLSv1.2, TLSv1.3 ] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Run test on ${{ matrix.tls }} - run: | - pip3 install mysql-connector-python - cd example_code/python - python3 tls_version.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{secrets.TIDB_CLOUD_PASSWORD}} /etc/ssl/certs/ca-certificates.crt ${{ matrix.tls }} - - mycli: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - include: - - os: ubuntu-22.04 - cert: /etc/ssl/certs/ca-certificates.crt - - os: macos-12 - cert: /etc/ssl/cert.pem - - os: windows-2022 - cert: ./example_code/x1.pem - runs-on: ${{ matrix.os }} - timeout-minutes: 10 + timeout-minutes: 15 steps: - name: Checkout uses: actions/checkout@v3 - - name: Install python - uses: actions/setup-python@v3 - - - name: Install mycli - run: pip3 install mycli - - - name: Run test on ${{ matrix.os }} - run: - mycli -u ${{needs.setup.outputs.TIDB_CLOUD_USER}} -h ${{needs.setup.outputs.TIDB_CLOUD_HOST}} -P 4000 -D test --ssl-ca=${{ matrix.cert }} --ssl-verify-server-cert -p${{ secrets.TIDB_CLOUD_PASSWORD}} - - java_jdbc: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - name: Set up ticloud + uses: tidbcloud/setup-tidbcloud-cli@v0 with: - distribution: 'adopt' - java-version: '8' - - name: Run test on ubuntu or macos - if: ${{ matrix.os != 'windows-2022' }} - run: | - cd example_code/java - javac ConnectTest.java - java -cp mysql-connector-j-8.0.31.jar: ConnectTest ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{ secrets.TIDB_CLOUD_PASSWORD }} - - - name: Run test on windows - if: ${{ matrix.os == 'windows-2022' }} - # Need to use Chinese semicolon and an extra space before ConnectTest (don't know why) - run: | - cd example_code/java - javac ConnectTest.java - java -cp mysql-connector-j-8.0.31.jar; ConnectTest ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{ secrets.TIDB_CLOUD_PASSWORD }} + api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} + api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} + + - name: Create cluster + run: | + PROJECT_ID=1372813089447741295 + ticloud cluster create -p $PROJECT_ID --cluster-name ${{ matrix.region }} --cloud-provider AWS -r ${{ matrix.region }} --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS > ${{ matrix.region }} + cat ${{ matrix.region }} + ticloud cluster get -p $PROJECT_ID -c `cat ${{ matrix.region }} | sed 's/[^0-9]//g'` > ${{ matrix.region }} + cat ${{ matrix.region }} + echo "PROJECT_ID=$PROJECT_ID" >> $GITHUB_ENV + echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV + echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV + echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV + + - name: Create branch + run: | + ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} + cat ${{ matrix.region }} + ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} + cat ${{ matrix.region }} + + echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV + echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV + echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV + + - name: Setup mysql + uses: shogo82148/actions-setup-mysql@v1 - # https://jira.mariadb.org/browse/CONJ-1023 - java_jdbc_mariadb_CONJ-1023: - needs: setup - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: 'adopt' - java-version: '8' - name: Run test - run: | - cd example_code/java - javac ConnectTestMariaDB.java - java -cp mariadb-java-client-3.0.9.jar: ConnectTestMariaDB ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{ secrets.TIDB_CLOUD_PASSWORD }} - - python_mysqlclient: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - include: - - os: ubuntu-22.04 - cert: /etc/ssl/certs/ca-certificates.crt - - os: macos-12 - cert: /etc/ssl/cert.pem - - os: windows-2022 - cert: ../x1.pem - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Install mysql in macos - if: ${{ matrix.os == 'macos-12' }} - run: | - # https://github.com/Homebrew/homebrew-core/issues/130258 - ln -sv $(brew --prefix zlib)/lib/libz.dylib $(brew --prefix)/lib/libzlib.dylib - brew install mysql - export PATH=$PATH:/usr/local/mysql/bin - - name: Run test on ${{ matrix.os }} - run: | - pip3 install mysqlclient - cd example_code/python - python3 ConnectTest_mysqlclient.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{ matrix.cert }} - - python_mysql_connector: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - include: - - os: ubuntu-22.04 - cert: /etc/ssl/certs/ca-certificates.crt - - os: macos-12 - cert: /etc/ssl/cert.pem - - os: windows-2022 - cert: ../x1.pem - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Run test on ${{ matrix.os }} - run: | - pip3 install mysql-connector-python - cd example_code/python - python3 ConnectTest_mysql-connector-python.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{ matrix.cert }} - - python_pymysql: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - include: - - os: ubuntu-22.04 - cert: /etc/ssl/certs/ca-certificates.crt - - os: macos-12 - cert: /etc/ssl/cert.pem - - os: windows-2022 - cert: ../x1.pem - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Run test on ${{ matrix.os }} - run: | - pip3 install pymysql - cd example_code/python - python3 ConnectTest_pymysql.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{ matrix.cert }} - - python_sqlalchemy: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - include: - - os: ubuntu-22.04 - cert: /etc/ssl/certs/ca-certificates.crt - - os: macos-12 - cert: /etc/ssl/cert.pem - - os: windows-2022 - cert: ../x1.pem - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Install mysql in macos - if: ${{ matrix.os == 'macos-12' }} - run: | - # https://github.com/Homebrew/homebrew-core/issues/130258 - ln -sv $(brew --prefix zlib)/lib/libz.dylib $(brew --prefix)/lib/libzlib.dylib - brew install mysql - - name: Run test on ${{ matrix.os }} - run: | - pip3 install mysqlclient - pip3 install sqlalchemy - cd example_code/sqlalchemy - python3 ConnectTest.py ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{ matrix.cert }} - - go_godriver: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: '1.20.0' - - name: Run test on ${{ matrix.os }} - run: | - cd example_code/go - go mod tidy - go run ConnectTest.go ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} - - go_gorm: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: '1.20.0' - - name: Run test on ${{ matrix.os }} - run: | - cd example_code/gorm - go mod tidy - go run ConnectTest.go ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} - - node_mysql2: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: Run test on ${{ matrix.os }} - run: | - cd example_code/node - npm install --save mysql2 - node ConnectTest.js ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} - - node_sequelize: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: Run test on ${{ matrix.os }} - run: | - cd example_code/sequelize - npm install --save mysql2 - npm install --save sequelize - node ConnectTest.js ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} - - rust_mysql: - needs: setup - strategy: - matrix: - os: [ windows-2022, macos-12 ] # skip ubuntu-22.04 as it get stuck for unknown reasons - runs-on: ${{ matrix.os }} - timeout-minutes: 15 - steps: - - uses: actions/checkout@v3 - - uses: moonrepo/setup-rust@v0 - - name: Run test on ${{ matrix.os }} - run: | - cd example_code/rust - cargo run ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} - - ruby_mysql2: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, macos-12 ] # install mysql2 in windows is a little difficult, dismiss it for now - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.0' # Not needed with a .ruby-version file - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Install mysql on macos - if: ${{ matrix.os == 'macos-12' }} - run: | - brew install mysql - cd example_code/ruby - # https://github.com/Homebrew/homebrew-core/issues/130258 - gem install mysql2 -- --with-mysql-dir=$(brew --prefix mysql) - ruby ConnectTest.rb ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} - - name: Run test on ubuntu - if: ${{ matrix.os == 'ubuntu-22.04' }} - run: | - cd example_code/ruby - gem install mysql2 - ruby ConnectTest.rb ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} - - php_mysqli: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, windows-2022, macos-12 ] - include: - - os: ubuntu-22.04 - cert: /etc/ssl/certs/ca-certificates.crt - - os: macos-12 - cert: /etc/ssl/cert.pem - - os: windows-2022 - cert: ../x1.pem - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - ini-values: extension=php_mysqli.dll - - name: Run test on ${{ matrix.os }} - run: | - cd example_code/php - php ConnectTest.php ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{matrix.cert}} + run: | + mysql -u ${{ env.CLUSTER_USER }} -h ${{ env.CLUSTER_HOST }} -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} - cpp_libmysqlclient: - needs: setup - strategy: - matrix: - os: [ ubuntu-22.04, macos-12 ] - include: - - os: ubuntu-22.04 - cert: /etc/ssl/certs/ca-certificates.crt - - os: macos-12 - cert: /etc/ssl/cert.pem - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: rlalik/setup-cpp-compiler@v1.2 - - name: Run test on macos - if: ${{ matrix.os == 'macos-12' }} - run: | - brew install mysql - cd example_code/cpp - g++ ConnectTest.cpp -o test -I/usr/local/include/mysql -lmysqlclient - ./test ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{matrix.cert}} - - name: Run test on ubuntu - if: ${{ matrix.os == 'ubuntu-22.04' }} + - name: Delete cluster & branch run: | - sudo apt install -y libmysqlclient-dev - cd example_code/cpp - g++ ConnectTest.cpp -o test -I/usr/include/mysql -lmysqlclient - ./test ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{matrix.cert}} + ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.CLUSTER_ID }} --force + ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force diff --git a/.github/workflows/connect-test2.yml b/.github/workflows/connect-test2.yml deleted file mode 100644 index fa5a48e..0000000 --- a/.github/workflows/connect-test2.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Serverless Connect Test2 - -on: - schedule: - - cron: "0/30 * * * *" # every 30 minutes - workflow_dispatch: - -jobs: - setup: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up ticloud - uses: tidbcloud/setup-tidbcloud-cli@v0 - with: - api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} - api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} - - - name: Delete all serverless - run: | - # delete all serverless - ticloud cluster list 1372813089447741295 -o json > cluster - total=$(jq '.total' cluster); - for i in {1..$total} - do - id=`echo $(jq '.items[$i-1].id' cluster) | sed 's/"//g'` - ticloud cluster delete -p 1372813089447741295 -c $id --force; - done - - connect-test: - needs: setup - strategy: - matrix: - region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up ticloud - uses: tidbcloud/setup-tidbcloud-cli@v0 - with: - api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} - api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} - - - name: Set projectID - run: echo "::set-env name=PROJECT_ID::1372813089447741295" - - - name: Create cluster - run: | - ticloud cluster create -p $PROJECT_ID --cluster-name ${{ matrix.region }} --cloud-provider AWS -r ${{ matrix.region }} --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS > ${{ matrix.region }} - echo "::set-env name=CLUSTER_ID::`cat ${{ matrix.region }} | sed 's/[^0-9]//g'`" - ticloud cluster get -p $PROJECT_ID -c $CLUSTER_ID > ${{ matrix.region }} - cat ${{ matrix.region }} - echo "::set-env name=CLUSTER_USER::(jq '.status.connection_strings.default_user' ${{ matrix.region }})" - echo "::set-env name=CLUSTER_HOST::(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" - - - name: Get mysql - uses: shogo82148/actions-setup-mysql@v1 - - - name: Run test - run: mysql -u $CLUSTER_USER -h $CLUSTER_HOST -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} - - - name: Delete cluster - run: | - ticloud cluster delete -p $PROJECT_ID -c $CLUSTER_ID --force From 4e74ed873c1968fc0495379fbfb5b82a8d8f40df Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 14:45:53 +0800 Subject: [PATCH 03/39] test --- .github/workflows/connect-test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 3b7dabd..b94b1b6 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -63,12 +63,12 @@ jobs: run: | ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} cat ${{ matrix.region }} - ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} - cat ${{ matrix.region }} - - echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV - echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV - echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV +# ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} +# cat ${{ matrix.region }} +# +# echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV +# echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV +# echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV - name: Setup mysql uses: shogo82148/actions-setup-mysql@v1 From 2f604644b08e337bd996a4819458be8fd1b11a3e Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 14:49:28 +0800 Subject: [PATCH 04/39] test --- .github/workflows/connect-test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index b94b1b6..0151991 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -63,10 +63,10 @@ jobs: run: | ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} cat ${{ matrix.region }} -# ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} -# cat ${{ matrix.region }} -# -# echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV + ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} + cat ${{ matrix.region }} + + echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV # echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV # echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV From 68234d4ff04b35c560072bc5d5d2bdfbcee7fd9c Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 14:52:02 +0800 Subject: [PATCH 05/39] test --- .github/workflows/connect-test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 0151991..f89564a 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -62,11 +62,11 @@ jobs: - name: Create branch run: | ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} - cat ${{ matrix.region }} - ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} - cat ${{ matrix.region }} - - echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV +# cat ${{ matrix.region }} +# ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} +# cat ${{ matrix.region }} +# +# echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV # echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV # echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV @@ -79,5 +79,5 @@ jobs: - name: Delete cluster & branch run: | - ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.CLUSTER_ID }} --force - ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force + ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.CLUSTER_ID }} --force +# ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force From 4f73fdbac9c4db92fcbed2a3b6eb035c735c8f72 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 14:57:38 +0800 Subject: [PATCH 06/39] test --- .github/workflows/connect-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index f89564a..cf5ac87 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -61,7 +61,8 @@ jobs: - name: Create branch run: | - ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} + ticloud branch list -c ${{ env.CLUSTER_ID }} +# ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} # cat ${{ matrix.region }} # ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} # cat ${{ matrix.region }} From 590e2bc832b7d328980791ef1d59efb07be11f75 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 14:59:37 +0800 Subject: [PATCH 07/39] test --- .github/workflows/connect-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index cf5ac87..3436e6e 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -34,7 +34,7 @@ jobs: needs: setup strategy: matrix: - region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] + region: [ us-east-1] # [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] runs-on: ubuntu-22.04 timeout-minutes: 15 steps: @@ -61,7 +61,7 @@ jobs: - name: Create branch run: | - ticloud branch list -c ${{ env.CLUSTER_ID }} + ticloud branch list ${{ env.CLUSTER_ID }} # ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} # cat ${{ matrix.region }} # ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} From bb166c08bbc54bdf5d0d08c8ff329f6674f2d618 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:01:33 +0800 Subject: [PATCH 08/39] test --- .github/workflows/connect-test.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 3436e6e..f5c624c 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -61,15 +61,14 @@ jobs: - name: Create branch run: | - ticloud branch list ${{ env.CLUSTER_ID }} -# ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} -# cat ${{ matrix.region }} -# ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} -# cat ${{ matrix.region }} -# -# echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV -# echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV -# echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV + ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} + cat ${{ matrix.region }} + ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} + cat ${{ matrix.region }} + + echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV + echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV + echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV - name: Setup mysql uses: shogo82148/actions-setup-mysql@v1 @@ -81,4 +80,4 @@ jobs: - name: Delete cluster & branch run: | ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.CLUSTER_ID }} --force -# ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force + ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force From 6b22e276c35b02ed40b27e059d5cc508c35c5446 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:04:55 +0800 Subject: [PATCH 09/39] test --- .github/workflows/connect-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index f5c624c..c20a09c 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -34,7 +34,7 @@ jobs: needs: setup strategy: matrix: - region: [ us-east-1] # [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] + region: [ us-east-1 ] # [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] runs-on: ubuntu-22.04 timeout-minutes: 15 steps: @@ -79,5 +79,5 @@ jobs: - name: Delete cluster & branch run: | - ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.CLUSTER_ID }} --force + ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.BRANCH_ID }} --force ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force From b47887b96085c9589e4dadc3739f8062c7b5f9be Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:06:42 +0800 Subject: [PATCH 10/39] test --- .github/workflows/connect-test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index c20a09c..0fa087a 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -61,14 +61,14 @@ jobs: - name: Create branch run: | - ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} - cat ${{ matrix.region }} - ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} - cat ${{ matrix.region }} - - echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV - echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV - echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV + ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} +# cat ${{ matrix.region }} +# ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} +# cat ${{ matrix.region }} +# +# echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV +# echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV +# echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV - name: Setup mysql uses: shogo82148/actions-setup-mysql@v1 @@ -79,5 +79,5 @@ jobs: - name: Delete cluster & branch run: | - ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.BRANCH_ID }} --force +# ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.BRANCH_ID }} --force ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force From 7a60eef49cba6dfd431dc97cda0fe453298b862d Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:09:43 +0800 Subject: [PATCH 11/39] test --- .github/workflows/connect-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 0fa087a..02320c9 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -79,5 +79,4 @@ jobs: - name: Delete cluster & branch run: | -# ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.BRANCH_ID }} --force ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force From cdd503c4f153138490e0b4495de091b8b898c47d Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:26:43 +0800 Subject: [PATCH 12/39] test --- .github/workflows/connect-test.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 02320c9..4f4bd0d 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -34,7 +34,7 @@ jobs: needs: setup strategy: matrix: - region: [ us-east-1 ] # [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] + region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] runs-on: ubuntu-22.04 timeout-minutes: 15 steps: @@ -59,16 +59,19 @@ jobs: echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV + # in case create branch failed + sleep 2s + - name: Create branch run: | - ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} -# cat ${{ matrix.region }} -# ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} -# cat ${{ matrix.region }} -# -# echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV -# echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV -# echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV + ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} + cat ${{ matrix.region }} + ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} + cat ${{ matrix.region }} + + echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV + echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV + echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV - name: Setup mysql uses: shogo82148/actions-setup-mysql@v1 @@ -79,4 +82,5 @@ jobs: - name: Delete cluster & branch run: | + ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.BRANCH_ID }} --force ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force From 30284b6a8d58d055a71bf03e611756d2322aad04 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:27:49 +0800 Subject: [PATCH 13/39] test --- .github/workflows/connect-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 4f4bd0d..052e727 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -59,7 +59,7 @@ jobs: echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV - # in case create branch failed + # sleep 2s in case create branch failed sleep 2s - name: Create branch From 7bb99f95997e9c6bf7a2adb570bb6bc27f5fe703 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:28:47 +0800 Subject: [PATCH 14/39] test --- .github/workflows/connect-test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 052e727..1a151d3 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -58,8 +58,6 @@ jobs: echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV - - # sleep 2s in case create branch failed sleep 2s - name: Create branch From ecbae35b3e9893e68756f70c58c5ad4f22ccee98 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:36:08 +0800 Subject: [PATCH 15/39] test --- .github/workflows/connect-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 1a151d3..56e185e 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -58,7 +58,7 @@ jobs: echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV - sleep 2s + sleep 10s - name: Create branch run: | From cb853745e71ddb38bfbdc8b43aac1066c2e3c0c0 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:41:13 +0800 Subject: [PATCH 16/39] test --- .github/workflows/connect-test.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 56e185e..b9c4855 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -63,13 +63,13 @@ jobs: - name: Create branch run: | ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} - cat ${{ matrix.region }} - ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} - cat ${{ matrix.region }} - - echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV - echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV - echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV +# cat ${{ matrix.region }} +# ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} +# cat ${{ matrix.region }} +# +# echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV +# echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV +# echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV - name: Setup mysql uses: shogo82148/actions-setup-mysql@v1 @@ -80,5 +80,4 @@ jobs: - name: Delete cluster & branch run: | - ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.BRANCH_ID }} --force ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force From 8d84b859225f3fa9484df814751f4fdfb47edd3e Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:47:34 +0800 Subject: [PATCH 17/39] test --- .github/workflows/connect-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index b9c4855..ec29037 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -35,7 +35,7 @@ jobs: strategy: matrix: region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] - runs-on: ubuntu-22.04 + runs-on: macos-latest timeout-minutes: 15 steps: - name: Checkout From a5bfc3fa1d8114513972502d04716158a24fe1fa Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:50:36 +0800 Subject: [PATCH 18/39] test --- .github/workflows/connect-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index ec29037..87bd4cd 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -58,7 +58,7 @@ jobs: echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV - sleep 10s + sleep 10 - name: Create branch run: | From 1b70d05bc7e3ca107ab0218bc3f72df5fb046c54 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 15:59:14 +0800 Subject: [PATCH 19/39] test --- .github/workflows/connect-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 87bd4cd..9ef1fe6 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -58,7 +58,6 @@ jobs: echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV - sleep 10 - name: Create branch run: | From 528c6735c7aefffc0209653797d86ec9de89be6f Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 16:12:19 +0800 Subject: [PATCH 20/39] test --- .github/workflows/connect-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 9ef1fe6..c184715 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -58,10 +58,11 @@ jobs: echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV + sleep 5 - name: Create branch run: | - ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} + ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} # cat ${{ matrix.region }} # ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} # cat ${{ matrix.region }} From fb79628590b7062b1fc68a7d6bb573fa50fc1a46 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 16:22:54 +0800 Subject: [PATCH 21/39] test --- .github/workflows/connect-test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index c184715..fc67f0d 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -7,7 +7,7 @@ on: jobs: setup: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout @@ -34,18 +34,18 @@ jobs: needs: setup strategy: matrix: - region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] - runs-on: macos-latest + region: [ us-east-1 ] + runs-on: ubuntu-latest timeout-minutes: 15 steps: - name: Checkout uses: actions/checkout@v3 - - name: Set up ticloud - uses: tidbcloud/setup-tidbcloud-cli@v0 - with: - api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} - api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} +# - name: Set up ticloud +# uses: tidbcloud/setup-tidbcloud-cli@v0 +# with: +# api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} +# api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} - name: Create cluster run: | From 292ab1adc4d2486ae0d930f5571a3d2130ff845e Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 16:24:58 +0800 Subject: [PATCH 22/39] test --- .github/workflows/connect-test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index fc67f0d..20275ec 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -41,11 +41,11 @@ jobs: - name: Checkout uses: actions/checkout@v3 -# - name: Set up ticloud -# uses: tidbcloud/setup-tidbcloud-cli@v0 -# with: -# api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} -# api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} + - name: Set up ticloud + uses: tidbcloud/setup-tidbcloud-cli@v0 + with: + api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} + api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} - name: Create cluster run: | From 25fa80421dde33537c1c03156453710d576407eb Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 16:30:11 +0800 Subject: [PATCH 23/39] test --- .github/workflows/connect-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 20275ec..ac23819 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -34,7 +34,7 @@ jobs: needs: setup strategy: matrix: - region: [ us-east-1 ] + region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] runs-on: ubuntu-latest timeout-minutes: 15 steps: From 3edcbbb9477ab6f67c9e8d837cf82fc7b1ff897a Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 18:35:05 +0800 Subject: [PATCH 24/39] fix --- .github/workflows/connect-test.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index ac23819..df2bc8a 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -62,14 +62,14 @@ jobs: - name: Create branch run: | - ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} -# cat ${{ matrix.region }} -# ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} -# cat ${{ matrix.region }} -# -# echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV -# echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV -# echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV + ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} + cat ${{ matrix.region }} + ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} + cat ${{ matrix.region }} + + echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV + echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV + echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV - name: Setup mysql uses: shogo82148/actions-setup-mysql@v1 @@ -80,4 +80,5 @@ jobs: - name: Delete cluster & branch run: | + ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.BRANCH_ID }} --force ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force From 2c66c13dec9d68f98f37ea305ba183cdf1054a32 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 14 Jul 2023 18:42:35 +0800 Subject: [PATCH 25/39] remove sleep --- .github/workflows/connect-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index df2bc8a..1ad756a 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -58,7 +58,6 @@ jobs: echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV - sleep 5 - name: Create branch run: | From 2eb20abe4d79e9c480b798b495fff233fd8fa58d Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Tue, 18 Jul 2023 15:21:27 +0800 Subject: [PATCH 26/39] alter name --- .github/workflows/connect-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 1ad756a..7c9f058 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -1,4 +1,4 @@ -name: Serverless Connect Test1 +name: Serverless Connect Test on: schedule: From fd0034b52bf093a3ef677c00aacee230406b70c6 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Tue, 18 Jul 2023 17:32:40 +0800 Subject: [PATCH 27/39] alter name --- .github/workflows/compatibility-test.yml | 2 +- .github/workflows/connect-notify.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compatibility-test.yml b/.github/workflows/compatibility-test.yml index 761c622..68165cf 100644 --- a/.github/workflows/compatibility-test.yml +++ b/.github/workflows/compatibility-test.yml @@ -1,4 +1,4 @@ -name: Serverless Compatibility Test +name: Serverless Driver Compatibility Test on: schedule: diff --git a/.github/workflows/connect-notify.yml b/.github/workflows/connect-notify.yml index a7e9ba6..80ae099 100644 --- a/.github/workflows/connect-notify.yml +++ b/.github/workflows/connect-notify.yml @@ -4,7 +4,7 @@ on: workflow_run: workflows: - "Serverless Connect Test" - - "Serverless Compatibility Test" + - "Serverless Driver Compatibility Test" types: - completed From 7dea857760c6f820d76ebf24ba68dc54424d7fd1 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 09:58:50 +0800 Subject: [PATCH 28/39] add create-test --- .github/workflows/compatibility-test.yml | 14 ++-- .github/workflows/connect-notify.yml | 3 +- .github/workflows/connect-test.yml | 72 ++------------------ .github/workflows/create-test.yml | 83 ++++++++++++++++++++++++ 4 files changed, 100 insertions(+), 72 deletions(-) create mode 100644 .github/workflows/create-test.yml diff --git a/.github/workflows/compatibility-test.yml b/.github/workflows/compatibility-test.yml index 68165cf..d34d873 100644 --- a/.github/workflows/compatibility-test.yml +++ b/.github/workflows/compatibility-test.yml @@ -23,11 +23,17 @@ jobs: run: | # delete cluster if exists ticloud cluster list 1372813089206721319 -o json > cluster - if [ $(jq '.total' cluster) == 1 ]; - then - id=`echo $(jq '.items[0].id' cluster) | sed 's/"//g'` - ticloud cluster delete -p 1372813089206721319 -c $id --force; + total=$(jq '.total' cluster); + for i in $(seq 1 $total); + do + name=`echo $(jq ".items[$i-1].name" cluster)` + id=`echo $(jq ".items[$i-1].id" cluster) | sed 's/"//g'` + echo $name + echo $id + if [[ $name != *"connect-test"* ]]; then + ticloud cluster delete -p 1372813089206721319 -c $id --force; fi + done # create cluster ticloud cluster create --project-id 1372813089206721319 --cluster-name tls-test --cloud-provider AWS -r us-east-1 --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS; diff --git a/.github/workflows/connect-notify.yml b/.github/workflows/connect-notify.yml index 80ae099..92a7219 100644 --- a/.github/workflows/connect-notify.yml +++ b/.github/workflows/connect-notify.yml @@ -1,10 +1,11 @@ -name: Serverless Connect Notify +name: Serverless Test Notify on: workflow_run: workflows: - "Serverless Connect Test" - "Serverless Driver Compatibility Test" + - "Serverless Create Test" types: - completed diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 7c9f058..c1cb8c8 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -1,83 +1,21 @@ -name: Serverless Connect Test +name: Serverless Connect Test1 on: schedule: - - cron: "0/30 * * * *" # every 30 minutes + - cron: "0/5 * * * *" # every 5 minutes workflow_dispatch: jobs: - setup: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up ticloud - uses: tidbcloud/setup-tidbcloud-cli@v0 - with: - api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} - api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} - - - name: Delete all serverless - run: | - # delete all serverless - ticloud cluster list 1372813089447741295 -o json > cluster - total=$(jq '.total' cluster); - for i in $(seq 1 $total); - do - id=`echo $(jq ".items[$i-1].id" cluster) | sed 's/"//g'` - ticloud cluster delete -p 1372813089447741295 -c $id --force; - done - connect-test: - needs: setup - strategy: - matrix: - region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 3 steps: - name: Checkout uses: actions/checkout@v3 - - name: Set up ticloud - uses: tidbcloud/setup-tidbcloud-cli@v0 - with: - api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} - api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} - - - name: Create cluster - run: | - PROJECT_ID=1372813089447741295 - ticloud cluster create -p $PROJECT_ID --cluster-name ${{ matrix.region }} --cloud-provider AWS -r ${{ matrix.region }} --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS > ${{ matrix.region }} - cat ${{ matrix.region }} - ticloud cluster get -p $PROJECT_ID -c `cat ${{ matrix.region }} | sed 's/[^0-9]//g'` > ${{ matrix.region }} - cat ${{ matrix.region }} - echo "PROJECT_ID=$PROJECT_ID" >> $GITHUB_ENV - echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV - echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV - echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV - - - name: Create branch - run: | - ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} - cat ${{ matrix.region }} - ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} - cat ${{ matrix.region }} - - echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV - echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV - echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV - - name: Setup mysql uses: shogo82148/actions-setup-mysql@v1 - - name: Run test - run: | - mysql -u ${{ env.CLUSTER_USER }} -h ${{ env.CLUSTER_HOST }} -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} - - - name: Delete cluster & branch + - name: connect run: | - ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.BRANCH_ID }} --force - ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force + mysql -u '4TNwCHfJvXJxs4v.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/cert.pem -p${{ secrets.CONNECT_TEST_PSWD }} diff --git a/.github/workflows/create-test.yml b/.github/workflows/create-test.yml new file mode 100644 index 0000000..a41329a --- /dev/null +++ b/.github/workflows/create-test.yml @@ -0,0 +1,83 @@ +name: Serverless Create Test + +on: + schedule: + - cron: "0/30 * * * *" # every 30 minutes + workflow_dispatch: + +jobs: + setup: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up ticloud + uses: tidbcloud/setup-tidbcloud-cli@v0 + with: + api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} + api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} + + - name: Delete all serverless + run: | + # delete all serverless + ticloud cluster list 1372813089447741295 -o json > cluster + total=$(jq '.total' cluster); + for i in $(seq 1 $total); + do + id=`echo $(jq ".items[$i-1].id" cluster) | sed 's/"//g'` + ticloud cluster delete -p 1372813089447741295 -c $id --force; + done + + connect-test: + needs: setup + strategy: + matrix: + region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up ticloud + uses: tidbcloud/setup-tidbcloud-cli@v0 + with: + api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} + api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} + + - name: Create cluster + run: | + PROJECT_ID=1372813089447741295 + ticloud cluster create -p $PROJECT_ID --cluster-name ${{ matrix.region }} --cloud-provider AWS -r ${{ matrix.region }} --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS > ${{ matrix.region }} + cat ${{ matrix.region }} + ticloud cluster get -p $PROJECT_ID -c `cat ${{ matrix.region }} | sed 's/[^0-9]//g'` > ${{ matrix.region }} + cat ${{ matrix.region }} + echo "PROJECT_ID=$PROJECT_ID" >> $GITHUB_ENV + echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV + echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV + echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV + + - name: Create branch + run: | + ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} + cat ${{ matrix.region }} + ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} + cat ${{ matrix.region }} + + echo "BRANCH_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV + echo "BRANCH_USER=$(jq '.user_prefix' ${{ matrix.region }})".root"" >> $GITHUB_ENV + echo "BRANCH_HOST=$(jq '.endpoints.public_endpoint.host' ${{ matrix.region }})" >> $GITHUB_ENV + + - name: Setup mysql + uses: shogo82148/actions-setup-mysql@v1 + + - name: Run test + run: | + mysql -u ${{ env.CLUSTER_USER }} -h ${{ env.CLUSTER_HOST }} -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} + + - name: Delete cluster & branch + run: | + ticloud branch delete -c ${{ env.CLUSTER_ID }} -b ${{ env.BRANCH_ID }} --force + ticloud cluster delete -p ${{ env.PROJECT_ID }} -c ${{ env.CLUSTER_ID }} --force From 16be0f839b7917485f185cb308af6106fae61569 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 10:32:14 +0800 Subject: [PATCH 29/39] add create-test --- .github/workflows/create-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-test.yml b/.github/workflows/create-test.yml index a41329a..7256577 100644 --- a/.github/workflows/create-test.yml +++ b/.github/workflows/create-test.yml @@ -44,8 +44,8 @@ jobs: - name: Set up ticloud uses: tidbcloud/setup-tidbcloud-cli@v0 with: - api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} - api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} + api_public_key: ${{ secrets.CREATE_TEST_PUBLIC_KEY}} + api_private_key: ${{ secrets.CREATE_TEST_PRIVATE_KEY }} - name: Create cluster run: | From ca8308738d391729c4a56506ba669bbc12354b2f Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 10:34:02 +0800 Subject: [PATCH 30/39] add create-test --- .github/workflows/connect-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index c1cb8c8..e2caf47 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -18,4 +18,4 @@ jobs: - name: connect run: | - mysql -u '4TNwCHfJvXJxs4v.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/cert.pem -p${{ secrets.CONNECT_TEST_PSWD }} + mysql -u '4TNwCHfJvXJxs4v.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} From c991b29735c5c46df550243e501ba4e72d86482d Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 10:35:08 +0800 Subject: [PATCH 31/39] add create-test --- .github/workflows/connect-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index e2caf47..098fd20 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -1,4 +1,4 @@ -name: Serverless Connect Test1 +name: Serverless Connect Test on: schedule: From fb6546c30551d6b087b1125e5d81750a1f27ea63 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 10:37:04 +0800 Subject: [PATCH 32/39] test all --- .github/workflows/compatibility-test.yml | 1 + .github/workflows/connect-test.yml | 1 + .github/workflows/create-test.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/compatibility-test.yml b/.github/workflows/compatibility-test.yml index d34d873..3fc30ea 100644 --- a/.github/workflows/compatibility-test.yml +++ b/.github/workflows/compatibility-test.yml @@ -1,6 +1,7 @@ name: Serverless Driver Compatibility Test on: + pull_request: schedule: - cron: "0 22 * * *" # every day at 22:00 workflow_dispatch: diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 098fd20..d5839f2 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -1,6 +1,7 @@ name: Serverless Connect Test on: + pull_request: schedule: - cron: "0/5 * * * *" # every 5 minutes workflow_dispatch: diff --git a/.github/workflows/create-test.yml b/.github/workflows/create-test.yml index 7256577..5ff1e95 100644 --- a/.github/workflows/create-test.yml +++ b/.github/workflows/create-test.yml @@ -1,6 +1,7 @@ name: Serverless Create Test on: + pull_request: schedule: - cron: "0/30 * * * *" # every 30 minutes workflow_dispatch: From b935e593589d05d6a1d5318f6982b53ef9d6586b Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 10:38:39 +0800 Subject: [PATCH 33/39] test all --- .github/workflows/create-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-test.yml b/.github/workflows/create-test.yml index 5ff1e95..01f31d4 100644 --- a/.github/workflows/create-test.yml +++ b/.github/workflows/create-test.yml @@ -17,8 +17,8 @@ jobs: - name: Set up ticloud uses: tidbcloud/setup-tidbcloud-cli@v0 with: - api_public_key: ${{ secrets.CONNECT_PUBLIC_KEY }} - api_private_key: ${{ secrets.CONNECT_PRIVATE_KEY }} + api_public_key: ${{ secrets.CREATE_TEST_PUBLIC_KEY }} + api_private_key: ${{ secrets.CREATE_TEST_PRIVATE_KEY }} - name: Delete all serverless run: | From fec02a04615c203f66b717368a9abb0ba4d649d6 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 10:44:48 +0800 Subject: [PATCH 34/39] test branch --- .github/workflows/compatibility-test.yml | 1 - .github/workflows/connect-test.yml | 9 ++++++--- .github/workflows/create-test.yml | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compatibility-test.yml b/.github/workflows/compatibility-test.yml index 3fc30ea..d34d873 100644 --- a/.github/workflows/compatibility-test.yml +++ b/.github/workflows/compatibility-test.yml @@ -1,7 +1,6 @@ name: Serverless Driver Compatibility Test on: - pull_request: schedule: - cron: "0 22 * * *" # every day at 22:00 workflow_dispatch: diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index d5839f2..a9c6ff9 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -1,7 +1,6 @@ name: Serverless Connect Test on: - pull_request: schedule: - cron: "0/5 * * * *" # every 5 minutes workflow_dispatch: @@ -17,6 +16,10 @@ jobs: - name: Setup mysql uses: shogo82148/actions-setup-mysql@v1 - - name: connect + - name: connect cluster run: | - mysql -u '4TNwCHfJvXJxs4v.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} + mysql -u '4TNwCHfJvXJxs4v.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} + + - name: connect branch + run: | + mysql --connect-timeout 15 -u '4RCpNUuWxmFv2Ju.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_BRANCH_PSWD }} diff --git a/.github/workflows/create-test.yml b/.github/workflows/create-test.yml index 01f31d4..9ec0282 100644 --- a/.github/workflows/create-test.yml +++ b/.github/workflows/create-test.yml @@ -1,7 +1,6 @@ name: Serverless Create Test on: - pull_request: schedule: - cron: "0/30 * * * *" # every 30 minutes workflow_dispatch: From f1c93df2d960986734db884c4b237e63d135e79a Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 10:46:08 +0800 Subject: [PATCH 35/39] test branch --- .github/workflows/connect-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index a9c6ff9..a899986 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -8,7 +8,7 @@ on: jobs: connect-test: runs-on: ubuntu-latest - timeout-minutes: 3 + timeout-minutes: 2 steps: - name: Checkout uses: actions/checkout@v3 From 2cf22f6b06f242384a4b32167431abbebdf74435 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 11:56:34 +0800 Subject: [PATCH 36/39] init --- .github/workflows/create-test.yml | 6 ++--- .github/workflows/init.yml | 39 +++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/init.yml diff --git a/.github/workflows/create-test.yml b/.github/workflows/create-test.yml index 9ec0282..95dc16b 100644 --- a/.github/workflows/create-test.yml +++ b/.github/workflows/create-test.yml @@ -8,7 +8,7 @@ on: jobs: setup: runs-on: ubuntu-latest - timeout-minutes: 10 + timeout-minutes: 5 steps: - name: Checkout uses: actions/checkout@v3 @@ -30,13 +30,13 @@ jobs: ticloud cluster delete -p 1372813089447741295 -c $id --force; done - connect-test: + create-test: needs: setup strategy: matrix: region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 10 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/init.yml b/.github/workflows/init.yml new file mode 100644 index 0000000..8cccb47 --- /dev/null +++ b/.github/workflows/init.yml @@ -0,0 +1,39 @@ +name: Init + +on: + pull_request: + +jobs: + setup: + strategy: + matrix: + region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up ticloud + uses: tidbcloud/setup-tidbcloud-cli@v0 + with: + api_public_key: oHloc6bC + api_private_key: aba07d40-7f6d-4c2c-8d6e-311639fd6c11 + + - name: Create cluster + run: | + PROJECT_ID=1372813089454311307 + ticloud cluster create -p $PROJECT_ID --cluster-name ${{ matrix.region }} --cloud-provider AWS -r ${{ matrix.region }} --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS > ${{ matrix.region }} + cat ${{ matrix.region }} + ticloud cluster get -p $PROJECT_ID -c `cat ${{ matrix.region }} | sed 's/[^0-9]//g'` > ${{ matrix.region }} + cat ${{ matrix.region }} + echo "PROJECT_ID=$PROJECT_ID" >> $GITHUB_ENV + echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV + echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV + echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV + + - name: Create branch + run: | + ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} + cat ${{ matrix.region }} + ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} + cat ${{ matrix.region }} From 7ba96fc0e6544276000fa235d220e5a476af3c46 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 12:13:40 +0800 Subject: [PATCH 37/39] test connect --- .github/workflows/compatibility-test.yml | 7 +---- .github/workflows/connect-test.yml | 13 ++++++-- .github/workflows/init.yml | 39 ------------------------ 3 files changed, 12 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/init.yml diff --git a/.github/workflows/compatibility-test.yml b/.github/workflows/compatibility-test.yml index d34d873..375f65b 100644 --- a/.github/workflows/compatibility-test.yml +++ b/.github/workflows/compatibility-test.yml @@ -26,13 +26,8 @@ jobs: total=$(jq '.total' cluster); for i in $(seq 1 $total); do - name=`echo $(jq ".items[$i-1].name" cluster)` id=`echo $(jq ".items[$i-1].id" cluster) | sed 's/"//g'` - echo $name - echo $id - if [[ $name != *"connect-test"* ]]; then - ticloud cluster delete -p 1372813089206721319 -c $id --force; - fi + ticloud cluster delete -p 1372813089206721319 -c $id --force; done # create cluster diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index a899986..c831e5f 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -1,6 +1,7 @@ name: Serverless Connect Test on: + pull_request: schedule: - cron: "0/5 * * * *" # every 5 minutes workflow_dispatch: @@ -18,8 +19,16 @@ jobs: - name: connect cluster run: | - mysql -u '4TNwCHfJvXJxs4v.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} + mysql --connect-timeout 15 -u '2MLQsKRhdXQCjHb.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} + mysql --connect-timeout 15 -u 'eQsaVQSBNukNp7k.root' -h gateway01.ap-southeast-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} + mysql --connect-timeout 15 -u 'nADWvyBQFXhgZxw.root' -h gateway01.us-east-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} + mysql --connect-timeout 15 -u 'Nv7fzTqtB8V698S.root' -h gateway01.ap-northeast-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} + mysql --connect-timeout 15 -u 'j24i5KNxRJpvEj7.root' -h gateway01.us-west-2.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY - name: connect branch run: | - mysql --connect-timeout 15 -u '4RCpNUuWxmFv2Ju.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_BRANCH_PSWD }} + mysql --connect-timeout 15 -u '3PPnE7BsLfHX5qW.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.BRANCH_PSWD_EU_CENTRAL_1 }} + mysql --connect-timeout 15 -u 'pSs1wenmQSbzevk.root' -h gateway01.ap-southeast-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.BRANCH_PSWD_AP_SOUTHEAST_1 }} + mysql --connect-timeout 15 -u '2NZSvbxdPaNdeNq.root' -h gateway01.us-east-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.BRANCH_PSWD_US_EAST_1 }} + mysql --connect-timeout 15 -u '3JwPQ7c8B1Bva6f.root' -h gateway01.ap-northeast-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.BRANCH_PSWD_AP_NORTHEAST_1 }} + mysql --connect-timeout 15 -u '23MRMbs1xyFmALz.root' -h gateway01.us-west-2.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.BRANCH_PSWD_US_WEST_2 }} diff --git a/.github/workflows/init.yml b/.github/workflows/init.yml deleted file mode 100644 index 8cccb47..0000000 --- a/.github/workflows/init.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Init - -on: - pull_request: - -jobs: - setup: - strategy: - matrix: - region: [ us-east-1, us-west-2, ap-northeast-1, ap-southeast-1, eu-central-1 ] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up ticloud - uses: tidbcloud/setup-tidbcloud-cli@v0 - with: - api_public_key: oHloc6bC - api_private_key: aba07d40-7f6d-4c2c-8d6e-311639fd6c11 - - - name: Create cluster - run: | - PROJECT_ID=1372813089454311307 - ticloud cluster create -p $PROJECT_ID --cluster-name ${{ matrix.region }} --cloud-provider AWS -r ${{ matrix.region }} --root-password ${{ secrets.TIDB_CLOUD_PASSWORD }} --cluster-type SERVERLESS > ${{ matrix.region }} - cat ${{ matrix.region }} - ticloud cluster get -p $PROJECT_ID -c `cat ${{ matrix.region }} | sed 's/[^0-9]//g'` > ${{ matrix.region }} - cat ${{ matrix.region }} - echo "PROJECT_ID=$PROJECT_ID" >> $GITHUB_ENV - echo "CLUSTER_ID=`echo $(jq '.id' ${{ matrix.region }}) | sed 's/"//g'`" >> $GITHUB_ENV - echo "CLUSTER_USER=$(jq '.status.connection_strings.default_user' ${{ matrix.region }})" >> $GITHUB_ENV - echo "CLUSTER_HOST=$(jq '.status.connection_strings.standard.host' ${{ matrix.region }})" >> $GITHUB_ENV - - - name: Create branch - run: | - ticloud branch create -c ${{ env.CLUSTER_ID }} --branch-name ${{ matrix.region }} > ${{ matrix.region }} - cat ${{ matrix.region }} - ticloud branch get -c ${{ env.CLUSTER_ID }} -b `cat ${{ matrix.region }} | grep -o 'bran-[a-zA-Z0-9]*'` > ${{ matrix.region }} - cat ${{ matrix.region }} From 4ef76fc7b3fa806feb53a078cfcd682865190003 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 12:33:46 +0800 Subject: [PATCH 38/39] test connect --- .github/workflows/connect-test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index c831e5f..8d9691a 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -19,11 +19,11 @@ jobs: - name: connect cluster run: | - mysql --connect-timeout 15 -u '2MLQsKRhdXQCjHb.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} - mysql --connect-timeout 15 -u 'eQsaVQSBNukNp7k.root' -h gateway01.ap-southeast-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} - mysql --connect-timeout 15 -u 'nADWvyBQFXhgZxw.root' -h gateway01.us-east-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} - mysql --connect-timeout 15 -u 'Nv7fzTqtB8V698S.root' -h gateway01.ap-northeast-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.CONNECT_TEST_PSWD }} - mysql --connect-timeout 15 -u 'j24i5KNxRJpvEj7.root' -h gateway01.us-west-2.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY + mysql --connect-timeout 15 -u '2MLQsKRhdXQCjHb.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} + mysql --connect-timeout 15 -u 'eQsaVQSBNukNp7k.root' -h gateway01.ap-southeast-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} + mysql --connect-timeout 15 -u 'nADWvyBQFXhgZxw.root' -h gateway01.us-east-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} + mysql --connect-timeout 15 -u 'Nv7fzTqtB8V698S.root' -h gateway01.ap-northeast-1.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} + mysql --connect-timeout 15 -u 'j24i5KNxRJpvEj7.root' -h gateway01.us-west-2.prod.aws.tidbcloud.com -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/certs/ca-certificates.crt -p${{ secrets.TIDB_CLOUD_PASSWORD }} - name: connect branch run: | From 7c4b34561476f88d5db2ae2cd6475e37d51d98e1 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Wed, 19 Jul 2023 12:37:02 +0800 Subject: [PATCH 39/39] test connect --- .github/workflows/connect-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 8d9691a..9fe5986 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -1,7 +1,6 @@ name: Serverless Connect Test on: - pull_request: schedule: - cron: "0/5 * * * *" # every 5 minutes workflow_dispatch: @@ -9,7 +8,7 @@ on: jobs: connect-test: runs-on: ubuntu-latest - timeout-minutes: 2 + timeout-minutes: 3 steps: - name: Checkout uses: actions/checkout@v3