27
27
current_batch :
28
28
description : " Current batch index (for cascading, internal use)"
29
29
default : " 0"
30
+ workflow_run_ids :
31
+ description : " Comma-separated list of workflow run IDs (for internal use)"
32
+ default : " "
30
33
31
34
jobs :
32
35
prepareBenchmarks :
37
40
has_next_batch : ${{ steps.prepare.outputs.has_next_batch }}
38
41
next_batch : ${{ steps.prepare.outputs.next_batch }}
39
42
benchmark_set : ${{ steps.prepare.outputs.benchmark_set }}
43
+ workflow_run_ids : ${{ steps.prepare.outputs.workflow_run_ids }}
40
44
steps :
41
45
- uses : actions/checkout@v4
42
46
with :
52
56
53
57
echo "benchmark_set=$BENCHMARK_SET" >> $GITHUB_OUTPUT
54
58
59
+ # Accumulate workflow run IDs
60
+ WORKFLOW_RUN_IDS="${{ inputs.workflow_run_ids }}"
61
+ if [ -n "$WORKFLOW_RUN_IDS" ]; then
62
+ WORKFLOW_RUN_IDS="${WORKFLOW_RUN_IDS},${{ github.run_id }}"
63
+ else
64
+ WORKFLOW_RUN_IDS="${{ github.run_id }}"
65
+ fi
66
+ echo "workflow_run_ids=$WORKFLOW_RUN_IDS" >> $GITHUB_OUTPUT
67
+
55
68
if [ "$BENCHMARK_SET" = "single" ]; then
56
69
# Single benchmark - create a matrix with one item
57
70
MATRIX_JSON='[{"index": 0, "qdrant_version": "'${{ inputs.qdrant_version }}'", "qdrant_version_sanitized": "'$(echo "${{ inputs.qdrant_version }}" | sed "s|/|-|g")'", "dataset": "'${{ inputs.dataset }}'", "engine_config": "'${{ inputs.engine_config }}'", "feature_flags_all": '${{ inputs.feature_flags_all }}'}]'
@@ -237,43 +250,92 @@ jobs:
237
250
with :
238
251
name : results-${{ matrix.config.qdrant_version_sanitized }}-${{ matrix.config.dataset }}-${{ matrix.config.engine_config }}-${{ matrix.config.index }}
239
252
path : results/
240
- retention-days : 7
253
+ retention-days : 1
241
254
242
255
processBenchmarks :
243
- name : Process Benchmark Results
256
+ name : Process All Benchmark Results
244
257
needs : [prepareBenchmarks, runBenchmarks]
258
+ if : needs.prepareBenchmarks.outputs.has_next_batch == 'false'
245
259
runs-on : ubuntu-latest
246
260
container :
247
261
image : python:3.11-slim
248
262
steps :
249
263
- uses : actions/checkout@v4
250
264
with :
251
265
ref : ${{ github.ref }}
266
+
252
267
- name : Install dependencies
253
268
run : |
254
269
pip install pandas jupyter nbconvert
255
270
256
- - name : Download all benchmark artifacts
257
- uses : actions/download-artifact@v4
258
- with :
259
- path : artifacts/
271
+ - name : Download artifacts from specific workflow runs
272
+ run : |
273
+ # Install GitHub CLI
274
+ apt-get update && apt-get install -y curl unzip
275
+ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
276
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
277
+ apt-get update && apt-get install -y gh
278
+
279
+ # Download artifacts from specific workflow runs
280
+ mkdir -p artifacts
281
+
282
+ # Get workflow run IDs from the accumulated list
283
+ WORKFLOW_RUN_IDS="${{ needs.prepareBenchmarks.outputs.workflow_run_ids }}"
284
+ echo "Workflow run IDs: $WORKFLOW_RUN_IDS"
285
+
286
+ # Convert comma-separated list to array and download artifacts from each run
287
+ IFS=',' read -ra RUN_IDS <<< "$WORKFLOW_RUN_IDS"
288
+ for run_id in "${RUN_IDS[@]}"; do
289
+ echo "Downloading artifacts from run $run_id"
290
+
291
+ # List artifacts for this run
292
+ gh api repos/${{ github.repository }}/actions/runs/$run_id/artifacts \
293
+ --jq '.artifacts[] | select(.name | startswith("results-")) | {name: .name, url: .archive_download_url}' \
294
+ | while IFS= read -r line; do
295
+ artifact_name=$(echo "$line" | jq -r '.name')
296
+ artifact_url=$(echo "$line" | jq -r '.url')
297
+
298
+ if [ -n "$artifact_url" ] && [ "$artifact_url" != "null" ]; then
299
+ echo "Downloading $artifact_name from run $run_id"
300
+ gh api "$artifact_url" > "artifacts/${run_id}-${artifact_name}.zip" || true
301
+ fi
302
+ done
303
+ done
304
+
305
+ # Extract all downloaded artifacts
306
+ cd artifacts
307
+ for zip_file in *.zip; do
308
+ if [ -f "$zip_file" ]; then
309
+ unzip -o "$zip_file" && rm "$zip_file"
310
+ fi
311
+ done
312
+ cd ..
313
+
314
+ ls -la artifacts/
315
+ env :
316
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
317
+
260
318
- name : Prepare results directory
261
319
run : |
262
320
mkdir -p results
263
321
find artifacts/ -name "*.json" -exec cp {} results/ \;
264
322
ls -la results/
323
+ echo "Found $(ls results/*.json | wc -l) result files"
324
+
265
325
- name : Execute Jupyter notebook
266
326
run : |
267
327
cd scripts
268
- jupyter nbconvert --to notebook --execute process-benchmarks.ipynb
328
+ jupyter nbconvert --to notebook --execute process-benchmarks.ipynb --output process-benchmarks-executed.ipynb
329
+ ls -la .
269
330
cd ..
331
+
270
332
- name : Upload processed results
271
333
uses : actions/upload-artifact@v4
272
334
with :
273
- name : processed-results
335
+ name : final- processed-results
274
336
path : |
275
- scripts/results.json
276
- retention-days : 7
337
+ scripts/results* .json
338
+ retention-days : 1
277
339
278
340
triggerNextBatch :
279
341
name : Trigger Next Batch
@@ -294,7 +356,8 @@ jobs:
294
356
-d "{
295
357
\"inputs\": {
296
358
\"benchmark_set\": \"${{ needs.prepareBenchmarks.outputs.benchmark_set }}\",
297
- \"current_batch\": \"${{ needs.prepareBenchmarks.outputs.next_batch }}\"
359
+ \"current_batch\": \"${{ needs.prepareBenchmarks.outputs.next_batch }}\",
360
+ \"workflow_run_ids\": \"${{ needs.prepareBenchmarks.outputs.workflow_run_ids }}\"
298
361
},
299
362
\"ref\": \"${{ github.ref }}\"
300
363
}"
0 commit comments