-
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 2.13 KB
/
cluster.yml
File metadata and controls
69 lines (57 loc) · 2.13 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
---
name: cluster
# Cross-process cluster smoke. Boots the 5-node docker-compose
# stack defined at docker-compose.cluster.yml, waits for every
# node's /healthz to flip to 200, then runs the assertion script
# under scripts/tests/. Catches the class of bugs that unit
# tests miss because they only exercise in-process behavior:
# * config not flowing from HyperCache wrapper to DistMemory
# * seed lists with empty node IDs producing broken rings
# * wire-encoding asymmetries between writer and replica
#
# Container logs are dumped on failure so a CI failure is
# debuggable without re-running locally.
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
smoke:
name: 5-node smoke
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Build cluster image
run: |
docker compose -f docker-compose.cluster.yml build
- name: Bring cluster up
run: |
docker compose -f docker-compose.cluster.yml up -d
- name: Wait for cluster /healthz
run: bash scripts/tests/wait-for-cluster.sh
- name: Run cross-node smoke
run: bash scripts/tests/10-test-cluster-api.sh
- name: Run resilience test (kill + restart a node)
# The smoke phase above already validated propagation;
# this phase validates that the cluster keeps serving
# writes when a node is down and that the resurrected
# node converges back. Catches regressions in the
# hint-replay / anti-entropy paths under the actual
# docker network — a class of bugs in-process tests
# cannot reach.
run: bash scripts/tests/20-test-cluster-resilience.sh
- name: Dump container logs (on failure)
if: failure()
run: |
for c in hypercache-1 hypercache-2 hypercache-3 hypercache-4 hypercache-5; do
echo "::group::$c"
docker logs --tail 200 "$c" || true
echo "::endgroup::"
done
- name: Tear down
if: always()
run: |
docker compose -f docker-compose.cluster.yml down -v --remove-orphans