Skip to content

Commit 19ad3fd

Browse files
authored
Merge branch 'main' into fix/714-build-intelligent-pod-scheduling-based-on-network-latency
2 parents 45104a2 + 513f475 commit 19ad3fd

76 files changed

Lines changed: 10228 additions & 473 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CI_COMMANDS.md

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Overview
44

55
This document describes the optimized CI/CD pipeline architecture introduced
6-
to address issues #663, #664, #665, and #666.
6+
to address issues #700, #701, #703, and #714.
77

88
---
99

@@ -20,7 +20,7 @@ All reusable logic lives under `.github/actions/`:
2020

2121
---
2222

23-
## Core CI Workflows (#663)
23+
## Core CI Workflows (#700)
2424

2525
### `ci.yml`
2626
- **Change detection** gates expensive jobs (helm-lint, api-docs, examples-smoke-test,
@@ -47,7 +47,7 @@ the critical path by ~35–40% compared to the previous sequential layout.
4747

4848
---
4949

50-
## Heavy Validation Workflows (#666)
50+
## Heavy Validation Workflows (#703)
5151

5252
### `chaos-tests.yml`
5353
- **Extracted** cluster provisioning into `setup-kind-cluster` composite action.
@@ -70,25 +70,17 @@ the critical path by ~35–40% compared to the previous sequential layout.
7070

7171
---
7272

73-
## Performance & Benchmark Workflows (#664)
74-
75-
### `benchmark.yml`
76-
- Build step produces a Docker image saved as a `.tar.gz` artifact.
77-
- `setup-perf-env` composite action handles k6, kind, kubectl, cluster, RBAC,
78-
operator deployment, and port-forwarding — eliminating ~80 lines of duplicated
79-
setup across the three benchmark workflows.
80-
- Baseline comparison uses the same `compare_benchmarks.py` script as
81-
`performance-regression.yml`.
82-
83-
### `performance-regression.yml`
84-
- Removed the now-redundant `setup-cluster` job (consolidated into
85-
`performance-test` via `setup-perf-env`).
86-
- Removed duplicate k6/kind/kubectl install steps.
87-
88-
### `webhook-benchmark.yml`
89-
- Uses `setup-rust` composite action.
90-
- Standardised on `actions/upload-artifact@v4` / `actions/download-artifact@v4`
91-
(was mixing v7/v8 which don't exist).
73+
## Performance & Benchmark Workflows (#701)
74+
75+
### `performance.yml` (unified pipeline)
76+
- **Replaces** the former `benchmark.yml`, `performance-regression.yml`, and
77+
`webhook-benchmark.yml` with a single matrix-driven workflow.
78+
- **Shared build job** produces the operator binary and Docker image once; all
79+
three suites (operator, regression, webhook) download the same artifact.
80+
- **Matrix execution** runs operator and regression suites via `setup-perf-env`,
81+
and the webhook suite directly (no kind cluster required).
82+
- **Shared baseline comparison** via `.github/actions/compare-benchmarks`
83+
composite action wrapping `compare_benchmarks.py`.
9284

9385
---
9486

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Compare Benchmark Results
2+
description: >
3+
Shared baseline comparison logic used by all performance/benchmark workflows.
4+
Wraps benchmarks/scripts/compare_benchmarks.py with consistent inputs/outputs.
5+
6+
inputs:
7+
current-file:
8+
description: Path to the current benchmark results JSON
9+
required: true
10+
baseline-file:
11+
description: Path to the baseline JSON file
12+
required: true
13+
threshold:
14+
description: Regression threshold percentage
15+
required: false
16+
default: "10"
17+
output-file:
18+
description: Path to write the regression report JSON
19+
required: false
20+
default: results/regression-report.json
21+
fail-on-regression:
22+
description: Exit with error when regression is detected
23+
required: false
24+
default: "false"
25+
26+
outputs:
27+
overall-passed:
28+
description: "true when no regressions exceed the threshold"
29+
value: ${{ steps.compare.outputs.overall_passed }}
30+
31+
runs:
32+
using: composite
33+
steps:
34+
- name: Compare with baseline
35+
id: compare
36+
shell: bash
37+
run: |
38+
set -euo pipefail
39+
CURRENT="${{ inputs.current-file }}"
40+
BASELINE="${{ inputs.baseline-file }}"
41+
OUTPUT="${{ inputs.output-file }}"
42+
THRESHOLD="${{ inputs.threshold }}"
43+
FAIL_FLAG=""
44+
[[ "${{ inputs.fail-on-regression }}" == "true" ]] && FAIL_FLAG="--fail-on-regression"
45+
46+
mkdir -p "$(dirname "$OUTPUT")"
47+
48+
if [[ ! -f "$CURRENT" ]]; then
49+
echo "overall_passed=true" >> "$GITHUB_OUTPUT"
50+
echo "No current results at $CURRENT — skipping comparison"
51+
exit 0
52+
fi
53+
54+
if [[ ! -f "$BASELINE" ]]; then
55+
echo "overall_passed=true" >> "$GITHUB_OUTPUT"
56+
echo "No baseline at $BASELINE — skipping comparison"
57+
exit 0
58+
fi
59+
60+
python3 benchmarks/scripts/compare_benchmarks.py compare \
61+
--current "$CURRENT" \
62+
--baseline "$BASELINE" \
63+
--threshold "$THRESHOLD" \
64+
--output "$OUTPUT" \
65+
$FAIL_FLAG \
66+
--verbose || COMPARE_EXIT=$?
67+
68+
if [[ -f "$OUTPUT" ]]; then
69+
PASSED=$(jq -r '.overall_passed // "true"' "$OUTPUT")
70+
echo "overall_passed=$PASSED" >> "$GITHUB_OUTPUT"
71+
else
72+
echo "overall_passed=true" >> "$GITHUB_OUTPUT"
73+
fi
74+
75+
exit "${COMPARE_EXIT:-0}"

.github/actions/setup-rust/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ runs:
2929
run: |
3030
sudo apt-get update -qq
3131
sudo apt-get install -y --no-install-recommends \
32+
cmake \
33+
pkg-config \
34+
libssl-dev \
3235
libsasl2-dev \
33-
libcurl4-openssl-dev \
34-
pkg-config
36+
libcurl4-openssl-dev
3537
3638
- name: Setup Rust cache
3739
uses: Swatinem/rust-cache@v2

0 commit comments

Comments
 (0)