|
7 | 7 | # Run every 4 hours
|
8 | 8 | - cron: "0 */4 * * *"
|
9 | 9 |
|
| 10 | +# Restrict to only running this workflow one at a time. |
| 11 | +# Any new runs will be queued until the previous run is complete. |
| 12 | +# Any existing pending runs will be cancelled and replaced with current run. |
| 13 | +concurrency: |
| 14 | + group: continuous-benchmark |
| 15 | + |
10 | 16 | jobs:
|
11 | 17 | runBenchmark:
|
12 | 18 | runs-on: ubuntu-latest
|
@@ -182,115 +188,9 @@ jobs:
|
182 | 188 | env:
|
183 | 189 | SLACK_WEBHOOK_URL: ${{ secrets.CI_ALERTS_CHANNEL_WEBHOOK_URL }}
|
184 | 190 | SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
185 |
| - # Schedule this benchmark to run once a day for the sake of saving on S3 costs. |
186 |
| - runLoadTimeBenchmark: |
187 |
| - runs-on: ubuntu-latest |
188 |
| - needs: runBenchmark |
189 |
| - if: ${{ always() && (github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.schedule == '0 0 * * *') }} |
190 |
| - steps: |
191 |
| - - uses: actions/checkout@v3 |
192 |
| - - uses: webfactory/[email protected] |
193 |
| - with: |
194 |
| - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} |
195 |
| - - name: Benches |
196 |
| - id: benches |
197 |
| - run: | |
198 |
| - export HCLOUD_TOKEN=${{ secrets.HCLOUD_TOKEN }} |
199 |
| - export POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} |
200 |
| - export POSTGRES_HOST=${{ secrets.POSTGRES_HOST }} |
201 |
| - export SERVER_NAME="benchmark-server-3" |
202 |
| - bash -x tools/setup_ci.sh |
203 |
| -
|
204 |
| - set +e |
205 |
| -
|
206 |
| - # Benchmark collection load time |
207 |
| - export BENCHMARK_STRATEGY="collection-reload" |
208 |
| -
|
209 |
| - declare -A DATASET_TO_ENGINE |
210 |
| - declare -A DATASET_TO_URL |
211 |
| - DATASET_TO_ENGINE["all-payloads-default"]="qdrant-continuous-benchmark-snapshot" |
212 |
| - DATASET_TO_ENGINE["all-payloads-on-disk"]="qdrant-continuous-benchmark-snapshot" |
213 |
| - DATASET_TO_ENGINE["all-payloads-default-sparse"]="qdrant-continuous-benchmark-snapshot" |
214 |
| - DATASET_TO_ENGINE["all-payloads-on-disk-sparse"]="qdrant-continuous-benchmark-snapshot" |
215 |
| -
|
216 |
| - export STORAGE_URL="https://storage.googleapis.com/qdrant-benchmark-snapshots/all-payloads" |
217 |
| - DATASET_TO_URL["all-payloads-default"]="${STORAGE_URL}/benchmark-all-payloads-500k-768-default.snapshot" |
218 |
| - DATASET_TO_URL["all-payloads-on-disk"]="${STORAGE_URL}/benchmark-all-payloads-500k-768-on-disk.snapshot" |
219 |
| - DATASET_TO_URL["all-payloads-default-sparse"]="${STORAGE_URL}/benchmark-all-payloads-500k-sparse-default.snapshot" |
220 |
| - DATASET_TO_URL["all-payloads-on-disk-sparse"]="${STORAGE_URL}/benchmark-all-payloads-500k-sparse-on-disk.snapshot" |
221 |
| -
|
222 |
| - set +e |
223 |
| -
|
224 |
| - for dataset in "${!DATASET_TO_ENGINE[@]}"; do |
225 |
| - export ENGINE_NAME=${DATASET_TO_ENGINE[$dataset]} |
226 |
| - export DATASETS=$dataset |
227 |
| - export SNAPSHOT_URL=${DATASET_TO_URL[$dataset]} |
228 |
| -
|
229 |
| - # Benchmark the dev branch: |
230 |
| - export QDRANT_VERSION=ghcr/dev |
231 |
| - timeout 30m bash -x tools/run_ci.sh |
232 |
| -
|
233 |
| - # Benchmark the master branch: |
234 |
| - export QDRANT_VERSION=docker/master |
235 |
| - timeout 30m bash -x tools/run_ci.sh |
236 |
| - done |
237 |
| -
|
238 |
| - set -e |
239 |
| - - name: Fail job if any of the benches failed |
240 |
| - if: steps.benches.outputs.failed == 'error' || steps.benches.outputs.failed == 'timeout' |
241 |
| - run: exit 1 |
242 |
| - - name: Send Notification |
243 |
| - if: failure() || cancelled() |
244 |
| - |
245 |
| - with: |
246 |
| - payload: | |
247 |
| - { |
248 |
| - "text": "CI benchmarks (runLoadTimeBenchmark) run status: ${{ job.status }}", |
249 |
| - "blocks": [ |
250 |
| - { |
251 |
| - "type": "section", |
252 |
| - "text": { |
253 |
| - "type": "mrkdwn", |
254 |
| - "text": "CI benchmarks (runLoadTimeBenchmark) failed because of *${{ steps.benches.outputs.failed }}*." |
255 |
| - } |
256 |
| - }, |
257 |
| - { |
258 |
| - "type": "section", |
259 |
| - "text": { |
260 |
| - "type": "mrkdwn", |
261 |
| - "text": "Qdrant version: *${{ steps.benches.outputs.qdrant_version }}*." |
262 |
| - } |
263 |
| - }, |
264 |
| - { |
265 |
| - "type": "section", |
266 |
| - "text": { |
267 |
| - "type": "mrkdwn", |
268 |
| - "text": "Engine: *${{ steps.benches.outputs.engine_name }}*." |
269 |
| - } |
270 |
| - }, |
271 |
| - { |
272 |
| - "type": "section", |
273 |
| - "text": { |
274 |
| - "type": "mrkdwn", |
275 |
| - "text": "Dataset: *${{ steps.benches.outputs.dataset }}*." |
276 |
| - } |
277 |
| - }, |
278 |
| - { |
279 |
| - "type": "section", |
280 |
| - "text": { |
281 |
| - "type": "mrkdwn", |
282 |
| - "text": "View the results <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>" |
283 |
| - } |
284 |
| - } |
285 |
| - ] |
286 |
| - } |
287 |
| - env: |
288 |
| - SLACK_WEBHOOK_URL: ${{ secrets.CI_ALERTS_CHANNEL_WEBHOOK_URL }} |
289 |
| - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
290 |
| - |
291 | 191 | runParallelBenchmark:
|
292 | 192 | runs-on: ubuntu-latest
|
293 |
| - needs: [ runLoadTimeBenchmark, runTenantsBenchmark ] |
| 193 | + needs: runTenantsBenchmark |
294 | 194 | if: ${{ always() }}
|
295 | 195 | steps:
|
296 | 196 | - uses: actions/checkout@v3
|
|
0 commit comments