diff --git a/.github/actions/benchmark_cloud/action.yml b/.github/actions/benchmark_cloud/action.yml index 948f4e89465d9..0752cf01fce81 100644 --- a/.github/actions/benchmark_cloud/action.yml +++ b/.github/actions/benchmark_cloud/action.yml @@ -56,6 +56,7 @@ runs: CLOUD_PASSWORD: ${{ inputs.cloud_password }} CLOUD_ORG: ${{ inputs.cloud_org }} CLOUD_ENDPOINT: ${{ inputs.cloud_endpoint }} + CLOUD_WAREHOUSE: benchmark-${{ inputs.run_id }} shell: bash run: | ./benchmark_cloud.sh @@ -102,3 +103,10 @@ runs: with: name: benchmark-${{ inputs.dataset }}-cloud-${{ inputs.size }} path: benchmark/clickbench/result-${{ inputs.dataset }}-cloud-${{ inputs.size }}.json + + - name: Remove warehouse + if: always() + shell: bash + continue-on-error: true + run: | + bendsql cloud warehouse delete benchmark-${{ inputs.run_id }} diff --git a/.github/actions/publish_binary/action.yml b/.github/actions/publish_binary/action.yml index cb3c9aaca3317..d0540e0dc87af 100644 --- a/.github/actions/publish_binary/action.yml +++ b/.github/actions/publish_binary/action.yml @@ -47,7 +47,7 @@ runs: shell: bash if: inputs.mode == 'normal' run: | - aws s3 cp databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz s3://repo.databend.rs/databend/${{ inputs.version }}/databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz + aws s3 cp databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz s3://repo.databend.rs/databend/${{ inputs.version }}/databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz --no-progress curl --retry 3 -fsSLo tags.json \ --header 'content-type: application/json' \ --header 'authorization: Bearer ${{ inputs.github_token }}' \ @@ -65,7 +65,7 @@ runs: shell: bash if: inputs.mode == 'hive' run: | - aws s3 cp databend-hive-${{ inputs.version }}-${{ inputs.target }}.tar.gz s3://repo.databend.rs/databend/${{ inputs.version }}/databend-hive-${{ inputs.version }}-${{ inputs.target }}.tar.gz + aws s3 cp databend-hive-${{ inputs.version }}-${{ inputs.target }}.tar.gz s3://repo.databend.rs/databend/${{ inputs.version }}/databend-hive-${{ inputs.version }}-${{ inputs.target }}.tar.gz --no-progress curl --retry 3 -fsSLo tags.json \ --header 'content-type: application/json' \ --header 'authorization: Bearer ${{ inputs.github_token }}' \ diff --git a/.github/actions/setup_docker/action.yml b/.github/actions/setup_docker/action.yml index b8fd68f4675b0..81e3cbc75d5a8 100644 --- a/.github/actions/setup_docker/action.yml +++ b/.github/actions/setup_docker/action.yml @@ -25,7 +25,7 @@ runs: using: "composite" steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Configure AWS Credentials if: inputs.ecr_role_arn @@ -43,7 +43,7 @@ runs: - name: Login to DockerHub if: inputs.dockerhub_token - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ inputs.dockerhub_user }} password: ${{ inputs.dockerhub_token }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd063accbce0f..e67c027cc1184 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,7 @@ on: permissions: id-token: write pull-requests: write + statuses: write contents: write jobs: diff --git a/.github/workflows/trusted-benchmark.yml b/.github/workflows/trusted-benchmark.yml index 88d216c65b202..60a8fb7c20f3d 100644 --- a/.github/workflows/trusted-benchmark.yml +++ b/.github/workflows/trusted-benchmark.yml @@ -15,6 +15,7 @@ on: permissions: id-token: write pull-requests: write + statuses: write contents: read env: @@ -80,7 +81,7 @@ jobs: release) version=${{ needs.metadata.outputs.source_id }} target=x86_64-unknown-linux-gnu - aws s3 cp s3://repo.databend.rs/databend/${version}/databend-${version}-${target}.tar.gz distro/ + aws s3 cp s3://repo.databend.rs/databend/${version}/databend-${version}-${target}.tar.gz distro/ --no-progress tar x -C ./target/release -f ./distro/databend-${version}-${target}.tar.gz --strip-components 1 bin/ ;; *) @@ -95,6 +96,15 @@ jobs: sudo cp ./target/release/databend-* /usr/local/bin/ databend-query --version databend-meta --version + - name: Set github check status to pending + uses: Sibz/github-status-action@v1 + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: 'Benchmark Local / ${{ matrix.dataset }}' + description: 'Running' + state: 'pending' + sha: ${{ needs.metadata.outputs.sha }} + target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }} - uses: ./.github/actions/benchmark_local with: sha: ${{ needs.metadata.outputs.sha }} @@ -102,6 +112,16 @@ jobs: dataset: ${{ matrix.dataset }} source: ${{ needs.metadata.outputs.source }} source_id: ${{ needs.metadata.outputs.source_id }} + - name: Set github check status to completed + if: always() + uses: Sibz/github-status-action@v1 + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: 'Benchmark Local / ${{ matrix.dataset }}' + description: 'Completed' + state: ${{ job.status }} + sha: ${{ needs.metadata.outputs.sha }} + target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }} docker: needs: metadata @@ -166,12 +186,23 @@ jobs: - tpch size: - Medium + - Large fail-fast: true max-parallel: 1 steps: - uses: actions/checkout@v3 - uses: ./.github/actions/setup_bendsql + - name: Set github check status to pending + uses: Sibz/github-status-action@v1 + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: 'Benchmark Cloud / ${{ matrix.dataset }}(${{ matrix.size }})' + description: 'Running' + state: 'pending' + sha: ${{ needs.metadata.outputs.sha }} + target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }} - uses: ./.github/actions/benchmark_cloud + id: benchmark with: sha: ${{ needs.metadata.outputs.sha }} run_id: ${{ needs.metadata.outputs.run_id }} @@ -184,6 +215,16 @@ jobs: cloud_password: ${{ secrets.BENCHMARK_CLOUD_PASSWORD }} cloud_org: ${{ secrets.BENCHMARK_CLOUD_ORG }} cloud_endpoint: ${{ secrets.BENCHMARK_CLOUD_ENDPOINT }} + - name: Set github check status to completed + if: always() + uses: Sibz/github-status-action@v1 + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: 'Benchmark Cloud / ${{ matrix.dataset }}(${{ matrix.size }})' + description: 'Completed' + state: ${{ job.status }} + sha: ${{ needs.metadata.outputs.sha }} + target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }} comment_on_pr: runs-on: [self-hosted, X64, Linux, dev] @@ -207,7 +248,7 @@ jobs: path: benchmark/clickbench/results/hits - uses: actions/download-artifact@v3 with: - name: benchmark-hits-local + name: benchmark-tpch-local path: benchmark/clickbench/results/tpch - uses: actions/download-artifact@v3 with: @@ -270,20 +311,12 @@ jobs: aws-region: us-east-2 - uses: actions/download-artifact@v3 with: - name: benchmark-hits-local - path: benchmark/clickbench/results/hits + name: benchmark-${{ matrix.dataset }}-local + path: benchmark/clickbench/results/${{ matrix.dataset }} - uses: actions/download-artifact@v3 with: - name: benchmark-hits-cloud-Medium - path: benchmark/clickbench/results/hits - - uses: actions/download-artifact@v3 - with: - name: benchmark-hits-local - path: benchmark/clickbench/results/tpch - - uses: actions/download-artifact@v3 - with: - name: benchmark-tpch-cloud-Medium - path: benchmark/clickbench/results/tpch + name: benchmark-${{ matrix.dataset }}-cloud-Medium + path: benchmark/clickbench/results/${{ matrix.dataset }} - name: Upload nightly results to repo.databend.rs working-directory: benchmark/clickbench run: |