forked from mtusi2026/mtusi2026lab6
lab6
This commit is contained in:
@@ -53,7 +53,8 @@ jobs:
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: cp .env.example .env
|
||||
- run: cp .env.example .env && sed -i 's/^TELEMETRY_ENABLED=.*/TELEMETRY_ENABLED=0/' .env
|
||||
- run: ./scripts/init-secrets.sh
|
||||
- run: docker compose --env-file .env config --quiet
|
||||
- run: docker compose --env-file .env up -d --build
|
||||
- name: Wait for readiness through the load balancer
|
||||
@@ -78,12 +79,47 @@ jobs:
|
||||
run: python3 scripts/lab5_track2.py --reps 1
|
||||
- name: Parallel idempotency through the LB
|
||||
run: python3 student-tests/idempotency_parallel.py --base-url http://localhost:8080
|
||||
- name: LB removes a not-ready replica
|
||||
run: make test-lb-readiness
|
||||
- name: Upload, stop the serving replica, download through another
|
||||
run: python3 student-tests/attachment_failover.py --base-url http://localhost:8080
|
||||
- name: Stop one API replica and keep writing
|
||||
run: make test-failover ACTION_SCRIPT=scripts/stop-one.sh
|
||||
- name: Logs on failure
|
||||
if: failure()
|
||||
run: docker compose --env-file .env logs --tail 100
|
||||
run: docker compose --env-file .env logs --tail 100 api worker relay
|
||||
- if: always()
|
||||
run: docker compose --env-file .env down -v
|
||||
|
||||
observability:
|
||||
name: Lab6 observability stand
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: cp .env.example .env
|
||||
- run: ./scripts/init-secrets.sh
|
||||
- run: docker compose --env-file .env --profile telemetry config --quiet
|
||||
- run: docker compose --env-file .env --profile telemetry up -d --build
|
||||
- name: Validate Prometheus configuration and rules
|
||||
run: |
|
||||
docker compose --env-file .env --profile telemetry exec -T prometheus promtool check config /etc/prometheus/prometheus.yml
|
||||
docker compose --env-file .env --profile telemetry exec -T prometheus sh -c 'promtool check rules /etc/prometheus/rules/*.yml'
|
||||
- name: Wait for readiness through the LB
|
||||
run: |
|
||||
for attempt in $(seq 1 60); do
|
||||
if curl -fsS -o /dev/null http://localhost:8080/health/ready; then exit 0; fi
|
||||
sleep 2
|
||||
done
|
||||
docker compose --env-file .env ps
|
||||
exit 1
|
||||
- name: Public smoke with telemetry enabled
|
||||
run: make test
|
||||
- name: Observability and privacy checks
|
||||
run: make test-observability
|
||||
- name: Logs on failure
|
||||
if: failure()
|
||||
run: docker compose --env-file .env --profile telemetry logs --tail 120 api worker relay otel-collector prometheus loki tempo grafana
|
||||
- if: always()
|
||||
run: docker compose --env-file .env --profile telemetry down -v
|
||||
|
||||
Reference in New Issue
Block a user