Repository navigation
201 lines (195 loc) · 8.52 KB
/
Copy pathreference-compose.yml
File metadata and controls
201 lines (195 loc) · 8.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
name: Cell reference Compose smoke
on:
pull_request:
paths:
- ".github/workflows/reference-compose.yml"
- "Cargo.toml"
- "Cargo.lock"
- ".cargo/**"
- "crates/cellule-app/Cargo.toml"
- "crates/cellule-app/src/**"
- "crates/cellule-host/Cargo.toml"
- "crates/cellule-host/src/**"
- "crates/cellule-runtime/Cargo.toml"
- "crates/cellule-runtime/build.rs"
- "crates/cellule-runtime/docs/contracts/peer.proto"
- "crates/cellule-runtime/src/**"
- "crates/cellule-ltx/Cargo.toml"
- "crates/cellule-ltx/src/**"
- "crates/cellule-store/Cargo.toml"
- "crates/cellule-store/src/**"
- "crates/cellule-app/tests/**"
- "crates/cellule-app/qualification/**"
- "crates/cellule-peer-http/**"
workflow_dispatch:
inputs:
routing_baseline:
description: "Routing comparison revision (default: origin/main)"
type: string
default: ""
routing_only:
description: "Run only the matched routing measurement"
type: boolean
default: false
permissions:
contents: read
concurrency:
group: cell-reference-compose-${{ github.event.pull_request.number || github.ref }}
# Finish frozen comparisons and retain their evidence before testing a new head.
cancel-in-progress: false
jobs:
smoke:
if: ${{ !inputs.routing_only }}
runs-on: ubuntu-24.04
timeout-minutes: 45
env:
CELLULE_REFERENCE_PROJECT: cell-reference
CELLULE_PERF_ITERATIONS: "30"
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Pin qualification source and host profile
run: |
set -euo pipefail
CELLULE_REFERENCE_STATE="$RUNNER_TEMP/cell-reference"
printf 'CELLULE_REFERENCE_STATE=%s\n' "$CELLULE_REFERENCE_STATE" >> "$GITHUB_ENV"
mkdir -p "$CELLULE_REFERENCE_STATE/source" "$CELLULE_REFERENCE_STATE/target-linux" "$CELLULE_REFERENCE_STATE/evidence"
# Capability-free container root needs write permission on this runner-owned mount.
chmod 1777 "$CELLULE_REFERENCE_STATE/evidence"
git archive HEAD | tar -x -C "$CELLULE_REFERENCE_STATE/source"
git rev-parse HEAD > "$CELLULE_REFERENCE_STATE/evidence/source-revision.txt"
uname -a > "$CELLULE_REFERENCE_STATE/evidence/host.txt"
docker info --format '{{json .}}' > "$CELLULE_REFERENCE_STATE/evidence/docker-info.json"
- name: Build release test binary
run: |
set -euo pipefail
python3 -B -m unittest discover \
-s crates/cellule-app/qualification -p 'test_*.py'
docker compose -p "$CELLULE_REFERENCE_PROJECT" \
-f "$CELLULE_REFERENCE_STATE/source/crates/cellule-app/qualification/compose.yaml" \
run --name cell-reference-build build \
2>&1 | tee "$CELLULE_REFERENCE_STATE/evidence/build.log"
- name: Exercise three constrained nodes and real object storage
run: |
set -euo pipefail
compose() {
docker compose -p "$CELLULE_REFERENCE_PROJECT" \
-f "$CELLULE_REFERENCE_STATE/source/crates/cellule-app/qualification/compose.yaml" "$@"
}
compose up -d node-0 node-1 node-2
compose run --name cell-reference-driver driver
for node in node-0 node-1 node-2; do
container=$(compose ps -aq "$node")
test -n "$container"
test "$(docker wait "$container")" = 0
done
# These correctness gates host their runtimes in one container;
# independent-process scaling remains the following qualification.
compose run --no-deps --name cell-reference-rollout \
-e CELLULE_PERF_PROCESS_ROOT=reference-compose-additive-rollout \
driver rollout
compose run --no-deps --name cell-reference-entities \
-e CELLULE_TEST_PREFIX=reference-compose-entities \
driver entities
compose stop
- name: Scale readers across 3, 5, 10 and 20 constrained nodes
run: |
python3 "$CELLULE_REFERENCE_STATE/source/crates/cellule-app/qualification/scale.py" \
--state "$CELLULE_REFERENCE_STATE" --project "$CELLULE_REFERENCE_PROJECT-scale"
- name: Measure writable entity traffic across 3, 5, 10 and 20 constrained nodes
run: |
python3 "$CELLULE_REFERENCE_STATE/source/crates/cellule-app/qualification/scale.py" \
--state "$CELLULE_REFERENCE_STATE" --project "$CELLULE_REFERENCE_PROJECT-entities" \
--workload entities
- name: Retain reports and container resource proof
if: always()
run: |
set -euo pipefail
compose() {
docker compose -p "$CELLULE_REFERENCE_PROJECT" \
-f "$CELLULE_REFERENCE_STATE/source/crates/cellule-app/qualification/compose.yaml" "$@"
}
compose logs --no-color > "$CELLULE_REFERENCE_STATE/evidence/compose.log"
containers=$(compose ps -aq)
if [ -n "$containers" ]; then
mapfile -t container_ids <<< "$containers"
docker inspect "${container_ids[@]}" > "$CELLULE_REFERENCE_STATE/evidence/containers.json"
fi
docker image ls -a --digests --no-trunc > "$CELLULE_REFERENCE_STATE/evidence/images.txt"
compose stop
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: cell-reference-compose-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/cell-reference/evidence/
if-no-files-found: error
retention-days: 7
routing_measurements:
runs-on: ubuntu-24.04
timeout-minutes: 90
strategy:
# Each mode retains all four pairs. Both jobs must pass the routing gate.
fail-fast: false
matrix:
mode: [leased, object_only]
services:
rustfs:
image: ghcr.io/rustfs/rustfs:1.0.0-glibc@sha256:bffcab0c9d647aab0055d1c69d340b202d0909966b385932d4ead1aeb7602858
env:
RUSTFS_ACCESS_KEY: cellule-ci
RUSTFS_SECRET_KEY: cellule-integration-fixture
RUSTFS_CONSOLE_ENABLE: "false"
RUSTFS_OBS_LOG_DIRECTORY: /data/logs
ports:
- 9000:9000
options: >-
--health-cmd "curl --fail --silent http://127.0.0.1:9000/health/ready"
--health-interval 3s --health-timeout 3s --health-retries 30
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0
persist-credentials: false
- uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # master
with:
toolchain: stable
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Prepare isolated provider
env:
AWS_ACCESS_KEY_ID: cellule-ci
AWS_SECRET_ACCESS_KEY: cellule-integration-fixture
AWS_DEFAULT_REGION: us-east-1
run: |
sudo apt-get update && sudo apt-get install -y protobuf-compiler
aws --endpoint-url http://127.0.0.1:9000 s3api create-bucket --bucket cellule-routing
- name: Compare frozen routing binaries
env:
ROUTING_BASELINE: ${{ inputs.routing_baseline || github.event.pull_request.base.sha || 'origin/main' }}
AWS_ACCESS_KEY_ID: cellule-ci
AWS_SECRET_ACCESS_KEY: cellule-integration-fixture
AWS_REGION: us-east-1
CELLULE_TEST_ENDPOINT: http://127.0.0.1:9000
CELLULE_TEST_BUCKET: cellule-routing
run: |
python3 -B -m unittest discover -s crates/cellule-peer-http/qualification -p 'test_*.py'
python3 crates/cellule-peer-http/qualification/routing.py \
--baseline "$ROUTING_BASELINE" --state "$RUNNER_TEMP/cell-routing" \
--mode "${{ matrix.mode }}"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: cell-routing-${{ matrix.mode }}-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/cell-routing/evidence/
if-no-files-found: error
retention-days: 7
routing:
if: ${{ always() }}
needs: routing_measurements
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require all original routing modes
env:
MEASUREMENTS_RESULT: ${{ needs.routing_measurements.result }}
run: test "$MEASUREMENTS_RESULT" = success