Skip to content

Commit 7e320d7

Browse files
authored
Merge pull request #10566 from everpcpc/fix-ci
chore(ci): benchmark with large warehouse
2 parents 851bd3a + 6f52529 commit 7e320d7

File tree

5 files changed

+60
-18
lines changed

5 files changed

+60
-18
lines changed

.github/actions/benchmark_cloud/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ runs:
5656
CLOUD_PASSWORD: ${{ inputs.cloud_password }}
5757
CLOUD_ORG: ${{ inputs.cloud_org }}
5858
CLOUD_ENDPOINT: ${{ inputs.cloud_endpoint }}
59+
CLOUD_WAREHOUSE: benchmark-${{ inputs.run_id }}
5960
shell: bash
6061
run: |
6162
./benchmark_cloud.sh
@@ -102,3 +103,10 @@ runs:
102103
with:
103104
name: benchmark-${{ inputs.dataset }}-cloud-${{ inputs.size }}
104105
path: benchmark/clickbench/result-${{ inputs.dataset }}-cloud-${{ inputs.size }}.json
106+
107+
- name: Remove warehouse
108+
if: always()
109+
shell: bash
110+
continue-on-error: true
111+
run: |
112+
bendsql cloud warehouse delete benchmark-${{ inputs.run_id }}

.github/actions/publish_binary/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ runs:
4747
shell: bash
4848
if: inputs.mode == 'normal'
4949
run: |
50-
aws s3 cp databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz s3://repo.databend.rs/databend/${{ inputs.version }}/databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz
50+
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
5151
curl --retry 3 -fsSLo tags.json \
5252
--header 'content-type: application/json' \
5353
--header 'authorization: Bearer ${{ inputs.github_token }}' \
@@ -65,7 +65,7 @@ runs:
6565
shell: bash
6666
if: inputs.mode == 'hive'
6767
run: |
68-
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
68+
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
6969
curl --retry 3 -fsSLo tags.json \
7070
--header 'content-type: application/json' \
7171
--header 'authorization: Bearer ${{ inputs.github_token }}' \

.github/actions/setup_docker/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ runs:
2525
using: "composite"
2626
steps:
2727
- name: Set up Docker Buildx
28-
uses: docker/setup-buildx-action@v1
28+
uses: docker/setup-buildx-action@v2
2929

3030
- name: Configure AWS Credentials
3131
if: inputs.ecr_role_arn
@@ -43,7 +43,7 @@ runs:
4343
4444
- name: Login to DockerHub
4545
if: inputs.dockerhub_token
46-
uses: docker/login-action@v1
46+
uses: docker/login-action@v2
4747
with:
4848
username: ${{ inputs.dockerhub_user }}
4949
password: ${{ inputs.dockerhub_token }}

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
permissions:
1818
id-token: write
1919
pull-requests: write
20+
statuses: write
2021
contents: write
2122

2223
jobs:

.github/workflows/trusted-benchmark.yml

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
permissions:
1616
id-token: write
1717
pull-requests: write
18+
statuses: write
1819
contents: read
1920

2021
env:
@@ -80,7 +81,7 @@ jobs:
8081
release)
8182
version=${{ needs.metadata.outputs.source_id }}
8283
target=x86_64-unknown-linux-gnu
83-
aws s3 cp s3://repo.databend.rs/databend/${version}/databend-${version}-${target}.tar.gz distro/
84+
aws s3 cp s3://repo.databend.rs/databend/${version}/databend-${version}-${target}.tar.gz distro/ --no-progress
8485
tar x -C ./target/release -f ./distro/databend-${version}-${target}.tar.gz --strip-components 1 bin/
8586
;;
8687
*)
@@ -95,13 +96,32 @@ jobs:
9596
sudo cp ./target/release/databend-* /usr/local/bin/
9697
databend-query --version
9798
databend-meta --version
99+
- name: Set github check status to pending
100+
uses: Sibz/github-status-action@v1
101+
with:
102+
authToken: ${{ secrets.GITHUB_TOKEN }}
103+
context: 'Benchmark Local / ${{ matrix.dataset }}'
104+
description: 'Running'
105+
state: 'pending'
106+
sha: ${{ needs.metadata.outputs.sha }}
107+
target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }}
98108
- uses: ./.github/actions/benchmark_local
99109
with:
100110
sha: ${{ needs.metadata.outputs.sha }}
101111
run_id: ${{ needs.metadata.outputs.run_id }}
102112
dataset: ${{ matrix.dataset }}
103113
source: ${{ needs.metadata.outputs.source }}
104114
source_id: ${{ needs.metadata.outputs.source_id }}
115+
- name: Set github check status to completed
116+
if: always()
117+
uses: Sibz/github-status-action@v1
118+
with:
119+
authToken: ${{ secrets.GITHUB_TOKEN }}
120+
context: 'Benchmark Local / ${{ matrix.dataset }}'
121+
description: 'Completed'
122+
state: ${{ job.status }}
123+
sha: ${{ needs.metadata.outputs.sha }}
124+
target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }}
105125

106126
docker:
107127
needs: metadata
@@ -166,12 +186,23 @@ jobs:
166186
- tpch
167187
size:
168188
- Medium
189+
- Large
169190
fail-fast: true
170191
max-parallel: 1
171192
steps:
172193
- uses: actions/checkout@v3
173194
- uses: ./.github/actions/setup_bendsql
195+
- name: Set github check status to pending
196+
uses: Sibz/github-status-action@v1
197+
with:
198+
authToken: ${{ secrets.GITHUB_TOKEN }}
199+
context: 'Benchmark Cloud / ${{ matrix.dataset }}(${{ matrix.size }})'
200+
description: 'Running'
201+
state: 'pending'
202+
sha: ${{ needs.metadata.outputs.sha }}
203+
target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }}
174204
- uses: ./.github/actions/benchmark_cloud
205+
id: benchmark
175206
with:
176207
sha: ${{ needs.metadata.outputs.sha }}
177208
run_id: ${{ needs.metadata.outputs.run_id }}
@@ -184,6 +215,16 @@ jobs:
184215
cloud_password: ${{ secrets.BENCHMARK_CLOUD_PASSWORD }}
185216
cloud_org: ${{ secrets.BENCHMARK_CLOUD_ORG }}
186217
cloud_endpoint: ${{ secrets.BENCHMARK_CLOUD_ENDPOINT }}
218+
- name: Set github check status to completed
219+
if: always()
220+
uses: Sibz/github-status-action@v1
221+
with:
222+
authToken: ${{ secrets.GITHUB_TOKEN }}
223+
context: 'Benchmark Cloud / ${{ matrix.dataset }}(${{ matrix.size }})'
224+
description: 'Completed'
225+
state: ${{ job.status }}
226+
sha: ${{ needs.metadata.outputs.sha }}
227+
target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }}
187228

188229
comment_on_pr:
189230
runs-on: [self-hosted, X64, Linux, dev]
@@ -207,7 +248,7 @@ jobs:
207248
path: benchmark/clickbench/results/hits
208249
- uses: actions/download-artifact@v3
209250
with:
210-
name: benchmark-hits-local
251+
name: benchmark-tpch-local
211252
path: benchmark/clickbench/results/tpch
212253
- uses: actions/download-artifact@v3
213254
with:
@@ -270,20 +311,12 @@ jobs:
270311
aws-region: us-east-2
271312
- uses: actions/download-artifact@v3
272313
with:
273-
name: benchmark-hits-local
274-
path: benchmark/clickbench/results/hits
314+
name: benchmark-${{ matrix.dataset }}-local
315+
path: benchmark/clickbench/results/${{ matrix.dataset }}
275316
- uses: actions/download-artifact@v3
276317
with:
277-
name: benchmark-hits-cloud-Medium
278-
path: benchmark/clickbench/results/hits
279-
- uses: actions/download-artifact@v3
280-
with:
281-
name: benchmark-hits-local
282-
path: benchmark/clickbench/results/tpch
283-
- uses: actions/download-artifact@v3
284-
with:
285-
name: benchmark-tpch-cloud-Medium
286-
path: benchmark/clickbench/results/tpch
318+
name: benchmark-${{ matrix.dataset }}-cloud-Medium
319+
path: benchmark/clickbench/results/${{ matrix.dataset }}
287320
- name: Upload nightly results to repo.databend.rs
288321
working-directory: benchmark/clickbench
289322
run: |

0 commit comments

Comments
 (0)