forked from mtusi2026/mtusi2026lab6
docs(lab6): record verified observability study and submission
This commit is contained in:
@@ -1,27 +1,32 @@
|
||||
# Отчёт — лабораторная 6
|
||||
|
||||
- Автор, группа: [ФИО], [группа]
|
||||
- Автор, группа: Кушнаренко Николай Вячеславович, БПИ2302
|
||||
- Целевая оценка; выбранный трек 5, если нужен: **5**, трек 1 «Цена наблюдаемости»
|
||||
- Commit/PR: локальный коммит ветки `solution/lab6`; PR — после публикации
|
||||
- Использованные источники, библиотеки и помощь ИИ: Python 3.12, OpenTelemetry Python SDK 1.45.0 (traces/metrics/logs, OTLP/HTTP), uvicorn, asyncpg, aiobotocore, aio-pika, Pillow; OpenTelemetry Collector contrib 0.161.0, Prometheus 3.15.0, Loki 3.7.8, Tempo 2.9.0, Grafana 13.2.3; RabbitMQ 4.1.8, SeaweedFS 4.48, PostgreSQL 17, Valkey 8, HAProxy 3.0. Код lab5 перенесён, бизнес-API не менялся. Использование ИИ: [заполняется автором]
|
||||
- Commit/PR: ветка `solution/bpi2302-kushnarenko` в [своём форке](https://gitea.privcloud.tech/kolya/mtusi2026lab6/src/branch/solution/bpi2302-kushnarenko); текущие проверки от 12.11.2026
|
||||
- Использованные источники, библиотеки и помощь ИИ: Python 3.12, OpenTelemetry Python SDK 1.45.0 (traces/metrics/logs, OTLP/HTTP), uvicorn, asyncpg, aiobotocore, aio-pika, Pillow; OpenTelemetry Collector contrib 0.161.0, Prometheus 3.15.0, Loki 3.7.8, Tempo 2.9.0, Grafana 13.2.3; RabbitMQ 4.1.8, SeaweedFS 4.48, PostgreSQL 17, Valkey 8, HAProxy 3.0. Код lab5 перенесён, бизнес-API не менялся. ИИ-ассистенты Claude/Codex использовались для помощи с кодом, тестами и оформлением; результаты ниже получены реальными запусками
|
||||
|
||||
## Запуск из чистого clone
|
||||
|
||||
Prerequisites: Docker Compose v2 (≈ 4 ГБ свободной RAM для всего стенда), bash (Git Bash на Windows), Python ≥ 3.9; на Windows `PYTHONUTF8=1`.
|
||||
Prerequisites: Docker Compose v2+ (выделить Docker не менее 7 ГиБ RAM; сумма лимитов контейнеров ≈6.1 ГиБ), bash (Git Bash на Windows), Python ≥ 3.9 для публичных тестов, Python ≥ 3.11 для исследований; на Windows `PYTHONUTF8=1`.
|
||||
Версии всех образов закреплены тегом и digest в `compose.yaml`; зависимости — `requirements.txt` (включая `opentelemetry-*==1.45.0`).
|
||||
|
||||
```sh
|
||||
sh scripts/init-secrets.sh # secrets/*: БД, S3, RabbitMQ, пароль Grafana (secrets/grafana_admin_password)
|
||||
cp .env.example .env
|
||||
docker compose --env-file .env config --quiet
|
||||
docker compose --env-file .env up -d --build
|
||||
docker compose --env-file .env up -d --build --wait --wait-timeout 180
|
||||
curl http://127.0.0.1:8080/health/ready # API
|
||||
# Grafana: http://127.0.0.1:3000 пользователь admin, пароль — secrets/grafana_admin_password
|
||||
python3 -m pip install -r research/requirements.txt -r requirements-dev.txt
|
||||
python3 scripts/check_contract.py # make check
|
||||
python3 scripts/validate_openapi.py # make validate
|
||||
python3 tests/smoke.py --base-url http://127.0.0.1:8080 # make test (телеметрия включена)
|
||||
python3 -m unittest discover -s student-tests -p test_observability.py -v # метрики, логи, трассы, связь API -> worker, отсутствие секретов
|
||||
python3 student-tests/test_observability_retry.py # все попытки задания в одной трассе
|
||||
python3 research/incidents.py --out evidence # 4 инцидента, алерты firing -> resolved (~10 мин)
|
||||
python3 research/obs_cost.py --out evidence # трек 1 (~15 мин)
|
||||
mkdir -p evidence/my-run
|
||||
python3 research/incidents.py --out evidence/my-run
|
||||
python3 research/obs_cost.py --out evidence/my-run --profiles off on100 head10 tail --repeat 2
|
||||
python3 research/plot_obs_cost.py --out evidence/my-run
|
||||
```
|
||||
|
||||
Windows: `scripts/restart.cmd`, `scripts/stop-one.cmd`. Остановка с сохранением данных — `docker compose --env-file .env stop`; **намеренное удаление учебных данных** — `docker compose --env-file .env down -v` (volumes `pgdata`, `valkeydata`, `seaweeddata`, `rabbitmqdata`, `promdata`, `lokidata`, `tempodata`, `grafanadata`).
|
||||
@@ -88,67 +93,109 @@ Dashboard `Messenger: API, очередь, worker` (`infra/grafana/dashboards/me
|
||||
Alerts вычисляет Prometheus; состояние (pending/firing/resolved) видно в Prometheus и на панели «Алерты» dashboard. Внешняя доставка не требуется и не настроена.
|
||||
|
||||
### Collector: ограничение ресурсов и поведение при backpressure
|
||||
`memory_limiter` (limit 280 MiB при лимите контейнера 384 MiB, spike 60 MiB; при приближении данные отклоняются, SDK отбрасывает пакет, приложение продолжает работать), `batch` (1024/2 с), экспортёры с **ограниченной очередью** (`sending_queue` 500) и повторами до 30 с, затем отбрасывание; SDK: очередь спанов/логов 2048, таймаут экспорта 3 с, **ошибки экспорта не влияют на ответы API** (проверено). `metric_expiration: 20s` — остановившийся источник метрик быстро исчезает (алерт `WorkerSilent`).
|
||||
`memory_limiter` (limit 280 MiB при лимите контейнера 384 MiB, spike 60 MiB; при приближении данные отклоняются, SDK отбрасывает пакет, приложение продолжает работать), `batch` (1024/2 с), экспортёры с **ограниченной очередью** (`sending_queue` 500) и повторами до 30 с, затем отбрасывание; SDK: очередь спанов/логов 2048, таймаут экспорта 3 с, **отказ Tempo/Loki не нарушил работу API** в воспроизведённом сценарии ниже. `metric_expiration: 20s` настроен в exporter. В текущем опыте остановки worker серия capacity оставалась видимой, поэтому диагноз основан на росте возраста очереди и нулевой скорости ready, а не на `WorkerSilent`.
|
||||
|
||||
## Доказательства критериев
|
||||
## Перенос предыдущей работы и воспроизводимость
|
||||
|
||||
| Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства |
|
||||
| --- | --- | --- | --- |
|
||||
| Весь минимум lab5 работает с включённой телеметрией | `tests/smoke.py`; `student-tests/test_pipeline.py` | PASS; 9 тестов OK | `evidence/checks.txt` |
|
||||
| Collector, 3 хранилища и Grafana в стенде, конфиги в Git, volumes | `docker compose up -d`; `infra/**` | стенд поднимается одной командой; datasources и dashboard импортируются provisioning-ом | `evidence/grafana_provisioning.txt` |
|
||||
| Метрики RPS/errors/duration API; jobs ok/failed и duration worker | `test_observability.py::test_metrics_for_http_jobs_queue_pool_worker` | все 12 серий имеют данные | `evidence/checks.txt` |
|
||||
| Структурные логи и реальные трассы API и worker, связь запрос ↔ лог, job ↔ лог | `test_one_trace_spans_…`, `test_logs_are_structured_and_linked_by_trace_id` | одна трасса содержит спаны `messenger-api` и `messenger-worker`; в Loki по `trace_id` находятся логи обоих сервисов, `span_id` у каждой записи | `evidence/checks.txt` |
|
||||
| Низкая кардинальность, нет секретов | `test_no_high_cardinality…`, `test_secrets_and_message_bodies_are_not_exported` | OK | `evidence/checks.txt` |
|
||||
| W3C trace context API → broker → worker (parent-child), цепочка до S3/DB, включая retry | `test_one_trace…`; `test_observability_retry.py` | server → producer → consumer; `s3.put/get_object`, `db.connection` в той же трассе; 3 попытки задания — 3 consumer-спана одной трассы, 2 лога `job_rescheduled` | `evidence/checks.txt` |
|
||||
| Dashboard: p50/p95/p99, error ratio, queue depth/age, DB pool, saturation worker | `infra/grafana/dashboards/messenger.json` | импортируется автоматически (`/api/search` возвращает dashboard) | `evidence/grafana_provisioning.txt` |
|
||||
| SLI/SLO, alert rules, firing → resolved на искусственных отказах | `research/incidents.py` | см. «Инциденты» | `evidence/incidents.json`, `incidents.png` |
|
||||
| Collector с memory limiter/batch; остановка хранилища телеметрии не ломает API | инцидент 4 | API без ошибок (ratio 0.0, RPS ≈ 67), очередь Collector ограничена (≈23–28), RSS Collector ≈ 247 MiB < лимита 384 MiB | `evidence/incidents.json` |
|
||||
| Два+ инцидента с диагностикой | см. ниже | 4 инцидента | отчёт и `evidence/incidents.json` |
|
||||
| **Трек 1** | `research/obs_cost.py` | см. ниже | `evidence/obs_cost.json` |
|
||||
Перенесён собственный мессенджер из ЛР5: PostgreSQL — пользователи, чаты, сообщения, сессии, идемпотентность, metadata/outbox; Valkey — вспомогательный кэш; приватный SeaweedFS S3 — оригиналы и варианты; RabbitMQ — durable очередь; worker — асинхронная обработка изображений; HAProxy и две API-реплики. Загрузка по-прежнему возвращает 202, текстовое сообщение без вложений допустимо. Бизнес-контракт ЛР6 не меняется.
|
||||
|
||||
## Инциденты (диагностика только по сохранённым наблюдениям)
|
||||
| Компонент | CPU / RAM | Постоянные данные / готовность |
|
||||
| --- | --- | --- |
|
||||
| API ×2 | каждому 1 CPU / 256 MiB | stateless; HTTP `/health/ready` |
|
||||
| worker | 1 CPU / 768 MiB | состояние в БД/S3/broker; heartbeat |
|
||||
| PostgreSQL 17.11 | 1 CPU / 512 MiB | `pgdata`; `pg_isready`, миграции отдельным одноразовым сервисом |
|
||||
| Valkey 8.1.10 | 0.5 CPU / 128 MiB | `valkeydata`; ping |
|
||||
| SeaweedFS 4.48 | 1 CPU / 768 MiB | `seaweeddata`; bootstrap создаёт приватный bucket и проверяет ограниченные права API |
|
||||
| RabbitMQ 4.1 (digest) | 1 CPU / 512 MiB | `rabbitmqdata`; diagnostics ping |
|
||||
| HAProxy 3.0 (digest) | 1 CPU / 128 MiB | HTTP health; опубликован только `127.0.0.1:8080` |
|
||||
| Collector / Prometheus / Loki / Tempo / Grafana | каждому 1 CPU; 384 / 512 / 512 / 1024 / 512 MiB | volumes и назначение выше; реальную доступность сигналов проверяют собственные тесты |
|
||||
|
||||
Фоновая нагрузка: ≈32 запроса/с сообщений и ≈25 загрузок/с (мелкие PNG). `research/incidents.py` — оркестрация и запись состояний алертов.
|
||||
Секреты и `.env` создаются локально, в Git не входят. `init-secrets.sh` идемпотентен; `.gitattributes` сохраняет LF у shell-скриптов при Windows clone. Внешние зависимости не нужно поднимать отдельно. Workflow `.github/workflows/application.yml` собирает приложение и запускает публичный сценарий; его наличие не означает успешного запуска CI на сервере Gitea.
|
||||
|
||||
| № | Воздействие | Алерт (время обнаружения от воздействия) | Разрешён после восстановления | Как найдена причина |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 1 | остановка worker | `QueueLagGrowing` через 64 с (порог 30 с + `for 20 s` + шаг rate); также `WorkerSilent`; каскад: переполнение очереди → backpressure 503 на загрузке → `HighHttpErrorRate`/`HighUploadErrorRate` | через 24 с (очередь рассосалась) | возраст старейшей задачи растёт (56.7 с) при **нулевой** скорости `messenger_jobs_processed_total`, серия `messenger_worker_capacity` исчезла → остановлен worker, а не медленная БД; логи API показывают 503 «Очередь обработки заполнена» |
|
||||
| 2 | медленная БД (триггер `pg_sleep(0.8)` на вставку сообщений) | `HighLatencyP95` через 72 с (p95 = 0.80 с) | через 46 с | p95 растёт, а в TraceQL `{ name = "db.connection" && duration > 300ms }` и `{ name =~ "HTTP POST.*messages" && duration > 300ms }` найдено по 20 трасс: почти всё время запроса в спанах БД, CPU процессов не растёт → медленная БД, а не обработчик |
|
||||
| 3 | остановка S3 | `HighUploadErrorRate` через 88 с (доля 5xx на загрузке 32 %; **общая** доля 0.8 % — общий SLI не заметил бы) | через 78 с | `{ status = error }` — спаны `s3.put_object` с ошибкой, 139 логов `s3_put_failed` с `trace_id`; остальные маршруты без ошибок → недоступен S3 |
|
||||
| 4 | остановка Tempo и Loki | `TelemetryExportFailing` через 49 с | через 85 с | бизнес-метрики API без ошибок (ratio 0.0, RPS ≈ 67), растёт `otelcol_exporter_send_failed_spans` (≈66/с), очередь экспорта ограничена (23), RSS Collector 247 MiB → сбой хранилищ телеметрии, не приложения; метрики Prometheus не потеряны (путь Collector → Prometheus независим), трассы/логи за простой потеряны |
|
||||
Выделенные исправления базы ЛР5: HAProxy не повторяет потенциально выполненный upload и сохраняет JSON-ответ приложения при отказе БД; reconciler защищает варианты, staging и незавершённые операции от удаления. Добавлены уже использованные в ЛР5 проверки TTL, зависимостей и reconciler; исправлено имя S3-сервиса в сценарии отказа. Версии и архитектура телеметрии сохранены.
|
||||
|
||||
График: `evidence/incidents.png` (возраст очереди, p95, доля 5xx, состояние алертов; серые линии — воздействие, зелёные — восстановление). Время обнаружения включает окно `rate[1m]` — для более быстрой реакции нужны более короткие окна/burn-rate (трек 2, не выбран).
|
||||
## Доказательства критериев (12.11.2026)
|
||||
|
||||
## Эксперименты (трек 1): цена наблюдаемости
|
||||
| Проверка | Наблюдаемый результат | Доказательство |
|
||||
| --- | --- | --- |
|
||||
| Контракт, полная OpenAPI-валидация и public smoke при включённой телеметрии | PASS | [вывод](evidence/checks_2026-11-12.txt) |
|
||||
| Собственные проверки | **66 уникальных тестов OK**: 12 API, 9 idempotency, 11 attachments, 6 topology, 9 pipeline, 5 observability, 1 retry trace, 2 reconcile, 7 resilience, 2 expiry, 2 dependencies | [команды](student-tests/README.md), [вывод](evidence/checks_2026-11-12.txt) |
|
||||
| Реальные metrics/logs/traces, trace/span IDs, отсутствие секретов и высококардинальных labels | 5 observability-тестов OK; после исследования повторены | [вывод](evidence/recheck_2026-11-12/commands.txt) |
|
||||
| Upload → producer → consumer → S3/DB; повторные попытки | 3 consumer-спана и 2 reschedule в одной трассе, parent-child проверен | [вывод](evidence/checks_2026-11-12.txt) |
|
||||
| Перезапуск всего стенда | 13 контейнеров перезапущены, volumes сохранены, сессии и подтверждённые данные доступны | [lifecycle](evidence/recheck_2026-11-12/lifecycle.json), [повторная проверка](evidence/recheck_2026-11-12/recovery_checks.txt) |
|
||||
| Отказ API-реплик по очереди | обе разные реплики остановлены; 120 и 119 успешных записей, 0 неуспешных попыток | [failover](evidence/recheck_2026-11-12/failover.json), [вывод](evidence/recheck_2026-11-12/recovery_checks.txt) |
|
||||
| S3 bootstrap ×2 | повторный запуск успешен, anonymous 403, создание чужого bucket запрещено | [вывод](evidence/recheck_2026-11-12/recovery_checks.txt) |
|
||||
| Grafana provisioning | 3 источника, dashboard `messenger-overview`, 22 панели, `provisioned=true` | [ответ API](evidence/recheck_2026-11-12/grafana_provisioning.json) |
|
||||
| Чистый clone `6d87f54` | новые секреты и пустые volumes, build/up, public smoke и provisioning успешны; отдельный проект, порты 18080/13000 | [вывод](evidence/recheck_2026-11-12/clean_clone.txt), [override портов](evidence/recheck_2026-11-12/clean-ports.yaml) |
|
||||
| Инциденты, alerts firing → resolved | все 4 воспроизведены | [JSON](evidence/recheck_2026-11-12/incidents.json), разбор ниже |
|
||||
| Трек 1 | 4 профиля × 2 повтора | [исходные замеры](evidence/recheck_2026-11-12/obs_cost.json), [ресурсы](evidence/recheck_2026-11-12/research_runtime.json) |
|
||||
|
||||
**Гипотеза.** Телеметрия имеет измеримую цену в CPU API (SDK: спаны, метрики, логи), которая слабо зависит от head-sampling (логи и метрики остаются), но head-sampling теряет редкие ошибки и медленные запросы пропорционально доле выборки; tail-sampling в Collector сохраняет их почти полностью, перенося цену из хранилища в Collector.
|
||||
На Windows установлен Borland make, поэтому выполнены точные Python-команды целей `make check`, `make validate`, `make test` из Makefile, а не GNU make. Публичные `tests/`, `contracts/`, README, COURSE и CONTRIBUTING совпадают с исходным skeleton `470d9d6`.
|
||||
|
||||
**Методика** (`research/obs_cost.py`, график `evidence/obs_cost.png`). Одинаковая нагрузка во всех профилях: 8 процессов-клиентов, 64 одновременных, 90 % `POST` сообщений + 10 % `GET`, прогрев 5 с, замер 30 с, **2 повтора**; перед профилем пересоздаются Collector, API и worker. В API внедрены отказы (одинаково для всех профилей): 2 % запросов → 500 и 2 % → задержка 0.6 с (`API_FAULT_INJECTION=http500:0.02,slow:0.02:0.6`) — это «редкие ошибки и медленные запросы»; после каждого прогона 25 с на дозапись, затем TraceQL в Tempo считает сохранённые ошибочные (`status = error`) и медленные (`duration > 500ms`) трассы. Число внедрённых отказов считается на стороне клиента. Объём телеметрии — счётчики Collector (`otelcol_receiver_accepted_*`, `otelcol_exporter_sent_spans`). Docker Desktop (WSL2), 2 реплики API по 1 CPU, Collector 384 MiB.
|
||||
Первый persistence-запуск завершился таймаутом recovery hook после успешных 66 тестов. Полный обход S3 не успевал за 45 с на накопленных ~58 тыс. вложений даже при исправном backend. Hook теперь читает первый байт до 16 последних готовых оригиналов; это ограниченная проверка готовности, а не аудит всех исторических объектов. После исправления публичная проверка сохранности и оба failover пройдены. Исходный неуспешный вывод сохранён, повторный — отдельно в `recovery_checks.txt`.
|
||||
|
||||
| Профиль | RPS | p95, мс | CPU API (на реплику) | CPU % / пик RAM MiB Collector | спаны: SDK → Tempo | логи (записей) | сохранено ошибочных трасс | сохранено медленных трасс |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| off (`OTEL_ENABLED=0`) | 1340 | 74 | 53 % | 0.1 / 39 | — | — | — | — |
|
||||
| on: head 100 % | 1324 | 72 | 87 % | 3.1 / 70 | 96 тыс. → 96 тыс. | 47 тыс. | ≈100 % | ≈100 % |
|
||||
| on: 100 %, очередь SDK 65 536 / пакет 2048 | 1384 | 75 | 84 % | 2.9 / 72 | 96 тыс. → 96 тыс. | 47 тыс. | ≈100 % | ≈100 % |
|
||||
| on: head 10 % | 1400 | 67 | 77 % | 1.7 / 71 | 9 тыс. → 10 тыс. | 49 тыс. | 13 % | 9 % |
|
||||
| on: SDK 100 % + tail-sampling в Collector | 1399 | 67 | 85 % | 4.0 / 110 | 101 тыс. → 14 тыс. | 49 тыс. | ≈100 % | ≈100 % |
|
||||
## Контролируемые инциденты
|
||||
|
||||
(RPS и p95 — среднее двух прогонов; различия RPS/p95 между профилями ≤ ±5 % — в пределах разброса между повторами; p99 ≈ 0.62 с во всех профилях определяется внедрённой задержкой 0.6 с. Объём — за окно 30 с нагрузки + дозапись. «Сохранено» считается как число трасс с ошибкой/медленных в Tempo к числу внедрённых: значение ≈100 % означает, что потерь не обнаружено; точное отношение немного >100 % из-за 5 с прогрева, попавших в окно поиска.)
|
||||
Нагрузка: 4 цикла отправки сообщений с паузой 0.1 с и 10 циклов загрузки PNG с паузой 0.3 с. Реальная интенсивность зависит от задержки/отказа. `research/incidents.py` записывает метрики каждые ~3 с и локальные состояния Prometheus. Времена включают окно rate[1m] и `for` правила.
|
||||
|
||||
**Результаты и выводы.**
|
||||
1. **Цена в CPU.** Включение телеметрии поднимает CPU API с **53 % до 87 %** одного ядра при той же пропускной способности (+34 п. п., ≈ +60 % CPU на запрос); пропускная способность и p95 на этом профиле не изменились в пределах погрешности, потому что запас CPU у реплик (лимит 100 %) не исчерпан — на насыщенной системе цена перешла бы в потерю RPS. RSS API +≈12 MiB; Collector — 3–4 % CPU и 71 MiB RAM (110 MiB при tail-sampling: буфер трасс).
|
||||
2. **Объём.** 100 %: ≈96 тыс. спанов и ≈48 тыс. записей логов за окно. **Head 10 %** сокращает спаны на 90 % (9.9 тыс.), но **логи (≈49 тыс.) и метрики не меняются**, поэтому CPU API снижается лишь до 77 % (−10 п. п.): большая часть цены — логи и метрики, а не трассы. **Tail-sampling**: SDK по-прежнему шлёт 100 % спанов (CPU API 85 %), но в Tempo уходит ≈15 тыс. из 101 тыс. (−85 % хранения).
|
||||
3. **Потери редких событий.** Head 10 % сохраняет лишь **≈13 % ошибочных и ≈9 % медленных** трасс (ровно доля выборки): 87–91 % редких ошибок и медленных запросов невидимы в Tempo (метрики и логи при этом их фиксируют). 100 % и tail-sampling сохраняют ≈100 % ошибочных и медленных трасс; tail выигрывает по хранилищу при почти той же цене в API.
|
||||
4. **Увеличение очереди SDK** (65 536 / пакет 2048) не изменило ни объём, ни долю сохранённых трасс: потерь спанов на стороне SDK в этой нагрузке не было.
|
||||
5. **Находка по дороге.** В первом прогоне «100 %» сохранялось только ≈57 % ошибочных трасс: Tempo с настройками по умолчанию **отбрасывал ≈29 % спанов** (`tempo_discarded_spans_total{reason="live_traces_exceeded"}`: 224 тыс. из 767 тыс.) из-за лимита «живых» трасс (10 000 на тенанта). Лимиты подняты в `infra/tempo/tempo.yaml` (`overrides.defaults.ingestion`), повторные прогоны — без потерь; цена — память Tempo: при лимите контейнера 512 MiB он был убит OOM (код 137) на тестах после нагрузки, поэтому `mem_limit` Tempo увеличен до 1 GiB. Вывод: потери надо искать метриками самих хранилищ, а не только Collector.
|
||||
| Воздействие | Алерт | До firing, с | От команды восстановления до resolved, с |
|
||||
| --- | --- | ---: | ---: |
|
||||
| Остановлен worker | `QueueLagGrowing` | 68.3 | 21.8 |
|
||||
| DB: pg_sleep(0.8) | `HighLatencyP95` | 67.7 | 43.5 |
|
||||
| Остановлен S3 | `HighUploadErrorRate` | 84.1 | 39.3 |
|
||||
| Остановлены Tempo и Loki | `TelemetryExportFailing` | 69.1 | 67.5 |
|
||||
|
||||
**Сбалансированная конфигурация (проверена):** SDK 100 % + **tail-sampling** в Collector (все ошибки, все запросы >500 мс, 10 % остальных): редкие проблемные трассы сохраняются полностью, хранилище трасс экономится на 85 %, цена — CPU SDK как при 100 % и ≈ +40 MiB RAM Collector. Если CPU API критичен — снижать объём логов (access-log без health уже отключён) и использовать head-sampling только для трасс успешных запросов.
|
||||
Диагностика по сохранённым наблюдениям (строки `diagnosis` в JSON — шаблоны скрипта; ниже учтены фактические поля, в том числе присутствующая capacity и нулевое ожидание DB pool):
|
||||
|
||||
**Ограничения методики.** Единичный ноутбук; 2 прогона на профиль; запас CPU API не исчерпан (RPS не падает) — цена показана в CPU, а не в RPS; доля сохранённых трасс оценивается TraceQL-поиском с лимитом 5 000 результатов (для «всех HTTP-трасс» лимит достигнут, для ошибочных/медленных — нет); размер дисковых томов Tempo/Loki не используется как метрика: он меняется компакцией и flush-ом и недостоверен на таких интервалах.
|
||||
1. **Worker.** Возраст старейшего задания 60.7 с, скорость завершения ready 0.0/с; серия capacity присутствует: `True`. Сочетание роста возраста и отсутствия обработки указывает на worker. После восстановления алерт снят.
|
||||
2. **Медленная БД.** p95 = 782.8 мс; ожидающих в DB pool: 0.0. Поиск обнаружил 20 трасс с `db.connection >300ms` и 20 медленных HTTP POST сообщений (лимит поиска 20). Задержка видна в спане БД; рост ожидания пула не требуется для этого диагноза.
|
||||
3. **S3.** 5xx на upload = 100.0 %, общая доля = 1.1 %. Найдены 20 ошибочных трасс и 37 строк `s3_put_failed`. Локализация по маршруту, операциям S3 и логам отделяет этот отказ от общего отказа API.
|
||||
4. **Tempo/Loki.** API: 62.6 RPS, 5xx = 0.0 %; очередь Collector = 32.0, send-failed spans ≈62.9/с, RSS = 239.0 MiB при лимите 384 MiB. Продолжающиеся бизнес-запросы и ошибки экспортёра показывают отказ пути телеметрии. Prometheus в этом сценарии доступен. Счётчик неуспешных экспортов включает повторы и не равен числу окончательно потерянных уникальных спанов; точное число потерянных логов/трасс этим опытом не установлено.
|
||||
|
||||
## Ограничения и следующие шаги
|
||||

|
||||
|
||||
- Выдерживается: недоступность Tempo/Loki/Collector без влияния на API (данные трасс/логов за простой теряются, метрики — нет). Не выдерживается: потеря volume хранилищ телеметрии; Prometheus/Loki/Tempo — по одному экземпляру.
|
||||
- Алерты локальные (без доставки наружу); окна коротки для демонстрации — для production нужны burn-rate по нескольким окнам.
|
||||
- Логи в stdout остаются в docker json-file (ротация 10 МБ × 3) и дублируются в Loki; `trace_id` присутствует в обоих.
|
||||
- Подтверждено экспериментами: связность трасс через очередь, алерты firing/resolved на 4 отказах, цена телеметрии. Гипотеза без доказательства: поведение при >2 репликах API и при нагрузке порядка тысяч RPS на одном Collector.
|
||||
## Трек 1: цена наблюдаемости
|
||||
|
||||
**Гипотеза:** инструментирование добавляет CPU/RAM; head 10 % уменьшает ingest, но теряет большинство редких проблемных трасс. Tail policy сохраняет ошибки и задержки >500 мс, отправляя в Tempo лишь 10 % остальных трасс.
|
||||
|
||||
**Методика:** 8 процессов-клиентов, 64 одновременных запроса; общие 40 синтетических пользователей и 40 чатов на всю серию, 90 % POST сообщений и 10 % GET. Каждый профиль: прогрев 5 с, замер 30 с, 25 с дозаписи, **2 повтора**; перед профилем пересозданы API/worker/Collector. Во всех профилях одинаковая инъекция: 2 % запросов → 500, 2 % → +0.6 с. RPS, ошибки и latency в таблице относятся к POST-сообщениям; успешные RPS исключают внедрённые ошибки. Для off отключены сигналы API/worker, но контейнеры хранилищ остаются запущены.
|
||||
|
||||
Машина: i9-12900KS (16 ядер / 24 потока), 95.8 ГиБ RAM, Windows/Docker Desktop (WSL2); Docker доступны 24 CPU и 46.9 ГиБ RAM. Клиент Python 3.11.9, приложение Python 3.12.12. Лимиты контейнеров одинаковы во всех профилях (таблица выше); другой Docker-проект оставался в фоне. Накопленные данные не очищались. Размеры БД после серии: {'users': 739, 'chats': 425, 'messages': 1610549, 'attachments': 68898}; отдельный счётчик сообщений до серии не снимался. [Размер набора](evidence/recheck_2026-11-12/dataset.json), [хэши исходников и среда](evidence/recheck_2026-11-12/source_metadata.json).
|
||||
|
||||
Среднее двух прогонов; RAM — максимальный пик из двух. CPU API — **на одну реплику**, 100 % соответствует одному ядру.
|
||||
|
||||
| Профиль | Успешные RPS (min–max) | Ошибки, % | p50 / p95 / p99, мс | CPU API, % | RAM API, MiB | CPU / RAM Collector |
|
||||
| --- | ---: | ---: | --- | ---: | ---: | --- |
|
||||
| Без телеметрии | 1368 (1348–1388) | 2.05 | 16.7 / 73.0 / 618.1 | 50.2 | 76.4 | 0.1 % / 45.1 MiB |
|
||||
| Head 100 % | 1245 (1239–1251) | 2.01 | 24.6 / 100.3 / 629.7 | 79.5 | 83.2 | 3.3 % / 75.0 MiB |
|
||||
| Head 10 % | 1220 (1137–1303) | 1.98 | 23.9 / 101.5 / 626.8 | 68.5 | 83.7 | 1.9 % / 68.9 MiB |
|
||||
| SDK 100 % + tail | 1291 (1282–1300) | 2.07 | 23.5 / 90.2 / 628.6 | 77.4 | 75.5 | 4.0 % / 108.4 MiB |
|
||||
|
||||
Объём — среднее за измерительное окно с дозаписью; logs и metric points считаются отдельно от spans.
|
||||
|
||||
| Профиль | Принято spans | Отправлено spans | Logs | Metric points | Найдено error / внедрено 500 | Найдено slow / медленных у клиента |
|
||||
| --- | ---: | ---: | ---: | ---: | --- | --- |
|
||||
| Без телеметрии | 0 | 0 | 0 | 0 | 0 / 873 | 0 / 856 |
|
||||
| Head 100 % | 89886 | 89886 | 44324 | 396 | 864 / 780 | 876 / 772 |
|
||||
| Head 10 % | 8898 | 8982 | 43176 | 396 | 85 / 750 | 86 / 736 |
|
||||
| SDK 100 % + tail | 91882 | 13138 | 45226 | 396 | 916 / 828 | 858 / 768 |
|
||||
|
||||
**Результат.** Средний CPU API: off 50.2 %, on100 79.5 %, head10 68.5 %, tail 77.4 %. Изменение on100 относительно off: 29.3 п. п. Head sampling сокращает число спанов, но логи и метрики остаются; поэтому снижение CPU не обязано быть пропорционально sampling rate. При tail SDK продолжает формировать 100 % спанов, а Collector отбирает их перед Tempo: отправлено на 85.7 % меньше, чем принято. Это экономия ingest спанов, не прямое измерение дискового объёма.
|
||||
|
||||
**Потери и выбор конфигурации.** Head 10 % сохраняет около 11.3 % ошибочных и 11.8 % медленных трасс по приближённому сопоставлению окон. Tail сохраняет значительно больше проблемных трасс при меньшем ingest, поэтому выбран как проверенная сбалансированная конфигурация: SDK 100 %, `collector-tail.yaml`, все ERROR, все >500 мс, 10 % остальных. Цена — CPU SDK и память Collector для ожидания решения. Для демонстрации/тестов по умолчанию восстановлен on100 без инъекции отказов.
|
||||
|
||||
Сумма `receiver_refused_spans` / `exporter_send_failed_spans` по двум повторам: off 0/0, on100 0/0, head10 0/0, tail 0/0. Tempo `discarded_spans_total` до/после серии: null / null. `null` означает отсутствие ряда, а не измеренный ноль. Эти счётчики описывают наблюдавшиеся отказы приёма/экспорта; сами по себе не доказывают отсутствие любых потерь на SDK.
|
||||
|
||||

|
||||
|
||||
На графике RPS усреднены по двум прогонам, CPU/ingest/отношения взяты из второго; отношения визуально ограничены 100 %. В таблицах выше приведены средние и исходные количества, подробные результаты каждого повтора — в JSON.
|
||||
|
||||
**Ограничения методики:** два коротких повтора на одном ПК с фоновыми задачами, без доверительных интервалов; различия RPS могут быть обычным разбросом. Данные накапливаются, профили идут в фиксированном порядке. Tempo-поиск включает 5 с прогрева, поэтому числитель иногда больше знаменателя: это приближённое сопоставление, не точная вероятность сохранения или доказательство 100 % сохранности. Поиск ограничен 5000 трассами (для всех HTTP лимит достижим); точное число потерянных уникальных спанов SDK не измерено. Размер volumes не используется для вывода: compaction и flush искажают короткие замеры.
|
||||
|
||||
## Ограничения решения
|
||||
|
||||
- Один Docker-host; БД, LB, broker, worker и каждое хранилище телеметрии — по одному экземпляру. Отказ host/volume не покрывается.
|
||||
- Проверена остановка Tempo/Loki; отдельная остановка Collector/Prometheus в текущем исследовании не выполнялась. Ограниченные очереди допускают потери телеметрии при длительном простое.
|
||||
- Recovery hook проверяет недавние готовые оригиналы; публичная persistence-проверка отдельно проверяет созданные ею данные. Это не проверка каждого исторического объекта S3.
|
||||
- SLO 99.5 % за 30 суток задан как цель; короткие эксперименты не доказывают выполнение месячного SLO. Алерты локальные, без внешней доставки.
|
||||
- Исторические `evidence/incidents.json`, `evidence/obs_cost.json` и графики от октября оставлены как архив; все выводы текущей сдачи опираются на `evidence/recheck_2026-11-12/`.
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
## Лабораторная 6
|
||||
|
||||
Автор / группа: Кушнаренко Николай Вячеславович, БПИ2302
|
||||
Целевая оценка (3/4/5): 5
|
||||
Трек 5, если заявлен: Трек 1 — цена наблюдаемости
|
||||
|
||||
Что реализовано и что перенесено:
|
||||
Собственный мессенджер из ЛР5: две API-реплики, HAProxy, PostgreSQL, Valkey, приватный S3, RabbitMQ и worker. Бизнес-API сохранён. Добавлены OpenTelemetry SDK/Collector, Prometheus, Loki, Tempo и Grafana; provisioning трёх источников и dashboard из 22 панелей, гистограммы, SLI/SLO и шесть alert rules. Контекст W3C проходит API → outbox → broker → worker → S3/DB, включая retry. Есть memory limiter, batch, ограниченные очереди, удаление чувствительных атрибутов. Исправления базы ЛР5 (HAProxy/reconciler), Windows LF и ограниченный S3 recovery hook выделены в REPORT.md.
|
||||
|
||||
Команды запуска из чистого clone:
|
||||
```sh
|
||||
sh scripts/init-secrets.sh
|
||||
cp .env.example .env
|
||||
docker compose --env-file .env config --quiet
|
||||
docker compose --env-file .env up -d --build --wait --wait-timeout 180
|
||||
python3 scripts/check_contract.py
|
||||
python3 tests/smoke.py --base-url http://127.0.0.1:8080
|
||||
```
|
||||
Полные команды своих тестов и исследований — [student-tests/README.md](https://gitea.privcloud.tech/kolya/mtusi2026lab6/src/branch/solution/bpi2302-kushnarenko/student-tests/README.md).
|
||||
|
||||
Результаты проверок и ссылка на REPORT.md:
|
||||
[REPORT.md](https://gitea.privcloud.tech/kolya/mtusi2026lab6/src/branch/solution/bpi2302-kushnarenko/REPORT.md), [Word](https://gitea.privcloud.tech/kolya/mtusi2026lab6/src/branch/solution/bpi2302-kushnarenko/docs/report_lab6.docx), [вывод 66 тестов](https://gitea.privcloud.tech/kolya/mtusi2026lab6/src/branch/solution/bpi2302-kushnarenko/evidence/checks_2026-11-12.txt), [текущие доказательства](https://gitea.privcloud.tech/kolya/mtusi2026lab6/src/branch/solution/bpi2302-kushnarenko/evidence/recheck_2026-11-12).
|
||||
- контракт, полная OpenAPI-валидация, публичный smoke — PASS; 66 собственных тестов — OK;
|
||||
- отдельный чистый clone: build/up на новых секретах и пустых volumes, public smoke и provisioning Grafana — PASS;
|
||||
- перезапуск 13 контейнеров сохранил volumes, сессии и данные; обе API-реплики проверены отдельными failover;
|
||||
- четыре инцидента (worker, медленная БД, S3, Tempo/Loki): alerts firing → resolved; отказ Tempo/Loki не нарушил бизнес-запросы;
|
||||
- трек 1: off/on100/head10/tail, одинаковая нагрузка, два повтора; latency, CPU/RAM, ingest и сохранение редких трасс измерены. Tail уменьшил отправку спанов относительно приёма на 85.7 %;
|
||||
- на Windows выполнены Python-эквиваленты целей make check/validate/test. Серверный CI Gitea не заявляется как пройденный.
|
||||
|
||||
Ограничения / известные ошибки:
|
||||
Один Docker-host и по одному экземпляру stateful-компонентов; возможны потери телеметрии при простое backend. Два коротких повтора, фоновые процессы и накопленная БД ограничивают точность сравнения. TraceQL-окно включает прогрев, поэтому отношения сохранённых трасс приближённые. Первый полный S3 recovery probe превысил таймаут на ~58 тыс. вложений; после ограничения до 16 последних оригиналов persistence/failover прошли, оба вывода сохранены.
|
||||
|
||||
Источники и использование ИИ:
|
||||
Собственный код ЛР5, Python/uvicorn, asyncpg, aiobotocore, aio-pika, Pillow, OpenTelemetry и указанные хранилища. Первичные материалы — ссылки README; версии закреплены в репозитории. Claude/Codex помогали с кодом, тестами и оформлением; результаты проверены реальными запусками.
|
||||
|
||||
- [x] Весь обязательный минимум текущей и предыдущих работ сохранён с объявленными переходами.
|
||||
- [x] Контракт и публичные тесты не ослаблены.
|
||||
- [x] make check и make test выполнены эквивалентными Python-командами; приложен реальный вывод.
|
||||
- [x] Сценарии отказов/безопасности своего уровня воспроизведены.
|
||||
- [x] Все секреты и приватные ключи находятся вне Git; отчёт не содержит tokens.
|
||||
- [x] README задания сохранён, REPORT.md содержит инструкцию именно моего решения.
|
||||
Binary file not shown.
+1
-1
@@ -31,4 +31,4 @@ Prometheus/Loki/Tempo доступны только внутри сети сте
|
||||
Алерт `TelemetryExportFailing`: Collector не может отправить данные в Tempo/Loki.
|
||||
1. Это сбой наблюдаемости, а не приложения: бизнес-метрики API (ошибки, RPS) не меняются, приложение работает (SDK и Collector ограничивают очередь/RAM и отбрасывают данные).
|
||||
2. Проверить: `docker compose ps tempo loki`; метрики Collector `otelcol_exporter_queue_size`, `otelcol_exporter_send_failed_*`, `otelcol_process_memory_rss`.
|
||||
3. Запустить хранилища: `docker compose start tempo loki`. Данные за время простоя трасс/логов потеряны (счётчики `send_failed`), метрики не затронуты (путь Collector → Prometheus независим).
|
||||
3. Запустить хранилища: `docker compose start tempo loki`. Часть трасс/логов может потеряться после исчерпания очереди или срока повторов. `send_failed` считает неуспешные попытки, включая повторы, и не даёт точного числа потерянных уникальных спанов. При остановке только Tempo/Loki метрики продолжают идти по отдельному пути Collector → Prometheus.
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
$ python scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
exit=0
|
||||
|
||||
$ python scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
exit=0
|
||||
|
||||
$ python tests/smoke.py --base-url http://127.0.0.1:8080
|
||||
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_api.py -v
|
||||
test_bearer_rules (test_api.AuthTest.test_bearer_rules) ... ok
|
||||
test_concurrent_registration_of_same_username (test_api.AuthTest.test_concurrent_registration_of_same_username) ... ok
|
||||
test_logout_revokes_in_database_and_cache (test_api.AuthTest.test_logout_revokes_in_database_and_cache) ... ok
|
||||
test_password_is_not_exposed_or_stored_plain (test_api.AuthTest.test_password_is_not_exposed_or_stored_plain) ... ok
|
||||
test_register_validation (test_api.AuthTest.test_register_validation) ... ok
|
||||
test_session_shape_entropy_and_logout (test_api.AuthTest.test_session_shape_entropy_and_logout) ... ok
|
||||
test_token_only_stored_as_hash (test_api.AuthTest.test_token_only_stored_as_hash) ... ok
|
||||
test_wrong_password_and_unknown_user_are_indistinguishable (test_api.AuthTest.test_wrong_password_and_unknown_user_are_indistinguishable) ... ok
|
||||
test_chat_creation_is_atomic (test_api.DataTest.test_chat_creation_is_atomic) ... ok
|
||||
test_foreign_chat_empty_message_bad_json (test_api.DataTest.test_foreign_chat_empty_message_bad_json) ... ok
|
||||
test_multi_page_history_and_cursor_binding (test_api.DataTest.test_multi_page_history_and_cursor_binding) ... ok
|
||||
test_parallel_writes_from_many_clients (test_api.DataTest.test_parallel_writes_from_many_clients) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 12 tests in 2.581s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_idempotency.py -v
|
||||
test_concurrent_same_key_creates_exactly_one_message_across_replicas (test_idempotency.IdempotencyTest.test_concurrent_same_key_creates_exactly_one_message_across_replicas) ... ok
|
||||
test_different_body_same_key_is_409 (test_idempotency.IdempotencyTest.test_different_body_same_key_is_409) ... ok
|
||||
test_expired_key_is_reusable_after_ttl (test_idempotency.IdempotencyTest.test_expired_key_is_reusable_after_ttl) ... ok
|
||||
test_key_validation (test_idempotency.IdempotencyTest.test_key_validation) ... ok
|
||||
test_replay_rechecks_session_and_membership (test_idempotency.IdempotencyTest.test_replay_rechecks_session_and_membership) ... ok
|
||||
test_replay_returns_same_message_and_creates_no_duplicate (test_idempotency.IdempotencyTest.test_replay_returns_same_message_and_creates_no_duplicate) ... ok
|
||||
test_scope_is_user_and_chat (test_idempotency.IdempotencyTest.test_scope_is_user_and_chat) ... ok
|
||||
test_semantically_equal_body_is_replayed (test_idempotency.IdempotencyTest.test_semantically_equal_body_is_replayed) ... ok
|
||||
test_session_is_shared_between_replicas_without_relogin (test_idempotency.IdempotencyTest.test_session_is_shared_between_replicas_without_relogin) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 9 tests in 2.087s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_attachments.py -v
|
||||
test_aborted_upload_leaves_nothing (test_attachments.AttachmentTest.test_aborted_upload_leaves_nothing) ... ok
|
||||
test_bucket_is_private_outside_the_api (test_attachments.AttachmentTest.test_bucket_is_private_outside_the_api) ... ok
|
||||
test_corrupted_and_spoofed_files_are_415_not_500 (test_attachments.AttachmentTest.test_corrupted_and_spoofed_files_are_415_not_500) ... ok
|
||||
test_dangerous_filenames_are_400 (test_attachments.AttachmentTest.test_dangerous_filenames_are_400) ... ok
|
||||
test_decompression_bomb_header_is_413 (test_attachments.AttachmentTest.test_decompression_bomb_header_is_413) ... ok
|
||||
test_empty_body_is_400 (test_attachments.AttachmentTest.test_empty_body_is_400) ... ok
|
||||
test_foreign_user_cannot_upload_read_or_download (test_attachments.AttachmentTest.test_foreign_user_cannot_upload_read_or_download) ... ok
|
||||
test_idempotent_replay_with_attachments (test_attachments.AttachmentTest.test_idempotent_replay_with_attachments) ... ok
|
||||
test_message_with_attachments_and_chat_binding (test_attachments.AttachmentTest.test_message_with_attachments_and_chat_binding) ... ok
|
||||
test_png_and_jpeg_roundtrip_with_checksum (test_attachments.AttachmentTest.test_png_and_jpeg_roundtrip_with_checksum) ... ok
|
||||
test_too_large_is_413_and_nothing_is_stored (test_attachments.AttachmentTest.test_too_large_is_413_and_nothing_is_stored) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 11 tests in 5.449s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_topology.py -v
|
||||
test_api_runs_as_non_root (test_topology.TopologyTest.test_api_runs_as_non_root) ... ok
|
||||
test_at_least_two_api_replicas_without_published_ports (test_topology.TopologyTest.test_at_least_two_api_replicas_without_published_ports) ... ok
|
||||
test_no_fixed_container_names (test_topology.TopologyTest.test_no_fixed_container_names) ... ok
|
||||
test_only_lb_is_published_and_only_on_localhost (test_topology.TopologyTest.test_only_lb_is_published_and_only_on_localhost) ... ok
|
||||
test_resource_limits_are_set (test_topology.TopologyTest.test_resource_limits_are_set) ... ok
|
||||
test_stop_grace_period_covers_drain (test_topology.TopologyTest.test_stop_grace_period_covers_drain) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 6 tests in 2.739s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_pipeline.py -v
|
||||
test_alpha_is_composited_on_white (test_pipeline.PipelineTest.test_alpha_is_composited_on_white) ... C:\Users\kolya5544\source\repos\vmdMTUCI\mtusi2026lab6\student-tests\test_pipeline.py:25: ResourceWarning: unclosed file <_io.BufferedReader name='C:\\Users\\kolya5544\\source\\repos\\vmdMTUCI\\mtusi2026lab6\\student-tests\\fixtures\\alpha.png'>
|
||||
return open(os.path.join(FIX, name), "rb").read()
|
||||
ResourceWarning: Enable tracemalloc to get the object allocation traceback
|
||||
ok
|
||||
test_content_is_409_while_not_ready_and_original_is_untouched (test_pipeline.PipelineTest.test_content_is_409_while_not_ready_and_original_is_untouched) ... ok
|
||||
test_exif_orientation_is_applied (test_pipeline.PipelineTest.test_exif_orientation_is_applied) ... C:\Users\kolya5544\source\repos\vmdMTUCI\mtusi2026lab6\student-tests\test_pipeline.py:25: ResourceWarning: unclosed file <_io.BufferedReader name='C:\\Users\\kolya5544\\source\\repos\\vmdMTUCI\\mtusi2026lab6\\student-tests\\fixtures\\exif_rot6.jpg'>
|
||||
return open(os.path.join(FIX, name), "rb").read()
|
||||
ResourceWarning: Enable tracemalloc to get the object allocation traceback
|
||||
ok
|
||||
test_message_can_reference_attachment_before_ready_and_failed_cannot (test_pipeline.PipelineTest.test_message_can_reference_attachment_before_ready_and_failed_cannot) ... C:\Users\kolya5544\source\repos\vmdMTUCI\mtusi2026lab6\student-tests\test_pipeline.py:25: ResourceWarning: unclosed file <_io.BufferedReader name='C:\\Users\\kolya5544\\source\\repos\\vmdMTUCI\\mtusi2026lab6\\student-tests\\fixtures\\poison.png'>
|
||||
return open(os.path.join(FIX, name), "rb").read()
|
||||
ResourceWarning: Enable tracemalloc to get the object allocation traceback
|
||||
ok
|
||||
test_other_variants_visible_only_to_chat_members (test_pipeline.PipelineTest.test_other_variants_visible_only_to_chat_members) ... ok
|
||||
test_ready_job_redelivery_does_not_duplicate_variants (test_pipeline.PipelineTest.test_ready_job_redelivery_does_not_duplicate_variants) ... ok
|
||||
test_sample_png_produces_all_variants_per_contract (test_pipeline.PipelineTest.test_sample_png_produces_all_variants_per_contract) ... ok
|
||||
test_small_image_is_not_upscaled_but_crop_is_128 (test_pipeline.PipelineTest.test_small_image_is_not_upscaled_but_crop_is_128) ... C:\Users\kolya5544\source\repos\vmdMTUCI\mtusi2026lab6\student-tests\test_pipeline.py:25: ResourceWarning: unclosed file <_io.BufferedReader name='C:\\Users\\kolya5544\\source\\repos\\vmdMTUCI\\mtusi2026lab6\\student-tests\\fixtures\\small.png'>
|
||||
return open(os.path.join(FIX, name), "rb").read()
|
||||
ResourceWarning: Enable tracemalloc to get the object allocation traceback
|
||||
ok
|
||||
test_staging_is_cleaned_after_ready_and_kept_for_failed (test_pipeline.PipelineTest.test_staging_is_cleaned_after_ready_and_kept_for_failed) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 9 tests in 10.668s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_observability.py -v
|
||||
test_logs_are_structured_and_linked_by_trace_id (test_observability.ObservabilityTest.test_logs_are_structured_and_linked_by_trace_id) ... ok
|
||||
test_metrics_for_http_jobs_queue_pool_worker (test_observability.ObservabilityTest.test_metrics_for_http_jobs_queue_pool_worker) ... ok
|
||||
test_no_high_cardinality_or_secret_labels (test_observability.ObservabilityTest.test_no_high_cardinality_or_secret_labels) ... ok
|
||||
test_one_trace_spans_api_outbox_broker_and_worker (test_observability.ObservabilityTest.test_one_trace_spans_api_outbox_broker_and_worker) ... ok
|
||||
test_secrets_and_message_bodies_are_not_exported (test_observability.ObservabilityTest.test_secrets_and_message_bodies_are_not_exported) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 5 tests in 9.932s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_observability_retry.py -v
|
||||
test_all_attempts_in_one_trace_and_logs (test_observability_retry.RetryTraceTest.test_all_attempts_in_one_trace_and_logs) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 1 test in 19.482s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_reconcile5.py -v
|
||||
test_ready_variants_and_uncommitted_side_effect_are_preserved (test_reconcile5.ReconcilePipelineTest.test_ready_variants_and_uncommitted_side_effect_are_preserved) ... ok
|
||||
test_staging_is_protected_and_unowned_orphan_obeys_grace (test_reconcile5.ReconcilePipelineTest.test_staging_is_protected_and_unowned_orphan_obeys_grace) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 2 tests in 34.423s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_resilience5.py -v
|
||||
test_1_worker_down_upload_api_restart_worker_up (test_resilience5.ResilienceTest.test_1_worker_down_upload_api_restart_worker_up) ... ok
|
||||
test_2_broker_restart_keeps_accepted_jobs (test_resilience5.ResilienceTest.test_2_broker_restart_keeps_accepted_jobs) ... ok
|
||||
test_3_broker_down_during_acceptance_outbox_delivers_later (test_resilience5.ResilienceTest.test_3_broker_down_during_acceptance_outbox_delivers_later) ... ok
|
||||
test_4_api_crash_between_commit_and_publish (test_resilience5.ResilienceTest.test_4_api_crash_between_commit_and_publish) ... ok
|
||||
test_5_worker_crash_after_s3_before_commit_lease_recovery (test_resilience5.ResilienceTest.test_5_worker_crash_after_s3_before_commit_lease_recovery) ... ok
|
||||
test_6_worker_crash_after_commit_before_ack_redelivery_is_noop (test_resilience5.ResilienceTest.test_6_worker_crash_after_commit_before_ack_redelivery_is_noop) ... ok
|
||||
test_7_retry_exhaustion_registry_and_operator_replay (test_resilience5.ResilienceTest.test_7_retry_exhaustion_registry_and_operator_replay) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 7 tests in 146.730s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_expiry.py -v
|
||||
test_expiry_is_not_extended_by_use (test_expiry.ExpiryTest.test_expiry_is_not_extended_by_use) ... ok
|
||||
test_session_expires_after_ttl (test_expiry.ExpiryTest.test_session_expires_after_ttl) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 2 tests in 21.421s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_dependencies.py -v
|
||||
test_postgres_down_gives_bounded_503_never_anonymous_access (test_dependencies.DependencyTest.test_postgres_down_gives_bounded_503_never_anonymous_access) ... ok
|
||||
test_valkey_down_is_bypassed (test_dependencies.DependencyTest.test_valkey_down_is_bypassed) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 2 tests in 21.620s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
|
||||
$ python tests/resilience.py --mode persistence --action-script scripts/restart.cmd --base-url http://127.0.0.1:8080
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
FAIL: restart hook failed (inspect your script locally)
|
||||
exit=1
|
||||
@@ -0,0 +1,5 @@
|
||||
services:
|
||||
lb:
|
||||
ports: !override ["127.0.0.1:18080:8080"]
|
||||
grafana:
|
||||
ports: !override ["127.0.0.1:13000:3000"]
|
||||
@@ -0,0 +1,345 @@
|
||||
$ git rev-parse HEAD
|
||||
6d87f5426c555ea996d97f1415f50cd3bf7b1f17
|
||||
exit=0
|
||||
|
||||
$ git status --short
|
||||
|
||||
exit=0
|
||||
|
||||
$ C:/Program Files/Git/bin/bash.exe --noprofile --norc -c sh scripts/init-secrets.sh
|
||||
|
||||
exit=0
|
||||
|
||||
$ docker compose -p mtusi-lab6-clean-check -f compose.yaml -f C:\Users\kolya5544\source\repos\vmdMTUCI\tools\lab6-qa\clean-ports.yaml config --quiet
|
||||
|
||||
exit=0
|
||||
|
||||
$ docker compose -p mtusi-lab6-clean-check -f compose.yaml -f C:\Users\kolya5544\source\repos\vmdMTUCI\tools\lab6-qa\clean-ports.yaml up -d --build --wait --wait-timeout 180
|
||||
Image mtusi-messenger:lab6 Building
|
||||
Image mtusi-messenger:lab6 Building
|
||||
Image mtusi-messenger:lab6 Building
|
||||
Image mtusi-messenger:lab6 Building
|
||||
#1 [internal] load local bake definitions
|
||||
#1 reading from stdin 2.19kB 0.0s done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [worker internal] load build definition from Dockerfile
|
||||
#2 transferring dockerfile: 1.91kB done
|
||||
#2 DONE 0.1s
|
||||
|
||||
#2 [s3-init internal] load build definition from Dockerfile
|
||||
#2 DONE 0.1s
|
||||
|
||||
#3 [s3-init] resolve image config for docker-image://docker.io/docker/dockerfile:1
|
||||
#3 DONE 3.9s
|
||||
|
||||
#4 [migrate] docker-image://docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e
|
||||
#4 resolve docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e 0.1s done
|
||||
#4 CACHED
|
||||
|
||||
#5 [s3-init internal] load metadata for docker.io/library/python:3.12.12-slim-bookworm@sha256:593bd06efe90efa80dc4eee3948be7c0fde4134606dd40d8dd8dbcade98e669c
|
||||
#5 DONE 1.9s
|
||||
|
||||
#6 [s3-init internal] load .dockerignore
|
||||
#6 transferring context: 289B done
|
||||
#6 DONE 0.1s
|
||||
|
||||
#7 [api builder 1/4] FROM docker.io/library/python:3.12.12-slim-bookworm@sha256:593bd06efe90efa80dc4eee3948be7c0fde4134606dd40d8dd8dbcade98e669c
|
||||
#7 resolve docker.io/library/python:3.12.12-slim-bookworm@sha256:593bd06efe90efa80dc4eee3948be7c0fde4134606dd40d8dd8dbcade98e669c 0.1s done
|
||||
#7 DONE 0.1s
|
||||
|
||||
#8 [api internal] load build context
|
||||
#8 transferring context: 159.42kB 0.0s done
|
||||
#8 DONE 0.2s
|
||||
|
||||
#9 [migrate builder 4/4] RUN python -m venv /opt/venv && /opt/venv/bin/pip install -r requirements.txt
|
||||
#9 CACHED
|
||||
|
||||
#10 [migrate stage-1 3/6] COPY --from=builder /opt/venv /opt/venv
|
||||
#10 CACHED
|
||||
|
||||
#11 [migrate stage-1 2/6] RUN groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --no-create-home app
|
||||
#11 CACHED
|
||||
|
||||
#12 [migrate builder 2/4] WORKDIR /build
|
||||
#12 CACHED
|
||||
|
||||
#13 [migrate builder 3/4] COPY requirements.txt .
|
||||
#13 CACHED
|
||||
|
||||
#14 [s3-init stage-1 4/6] WORKDIR /srv
|
||||
#14 CACHED
|
||||
|
||||
#15 [api stage-1 5/6] COPY src/ /srv/src/
|
||||
#15 DONE 0.1s
|
||||
|
||||
#15 [worker stage-1 5/6] COPY src/ /srv/src/
|
||||
#15 DONE 0.1s
|
||||
|
||||
#16 [api stage-1 6/6] COPY migrations/ /srv/migrations/
|
||||
#16 DONE 0.3s
|
||||
|
||||
#16 [worker stage-1 6/6] COPY migrations/ /srv/migrations/
|
||||
#16 DONE 0.3s
|
||||
|
||||
#17 [api] exporting to image
|
||||
#17 exporting layers
|
||||
#17 exporting layers 0.4s done
|
||||
#17 exporting manifest sha256:a44a3db4f954b2d839b7fe29cbb71c7f7674f8ca74a7fa09e656d6ca54c5764c
|
||||
#17 exporting manifest sha256:a44a3db4f954b2d839b7fe29cbb71c7f7674f8ca74a7fa09e656d6ca54c5764c 0.3s done
|
||||
#17 exporting config sha256:7d05c42b9fa6c5dde578b5fe27fcd0b08b41833510fe211417d886af50eff697
|
||||
#17 exporting config sha256:7d05c42b9fa6c5dde578b5fe27fcd0b08b41833510fe211417d886af50eff697 0.2s done
|
||||
#17 exporting attestation manifest sha256:b20893808f6cfa06f171dbcbc4bea0298f024d1011fec1f869b4c2ec35796cf6
|
||||
#17 exporting attestation manifest sha256:b20893808f6cfa06f171dbcbc4bea0298f024d1011fec1f869b4c2ec35796cf6 0.5s done
|
||||
#17 exporting manifest list sha256:bfc4140d1931f7f6fc6ab531b42b5cafbacdc8bd5f242c7ba7048342ae0d792f
|
||||
#17 exporting manifest list sha256:bfc4140d1931f7f6fc6ab531b42b5cafbacdc8bd5f242c7ba7048342ae0d792f 0.2s done
|
||||
#17 naming to docker.io/library/mtusi-messenger:lab6 0.0s done
|
||||
#17 unpacking to docker.io/library/mtusi-messenger:lab6
|
||||
#17 unpacking to docker.io/library/mtusi-messenger:lab6 0.6s done
|
||||
#17 DONE 2.5s
|
||||
|
||||
#18 [migrate] exporting to image
|
||||
#18 exporting layers 0.4s done
|
||||
#18 exporting manifest sha256:5308c23deb5b344ce251b0b2bca861d6bd2bc58fc324fb5da4edd2fa3987922c 0.2s done
|
||||
#18 exporting config sha256:44c24ac50125b68dca2d8cf40743ae2bc78fd95835a54519d19de53dbc8458da 0.2s done
|
||||
#18 exporting attestation manifest sha256:6ca67fd654b1854f407e84829e0363921d0ee4749e7072f7524c8547426e4ec4 0.5s done
|
||||
#18 exporting manifest list sha256:f9ccfe31b60f1164f9f0c5a6502e502b785d096ebe59aaa7502191d8eaae6407 0.2s done
|
||||
#18 naming to docker.io/library/mtusi-messenger:lab6 0.1s done
|
||||
#18 unpacking to docker.io/library/mtusi-messenger:lab6 0.4s done
|
||||
#18 DONE 2.4s
|
||||
|
||||
#19 [s3-init] exporting to image
|
||||
#19 exporting layers 0.5s done
|
||||
#19 exporting manifest sha256:a1a52ab91fb42571d42357271ff4f44839686f1e9a9e5cab34e3fd45ddaabe77 0.1s done
|
||||
#19 exporting config sha256:469a339ae5debdb4c78f89c63756e83b237176eda4b84c070a4c3b4bc7206f76 0.2s done
|
||||
#19 exporting attestation manifest sha256:9849897140fe8d411579f10ec3b967c386258d69a347d282774217cb3ea5d4e4 0.5s done
|
||||
#19 exporting manifest list sha256:e0ecdb5c24bc281b6861cbb6a7861794e8b9692f22ac3383b9725a2a68c385de 0.2s done
|
||||
#19 naming to docker.io/library/mtusi-messenger:lab6 0.1s done
|
||||
#19 unpacking to docker.io/library/mtusi-messenger:lab6 0.5s done
|
||||
#19 DONE 2.4s
|
||||
|
||||
#20 [worker] exporting to image
|
||||
#20 exporting layers 0.5s done
|
||||
#20 exporting manifest sha256:9dccceba30cebf826f796751a00139cadc366f85fa6575ca7e5dbeaaa07ac69f 0.2s done
|
||||
#20 exporting config sha256:fe76586a0b246816ab5ea92a6e2f7040c19c8132a975a8a4d76a956ac08b6b85 0.2s done
|
||||
#20 exporting attestation manifest sha256:5c98251a245b9dda793e1c6841b23918675605ae0962a14e0b6699f66bcb7bec 0.5s done
|
||||
#20 exporting manifest list sha256:7f326220eb027a78f09705d6f233b029bd58f56e6da48d22c8acaad5102d781c 0.3s done
|
||||
#20 naming to docker.io/library/mtusi-messenger:lab6 0.1s done
|
||||
#20 unpacking to docker.io/library/mtusi-messenger:lab6 0.6s done
|
||||
#20 DONE 2.5s
|
||||
|
||||
#21 [migrate] resolving provenance for metadata file
|
||||
#21 DONE 0.4s
|
||||
|
||||
#22 [worker] resolving provenance for metadata file
|
||||
#22 DONE 0.2s
|
||||
|
||||
#23 [s3-init] resolving provenance for metadata file
|
||||
#23 DONE 0.4s
|
||||
|
||||
#24 [api] resolving provenance for metadata file
|
||||
#24 DONE 0.0s
|
||||
Image mtusi-messenger:lab6 Built
|
||||
Image mtusi-messenger:lab6 Built
|
||||
Image mtusi-messenger:lab6 Built
|
||||
Image mtusi-messenger:lab6 Built
|
||||
Network mtusi-lab6-clean-check_backend Creating
|
||||
Network mtusi-lab6-clean-check_backend Created
|
||||
Volume mtusi-lab6-clean-check_rabbitmqdata Creating
|
||||
Volume mtusi-lab6-clean-check_rabbitmqdata Created
|
||||
Volume mtusi-lab6-clean-check_valkeydata Creating
|
||||
Volume mtusi-lab6-clean-check_valkeydata Created
|
||||
Volume mtusi-lab6-clean-check_pgdata Creating
|
||||
Volume mtusi-lab6-clean-check_pgdata Created
|
||||
Volume mtusi-lab6-clean-check_lokidata Creating
|
||||
Volume mtusi-lab6-clean-check_lokidata Created
|
||||
Volume mtusi-lab6-clean-check_seaweeddata Creating
|
||||
Volume mtusi-lab6-clean-check_seaweeddata Created
|
||||
Volume mtusi-lab6-clean-check_promdata Creating
|
||||
Volume mtusi-lab6-clean-check_promdata Created
|
||||
Volume mtusi-lab6-clean-check_tempodata Creating
|
||||
Volume mtusi-lab6-clean-check_tempodata Created
|
||||
Volume mtusi-lab6-clean-check_grafanadata Creating
|
||||
Volume mtusi-lab6-clean-check_grafanadata Created
|
||||
Container mtusi-lab6-clean-check-valkey-1 Creating
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Creating
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Creating
|
||||
Container mtusi-lab6-clean-check-postgres-1 Creating
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Creating
|
||||
Container mtusi-lab6-clean-check-tempo-1 Creating
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Creating
|
||||
Container mtusi-lab6-clean-check-loki-1 Creating
|
||||
time="2026-11-12T04:51:24+03:00" level=warning msg="secrets `uid`, `gid` and `mode` are not supported, they will be ignored"
|
||||
Container mtusi-lab6-clean-check-valkey-1 Created
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Created
|
||||
Container mtusi-lab6-clean-check-tempo-1 Created
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Created
|
||||
Container mtusi-lab6-clean-check-loki-1 Created
|
||||
Container mtusi-lab6-clean-check-grafana-1 Creating
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Created
|
||||
Container mtusi-lab6-clean-check-postgres-1 Created
|
||||
Container mtusi-lab6-clean-check-migrate-1 Creating
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Created
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Creating
|
||||
Container mtusi-lab6-clean-check-grafana-1 Created
|
||||
Container mtusi-lab6-clean-check-migrate-1 Created
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Created
|
||||
Container mtusi-lab6-clean-check-worker-1 Creating
|
||||
Container mtusi-lab6-clean-check-api-2 Creating
|
||||
Container mtusi-lab6-clean-check-api-1 Creating
|
||||
Container mtusi-lab6-clean-check-api-2 Created
|
||||
Container mtusi-lab6-clean-check-worker-1 Created
|
||||
Container mtusi-lab6-clean-check-api-1 Created
|
||||
Container mtusi-lab6-clean-check-lb-1 Creating
|
||||
Container mtusi-lab6-clean-check-lb-1 Created
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Starting
|
||||
Container mtusi-lab6-clean-check-loki-1 Starting
|
||||
Container mtusi-lab6-clean-check-tempo-1 Starting
|
||||
Container mtusi-lab6-clean-check-valkey-1 Starting
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Starting
|
||||
Container mtusi-lab6-clean-check-postgres-1 Starting
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Starting
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Starting
|
||||
Container mtusi-lab6-clean-check-loki-1 Started
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Started
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Waiting
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Started
|
||||
Container mtusi-lab6-clean-check-valkey-1 Started
|
||||
Container mtusi-lab6-clean-check-tempo-1 Started
|
||||
Container mtusi-lab6-clean-check-postgres-1 Started
|
||||
Container mtusi-lab6-clean-check-postgres-1 Waiting
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Started
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Started
|
||||
Container mtusi-lab6-clean-check-grafana-1 Starting
|
||||
Container mtusi-lab6-clean-check-grafana-1 Started
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Healthy
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Starting
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Started
|
||||
Container mtusi-lab6-clean-check-postgres-1 Healthy
|
||||
Container mtusi-lab6-clean-check-migrate-1 Starting
|
||||
Container mtusi-lab6-clean-check-migrate-1 Started
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Waiting
|
||||
Container mtusi-lab6-clean-check-valkey-1 Waiting
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Waiting
|
||||
Container mtusi-lab6-clean-check-migrate-1 Waiting
|
||||
Container mtusi-lab6-clean-check-migrate-1 Waiting
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Waiting
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Exited
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Exited
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Healthy
|
||||
Container mtusi-lab6-clean-check-valkey-1 Healthy
|
||||
Container mtusi-lab6-clean-check-migrate-1 Exited
|
||||
Container mtusi-lab6-clean-check-worker-1 Starting
|
||||
Container mtusi-lab6-clean-check-migrate-1 Exited
|
||||
Container mtusi-lab6-clean-check-api-1 Starting
|
||||
Container mtusi-lab6-clean-check-api-1 Started
|
||||
Container mtusi-lab6-clean-check-api-2 Starting
|
||||
Container mtusi-lab6-clean-check-worker-1 Started
|
||||
Container mtusi-lab6-clean-check-api-2 Started
|
||||
Container mtusi-lab6-clean-check-lb-1 Starting
|
||||
Container mtusi-lab6-clean-check-lb-1 Started
|
||||
Container mtusi-lab6-clean-check-grafana-1 Waiting
|
||||
Container mtusi-lab6-clean-check-valkey-1 Waiting
|
||||
Container mtusi-lab6-clean-check-api-1 Waiting
|
||||
Container mtusi-lab6-clean-check-api-2 Waiting
|
||||
Container mtusi-lab6-clean-check-postgres-1 Waiting
|
||||
Container mtusi-lab6-clean-check-loki-1 Waiting
|
||||
Container mtusi-lab6-clean-check-migrate-1 Waiting
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Waiting
|
||||
Container mtusi-lab6-clean-check-tempo-1 Waiting
|
||||
Container mtusi-lab6-clean-check-worker-1 Waiting
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Waiting
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Waiting
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Waiting
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Waiting
|
||||
Container mtusi-lab6-clean-check-lb-1 Waiting
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Healthy
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Healthy
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Healthy
|
||||
Container mtusi-lab6-clean-check-postgres-1 Healthy
|
||||
Container mtusi-lab6-clean-check-tempo-1 Healthy
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Healthy
|
||||
Container mtusi-lab6-clean-check-loki-1 Healthy
|
||||
Container mtusi-lab6-clean-check-valkey-1 Healthy
|
||||
Container mtusi-lab6-clean-check-migrate-1 Exited
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Exited
|
||||
Container mtusi-lab6-clean-check-worker-1 Healthy
|
||||
Container mtusi-lab6-clean-check-api-1 Healthy
|
||||
Container mtusi-lab6-clean-check-api-2 Healthy
|
||||
Container mtusi-lab6-clean-check-lb-1 Healthy
|
||||
Container mtusi-lab6-clean-check-grafana-1 Healthy
|
||||
exit=0
|
||||
|
||||
$ python scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
exit=0
|
||||
|
||||
$ python tests/smoke.py --base-url http://127.0.0.1:18080
|
||||
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit=0
|
||||
|
||||
PASS: fresh secrets/volumes, public API, 3 datasources, provisioned dashboard with 22 panels
|
||||
$ docker compose -p mtusi-lab6-clean-check -f compose.yaml -f C:\Users\kolya5544\source\repos\vmdMTUCI\tools\lab6-qa\clean-ports.yaml down
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Stopping
|
||||
Container mtusi-lab6-clean-check-lb-1 Stopping
|
||||
Container mtusi-lab6-clean-check-grafana-1 Stopping
|
||||
Container mtusi-lab6-clean-check-worker-1 Stopping
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Stopped
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Removing
|
||||
Container mtusi-lab6-clean-check-otel-collector-1 Removed
|
||||
Container mtusi-lab6-clean-check-lb-1 Stopped
|
||||
Container mtusi-lab6-clean-check-lb-1 Removing
|
||||
Container mtusi-lab6-clean-check-lb-1 Removed
|
||||
Container mtusi-lab6-clean-check-api-2 Stopping
|
||||
Container mtusi-lab6-clean-check-api-1 Stopping
|
||||
Container mtusi-lab6-clean-check-grafana-1 Stopped
|
||||
Container mtusi-lab6-clean-check-grafana-1 Removing
|
||||
Container mtusi-lab6-clean-check-grafana-1 Removed
|
||||
Container mtusi-lab6-clean-check-loki-1 Stopping
|
||||
Container mtusi-lab6-clean-check-tempo-1 Stopping
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Stopping
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Stopped
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Removing
|
||||
Container mtusi-lab6-clean-check-prometheus-1 Removed
|
||||
Container mtusi-lab6-clean-check-tempo-1 Stopped
|
||||
Container mtusi-lab6-clean-check-tempo-1 Removing
|
||||
Container mtusi-lab6-clean-check-tempo-1 Removed
|
||||
Container mtusi-lab6-clean-check-loki-1 Stopped
|
||||
Container mtusi-lab6-clean-check-loki-1 Removing
|
||||
Container mtusi-lab6-clean-check-loki-1 Removed
|
||||
Container mtusi-lab6-clean-check-worker-1 Stopped
|
||||
Container mtusi-lab6-clean-check-worker-1 Removing
|
||||
Container mtusi-lab6-clean-check-worker-1 Removed
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Stopping
|
||||
Container mtusi-lab6-clean-check-api-2 Stopped
|
||||
Container mtusi-lab6-clean-check-api-2 Removing
|
||||
Container mtusi-lab6-clean-check-api-2 Removed
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Stopped
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Removing
|
||||
Container mtusi-lab6-clean-check-rabbitmq-1 Removed
|
||||
Container mtusi-lab6-clean-check-api-1 Stopped
|
||||
Container mtusi-lab6-clean-check-api-1 Removing
|
||||
Container mtusi-lab6-clean-check-api-1 Removed
|
||||
Container mtusi-lab6-clean-check-migrate-1 Stopping
|
||||
Container mtusi-lab6-clean-check-valkey-1 Stopping
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Stopping
|
||||
Container mtusi-lab6-clean-check-migrate-1 Stopped
|
||||
Container mtusi-lab6-clean-check-migrate-1 Removing
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Stopped
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Removing
|
||||
Container mtusi-lab6-clean-check-s3-init-1 Removed
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Stopping
|
||||
Container mtusi-lab6-clean-check-migrate-1 Removed
|
||||
Container mtusi-lab6-clean-check-postgres-1 Stopping
|
||||
Container mtusi-lab6-clean-check-valkey-1 Stopped
|
||||
Container mtusi-lab6-clean-check-valkey-1 Removing
|
||||
Container mtusi-lab6-clean-check-postgres-1 Stopped
|
||||
Container mtusi-lab6-clean-check-postgres-1 Removing
|
||||
Container mtusi-lab6-clean-check-valkey-1 Removed
|
||||
Container mtusi-lab6-clean-check-postgres-1 Removed
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Stopped
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Removing
|
||||
Container mtusi-lab6-clean-check-seaweedfs-1 Removed
|
||||
Network mtusi-lab6-clean-check_backend Removing
|
||||
Network mtusi-lab6-clean-check_backend Removed
|
||||
exit=0
|
||||
@@ -0,0 +1,136 @@
|
||||
$ python -u research/incidents.py --out evidence\recheck_2026-11-12
|
||||
{
|
||||
"incidents": [
|
||||
{
|
||||
"incident": "worker_down",
|
||||
"alert": "QueueLagGrowing",
|
||||
"injected_at_s": 25.0,
|
||||
"firing_at_s": 93.3,
|
||||
"detection_seconds": 68.3,
|
||||
"recovered_cmd_at_s": 96.5,
|
||||
"resolved_at_s": 118.3,
|
||||
"fired": true,
|
||||
"resolved": true,
|
||||
"evidence": {
|
||||
"queue_oldest_age_s": 60.743133,
|
||||
"worker_capacity_series_present": true,
|
||||
"jobs_ready_rate_1m": 0.0,
|
||||
"diagnosis": "возраст старейшей задачи растёт при нулевой скорости обработки jobs (worker не отдаёт метрики) -> остановлен worker, а не медленная БД",
|
||||
"alerts_in_state_firing": [
|
||||
"HighHttpErrorRate",
|
||||
"HighUploadErrorRate",
|
||||
"QueueLagGrowing"
|
||||
]
|
||||
},
|
||||
"time_to_resolve_after_recovery_s": 21.8
|
||||
},
|
||||
{
|
||||
"incident": "slow_db",
|
||||
"alert": "HighLatencyP95",
|
||||
"injected_at_s": 124.3,
|
||||
"firing_at_s": 192.0,
|
||||
"detection_seconds": 67.7,
|
||||
"recovered_cmd_at_s": 193.7,
|
||||
"resolved_at_s": 237.2,
|
||||
"fired": true,
|
||||
"resolved": true,
|
||||
"evidence": {
|
||||
"p95_s": 0.7828124999999998,
|
||||
"db_pool_waiting": 0.0,
|
||||
"slow_traces_with_long_db_span": 20,
|
||||
"slow_http_post_messages_traces": 20,
|
||||
"diagnosis": "p95 высокий, а время в спанах db.connection сопоставимо с длительностью запроса и растёт ожидание пула -> медленная БД, а не обработчик",
|
||||
"alerts_in_state_firing": [
|
||||
"HighLatencyP95"
|
||||
]
|
||||
},
|
||||
"time_to_resolve_after_recovery_s": 43.5
|
||||
},
|
||||
{
|
||||
"incident": "s3_down",
|
||||
"alert": "HighUploadErrorRate",
|
||||
"injected_at_s": 243.2,
|
||||
"firing_at_s": 327.3,
|
||||
"detection_seconds": 84.1,
|
||||
"recovered_cmd_at_s": 328.6,
|
||||
"resolved_at_s": 367.9,
|
||||
"fired": true,
|
||||
"resolved": true,
|
||||
"evidence": {
|
||||
"upload_error_ratio_1m": 1.0,
|
||||
"global_error_ratio_1m": 0.011166945840312675,
|
||||
"error_traces": 20,
|
||||
"s3_put_failed_log_lines": 37,
|
||||
"diagnosis": "рост доли 5xx на маршруте загрузки при нормальных остальных; спаны s3.put_object с ошибкой и логи s3_put_failed -> недоступен S3",
|
||||
"alerts_in_state_firing": [
|
||||
"HighUploadErrorRate",
|
||||
"QueueLagGrowing"
|
||||
]
|
||||
},
|
||||
"time_to_resolve_after_recovery_s": 39.3
|
||||
},
|
||||
{
|
||||
"incident": "telemetry_backend",
|
||||
"alert": "TelemetryExportFailing",
|
||||
"injected_at_s": 373.9,
|
||||
"firing_at_s": 442.9,
|
||||
"detection_seconds": 69.1,
|
||||
"recovered_cmd_at_s": 444.7,
|
||||
"resolved_at_s": 512.2,
|
||||
"fired": true,
|
||||
"resolved": true,
|
||||
"evidence": {
|
||||
"api_error_ratio_1m": 0.0,
|
||||
"api_rps": 62.62045892577912,
|
||||
"collector_queue_size": 32.0,
|
||||
"collector_send_failed_spans_rate": 62.94195947803441,
|
||||
"collector_rss_mib": 239.0,
|
||||
"diagnosis": "ошибки экспорта растут, очередь ограничена; бизнес-метрики API без роста ошибок -> сбой хранилища телеметрии, не приложения",
|
||||
"alerts_in_state_firing": [
|
||||
"TelemetryExportFailing"
|
||||
]
|
||||
},
|
||||
"time_to_resolve_after_recovery_s": 67.5
|
||||
}
|
||||
],
|
||||
"traffic": {
|
||||
"msg_2": 15471,
|
||||
"up_2": 10598,
|
||||
"up_5": 2175,
|
||||
"up_err": 45
|
||||
}
|
||||
}
|
||||
exit=0
|
||||
|
||||
$ python -u research/obs_cost.py --out evidence\recheck_2026-11-12 --profiles off on100 head10 tail --repeat 2
|
||||
{"profile": "off", "post": {"requests": 41303, "ok": 40440, "errors": {"500": 863}, "seconds": 30, "ok_rps": 1348.0, "error_ratio": 0.0209, "p50_ms": 17.39, "p95_ms": 74.05, "p99_ms": 618.63}, "docker_stats": {"worker": {"avg_cpu_percent": 1.6, "peak_mem_mib": 54.6}, "api": {"avg_cpu_percent": 50.6, "peak_mem_mib": 76.4}, "otel-collector": {"avg_cpu_percent": 0.1, "peak_mem_mib": 45.1}, "tempo": {"avg_cpu_percent": 0.3, "peak_mem_mib": 426.2}, "lb": {"avg_cpu_percent": 23.0, "peak_mem_mib": 18.3}, "grafana": {"avg_cpu_percent": 1.1, "peak_mem_mib": 314.4}, "rabbitmq": {"avg_cpu_percent": 14.5, "peak_mem_mib": 177.9}, "postgres": {"avg_cpu_percent": 95.9, "peak_mem_mib": 264.3}, "loki": {"avg_cpu_percent": 0.5, "peak_mem_mib": 119.8}, "seaweedfs": {"avg_cpu_percent": 1.3, "peak_mem_mib": 524.7}, "prometheus": {"avg_cpu_percent": 0.7, "peak_mem_mib": 75.6}, "valkey": {"avg_cpu_percent": 4.7, "peak_mem_mib": 10.7}}, "collector_delta": {"receiver_accepted_spans": 0, "receiver_accepted_log_records": 0, "receiver_accepted_metric_points": 0, "receiver_refused_spans": 0, "exporter_sent_spans": 0, "exporter_send_failed_spans": 0}, "tempo_bytes_delta": 0, "loki_bytes_delta": 0, "errors_injected_500": 873, "slow_requests_gt500ms": 823, "traces_in_tempo": {"all_http": 0, "error": 0, "slow_gt500ms": 0}, "kept_ratio": {"errors": 0.0, "slow": 0.0}}
|
||||
{"profile": "off", "post": {"requests": 42499, "ok": 41641, "errors": {"500": 858}, "seconds": 30, "ok_rps": 1388.0, "error_ratio": 0.0202, "p50_ms": 16.03, "p95_ms": 72.03, "p99_ms": 617.51}, "docker_stats": {"worker": {"avg_cpu_percent": 1.4, "peak_mem_mib": 54.6}, "api": {"avg_cpu_percent": 49.7, "peak_mem_mib": 64.0}, "otel-collector": {"avg_cpu_percent": 0.1, "peak_mem_mib": 43.7}, "tempo": {"avg_cpu_percent": 0.3, "peak_mem_mib": 388.5}, "lb": {"avg_cpu_percent": 22.6, "peak_mem_mib": 21.8}, "grafana": {"avg_cpu_percent": 1.4, "peak_mem_mib": 315.2}, "rabbitmq": {"avg_cpu_percent": 8.3, "peak_mem_mib": 178.2}, "postgres": {"avg_cpu_percent": 94.0, "peak_mem_mib": 263.0}, "loki": {"avg_cpu_percent": 0.5, "peak_mem_mib": 121.8}, "seaweedfs": {"avg_cpu_percent": 1.4, "peak_mem_mib": 505.8}, "prometheus": {"avg_cpu_percent": 0.6, "peak_mem_mib": 60.9}, "valkey": {"avg_cpu_percent": 4.5, "peak_mem_mib": 10.7}}, "collector_delta": {"receiver_accepted_spans": 0, "receiver_accepted_log_records": 0, "receiver_accepted_metric_points": 0, "receiver_refused_spans": 0, "exporter_sent_spans": 0, "exporter_send_failed_spans": 0}, "tempo_bytes_delta": 0, "loki_bytes_delta": 0, "errors_injected_500": 873, "slow_requests_gt500ms": 888, "traces_in_tempo": {"all_http": 0, "error": 0, "slow_gt500ms": 0}, "kept_ratio": {"errors": 0.0, "slow": 0.0}}
|
||||
{"profile": "on100", "post": {"requests": 38267, "ok": 37530, "errors": {"500": 737}, "seconds": 30, "ok_rps": 1251.0, "error_ratio": 0.0193, "p50_ms": 24.79, "p95_ms": 97.91, "p99_ms": 631.54}, "docker_stats": {"worker": {"avg_cpu_percent": 2.2, "peak_mem_mib": 64.5}, "api": {"avg_cpu_percent": 80.6, "peak_mem_mib": 83.2}, "otel-collector": {"avg_cpu_percent": 3.4, "peak_mem_mib": 75.0}, "tempo": {"avg_cpu_percent": 11.2, "peak_mem_mib": 745.7}, "lb": {"avg_cpu_percent": 20.2, "peak_mem_mib": 21.5}, "grafana": {"avg_cpu_percent": 1.1, "peak_mem_mib": 320.0}, "rabbitmq": {"avg_cpu_percent": 12.1, "peak_mem_mib": 157.0}, "postgres": {"avg_cpu_percent": 92.6, "peak_mem_mib": 282.2}, "loki": {"avg_cpu_percent": 4.4, "peak_mem_mib": 194.8}, "seaweedfs": {"avg_cpu_percent": 1.4, "peak_mem_mib": 494.7}, "prometheus": {"avg_cpu_percent": 0.5, "peak_mem_mib": 60.8}, "valkey": {"avg_cpu_percent": 5.4, "peak_mem_mib": 11.5}}, "collector_delta": {"receiver_accepted_spans": 90462, "receiver_accepted_log_records": 44825, "receiver_accepted_metric_points": 396, "receiver_refused_spans": 0, "exporter_sent_spans": 90462, "exporter_send_failed_spans": 0}, "tempo_bytes_delta": 47091712, "loki_bytes_delta": 30777344, "errors_injected_500": 761, "slow_requests_gt500ms": 808, "traces_in_tempo": {"all_http": 5000, "error": 848, "slow_gt500ms": 902}, "kept_ratio": {"errors": 1.114, "slow": 1.116}}
|
||||
{"profile": "on100", "post": {"requests": 37970, "ok": 37178, "errors": {"500": 792}, "seconds": 30, "ok_rps": 1239.3, "error_ratio": 0.0209, "p50_ms": 24.47, "p95_ms": 102.73, "p99_ms": 627.88}, "docker_stats": {"worker": {"avg_cpu_percent": 1.7, "peak_mem_mib": 60.3}, "api": {"avg_cpu_percent": 78.4, "peak_mem_mib": 75.4}, "otel-collector": {"avg_cpu_percent": 3.3, "peak_mem_mib": 72.0}, "tempo": {"avg_cpu_percent": 7.9, "peak_mem_mib": 526.0}, "lb": {"avg_cpu_percent": 19.5, "peak_mem_mib": 21.7}, "grafana": {"avg_cpu_percent": 0.8, "peak_mem_mib": 321.6}, "rabbitmq": {"avg_cpu_percent": 12.0, "peak_mem_mib": 188.4}, "postgres": {"avg_cpu_percent": 89.5, "peak_mem_mib": 284.4}, "loki": {"avg_cpu_percent": 4.8, "peak_mem_mib": 216.5}, "seaweedfs": {"avg_cpu_percent": 1.3, "peak_mem_mib": 494.4}, "prometheus": {"avg_cpu_percent": 0.7, "peak_mem_mib": 61.0}, "valkey": {"avg_cpu_percent": 5.0, "peak_mem_mib": 11.5}}, "collector_delta": {"receiver_accepted_spans": 89310, "receiver_accepted_log_records": 43824, "receiver_accepted_metric_points": 396, "receiver_refused_spans": 0, "exporter_sent_spans": 89310, "exporter_send_failed_spans": 0}, "tempo_bytes_delta": 22323200, "loki_bytes_delta": 30490624, "errors_injected_500": 800, "slow_requests_gt500ms": 737, "traces_in_tempo": {"all_http": 5000, "error": 881, "slow_gt500ms": 850}, "kept_ratio": {"errors": 1.101, "slow": 1.153}}
|
||||
{"profile": "head10", "post": {"requests": 34821, "ok": 34102, "errors": {"500": 719}, "seconds": 30, "ok_rps": 1136.7, "error_ratio": 0.0206, "p50_ms": 26.35, "p95_ms": 123.14, "p99_ms": 630.88}, "docker_stats": {"worker": {"avg_cpu_percent": 2.0, "peak_mem_mib": 62.5}, "api": {"avg_cpu_percent": 67.6, "peak_mem_mib": 83.7}, "otel-collector": {"avg_cpu_percent": 1.9, "peak_mem_mib": 68.4}, "tempo": {"avg_cpu_percent": 0.6, "peak_mem_mib": 472.9}, "lb": {"avg_cpu_percent": 19.2, "peak_mem_mib": 23.2}, "grafana": {"avg_cpu_percent": 0.9, "peak_mem_mib": 322.9}, "rabbitmq": {"avg_cpu_percent": 10.5, "peak_mem_mib": 194.3}, "postgres": {"avg_cpu_percent": 89.7, "peak_mem_mib": 302.1}, "loki": {"avg_cpu_percent": 4.8, "peak_mem_mib": 239.9}, "seaweedfs": {"avg_cpu_percent": 1.5, "peak_mem_mib": 494.4}, "prometheus": {"avg_cpu_percent": 0.6, "peak_mem_mib": 60.9}, "valkey": {"avg_cpu_percent": 5.1, "peak_mem_mib": 12.8}}, "collector_delta": {"receiver_accepted_spans": 8506, "receiver_accepted_log_records": 40586, "receiver_accepted_metric_points": 396, "receiver_refused_spans": 0, "exporter_sent_spans": 8506, "exporter_send_failed_spans": 0}, "tempo_bytes_delta": 1200128, "loki_bytes_delta": 4431872, "errors_injected_500": 727, "slow_requests_gt500ms": 671, "traces_in_tempo": {"all_http": 3919, "error": 89, "slow_gt500ms": 80}, "kept_ratio": {"errors": 0.122, "slow": 0.119}}
|
||||
{"profile": "head10", "post": {"requests": 39840, "ok": 39078, "errors": {"500": 762}, "seconds": 30, "ok_rps": 1302.6, "error_ratio": 0.0191, "p50_ms": 21.48, "p95_ms": 79.8, "p99_ms": 622.79}, "docker_stats": {"worker": {"avg_cpu_percent": 1.3, "peak_mem_mib": 60.2}, "api": {"avg_cpu_percent": 69.4, "peak_mem_mib": 74.0}, "otel-collector": {"avg_cpu_percent": 1.9, "peak_mem_mib": 68.9}, "tempo": {"avg_cpu_percent": 0.6, "peak_mem_mib": 755.1}, "lb": {"avg_cpu_percent": 19.9, "peak_mem_mib": 21.7}, "grafana": {"avg_cpu_percent": 1.5, "peak_mem_mib": 325.1}, "rabbitmq": {"avg_cpu_percent": 10.9, "peak_mem_mib": 194.5}, "postgres": {"avg_cpu_percent": 91.7, "peak_mem_mib": 303.6}, "loki": {"avg_cpu_percent": 4.6, "peak_mem_mib": 281.0}, "seaweedfs": {"avg_cpu_percent": 1.2, "peak_mem_mib": 494.4}, "prometheus": {"avg_cpu_percent": 0.7, "peak_mem_mib": 61.0}, "valkey": {"avg_cpu_percent": 5.0, "peak_mem_mib": 11.4}}, "collector_delta": {"receiver_accepted_spans": 9291, "receiver_accepted_log_records": 45766, "receiver_accepted_metric_points": 396, "receiver_refused_spans": 0, "exporter_sent_spans": 9458, "exporter_send_failed_spans": 0}, "tempo_bytes_delta": 32768, "loki_bytes_delta": 32833536, "errors_injected_500": 774, "slow_requests_gt500ms": 802, "traces_in_tempo": {"all_http": 4411, "error": 81, "slow_gt500ms": 93}, "kept_ratio": {"errors": 0.105, "slow": 0.116}}
|
||||
{"profile": "tail", "post": {"requests": 39275, "ok": 38469, "errors": {"500": 806}, "seconds": 30, "ok_rps": 1282.3, "error_ratio": 0.0205, "p50_ms": 23.74, "p95_ms": 86.59, "p99_ms": 631.13}, "docker_stats": {"worker": {"avg_cpu_percent": 2.1, "peak_mem_mib": 59.8}, "api": {"avg_cpu_percent": 77.1, "peak_mem_mib": 75.4}, "otel-collector": {"avg_cpu_percent": 4.6, "peak_mem_mib": 105.8}, "tempo": {"avg_cpu_percent": 0.8, "peak_mem_mib": 719.9}, "lb": {"avg_cpu_percent": 19.7, "peak_mem_mib": 22.0}, "grafana": {"avg_cpu_percent": 1.0, "peak_mem_mib": 325.2}, "rabbitmq": {"avg_cpu_percent": 12.5, "peak_mem_mib": 185.8}, "postgres": {"avg_cpu_percent": 93.0, "peak_mem_mib": 302.7}, "loki": {"avg_cpu_percent": 5.8, "peak_mem_mib": 312.2}, "seaweedfs": {"avg_cpu_percent": 1.4, "peak_mem_mib": 494.4}, "prometheus": {"avg_cpu_percent": 0.6, "peak_mem_mib": 60.9}, "valkey": {"avg_cpu_percent": 5.1, "peak_mem_mib": 11.4}}, "collector_delta": {"receiver_accepted_spans": 91490, "receiver_accepted_log_records": 45024, "receiver_accepted_metric_points": 396, "receiver_refused_spans": 0, "exporter_sent_spans": 13023, "exporter_send_failed_spans": 0}, "tempo_bytes_delta": 401408, "loki_bytes_delta": 34607104, "errors_injected_500": 818, "slow_requests_gt500ms": 793, "traces_in_tempo": {"all_http": 5000, "error": 907, "slow_gt500ms": 883}, "kept_ratio": {"errors": 1.109, "slow": 1.113}}
|
||||
{"profile": "tail", "post": {"requests": 39821, "ok": 38989, "errors": {"500": 832}, "seconds": 30, "ok_rps": 1299.6, "error_ratio": 0.0209, "p50_ms": 23.35, "p95_ms": 93.86, "p99_ms": 626.16}, "docker_stats": {"worker": {"avg_cpu_percent": 1.3, "peak_mem_mib": 64.2}, "api": {"avg_cpu_percent": 77.7, "peak_mem_mib": 75.5}, "otel-collector": {"avg_cpu_percent": 3.4, "peak_mem_mib": 108.4}, "tempo": {"avg_cpu_percent": 1.9, "peak_mem_mib": 443.0}, "lb": {"avg_cpu_percent": 18.6, "peak_mem_mib": 21.6}, "grafana": {"avg_cpu_percent": 0.7, "peak_mem_mib": 325.1}, "rabbitmq": {"avg_cpu_percent": 9.5, "peak_mem_mib": 175.5}, "postgres": {"avg_cpu_percent": 88.4, "peak_mem_mib": 303.5}, "loki": {"avg_cpu_percent": 4.3, "peak_mem_mib": 317.3}, "seaweedfs": {"avg_cpu_percent": 4.2, "peak_mem_mib": 692.3}, "prometheus": {"avg_cpu_percent": 0.5, "peak_mem_mib": 61.1}, "valkey": {"avg_cpu_percent": 4.9, "peak_mem_mib": 11.7}}, "collector_delta": {"receiver_accepted_spans": 92273, "receiver_accepted_log_records": 45427, "receiver_accepted_metric_points": 396, "receiver_refused_spans": 0, "exporter_sent_spans": 13252, "exporter_send_failed_spans": 0}, "tempo_bytes_delta": 1703936, "loki_bytes_delta": 32804864, "errors_injected_500": 837, "slow_requests_gt500ms": 743, "traces_in_tempo": {"all_http": 5000, "error": 925, "slow_gt500ms": 834}, "kept_ratio": {"errors": 1.105, "slow": 1.122}}
|
||||
saved
|
||||
exit=0
|
||||
|
||||
$ python research/plot_obs_cost.py --out evidence\recheck_2026-11-12
|
||||
saved
|
||||
exit=0
|
||||
|
||||
$ python tests/smoke.py --base-url http://127.0.0.1:8080
|
||||
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit=0
|
||||
|
||||
$ python -m unittest discover -s student-tests -p test_observability.py -v
|
||||
test_logs_are_structured_and_linked_by_trace_id (test_observability.ObservabilityTest.test_logs_are_structured_and_linked_by_trace_id) ... ok
|
||||
test_metrics_for_http_jobs_queue_pool_worker (test_observability.ObservabilityTest.test_metrics_for_http_jobs_queue_pool_worker) ... ok
|
||||
test_no_high_cardinality_or_secret_labels (test_observability.ObservabilityTest.test_no_high_cardinality_or_secret_labels) ... ok
|
||||
test_one_trace_spans_api_outbox_broker_and_worker (test_observability.ObservabilityTest.test_one_trace_spans_api_outbox_broker_and_worker) ... ok
|
||||
test_secrets_and_message_bodies_are_not_exported (test_observability.ObservabilityTest.test_secrets_and_message_bodies_are_not_exported) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 5 tests in 12.547s
|
||||
|
||||
OK
|
||||
exit=0
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"when": "after experiments and final smoke, 2026-11-12",
|
||||
"rows": {
|
||||
"users": 739,
|
||||
"chats": 425,
|
||||
"messages": 1610549,
|
||||
"attachments": 68898
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"stopped_in_order": [
|
||||
"mtusi-lab6-api-1",
|
||||
"mtusi-lab6-api-2"
|
||||
],
|
||||
"distinct_replicas": [
|
||||
"mtusi-lab6-api-1",
|
||||
"mtusi-lab6-api-2"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"datasources": [
|
||||
{
|
||||
"name": "Loki",
|
||||
"type": "loki",
|
||||
"url": "http://loki:3100"
|
||||
},
|
||||
{
|
||||
"name": "Prometheus",
|
||||
"type": "prometheus",
|
||||
"url": "http://prometheus:9090"
|
||||
},
|
||||
{
|
||||
"name": "Tempo",
|
||||
"type": "tempo",
|
||||
"url": "http://tempo:3200"
|
||||
}
|
||||
],
|
||||
"dashboard": {
|
||||
"uid": "messenger-overview",
|
||||
"title": "Messenger: API, очередь, worker",
|
||||
"provisioned": true,
|
||||
"panels": 22
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
@@ -0,0 +1,274 @@
|
||||
{
|
||||
"before": {
|
||||
"mtusi-lab6-api-1": {
|
||||
"service": "api",
|
||||
"started_at": "2026-11-12T01:25:27.883010338Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [],
|
||||
"memory_bytes": 268435456,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-api-2": {
|
||||
"service": "api",
|
||||
"started_at": "2026-11-12T01:25:28.11093455Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [],
|
||||
"memory_bytes": 268435456,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-grafana-1": {
|
||||
"service": "grafana",
|
||||
"started_at": "2026-11-12T01:21:50.391698676Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_grafanadata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-lb-1": {
|
||||
"service": "lb",
|
||||
"started_at": "2026-11-12T01:21:48.668160902Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [],
|
||||
"memory_bytes": 134217728,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-loki-1": {
|
||||
"service": "loki",
|
||||
"started_at": "2026-11-12T01:21:50.190375514Z",
|
||||
"running": true,
|
||||
"health": null,
|
||||
"volumes": [
|
||||
"mtusi-lab6_lokidata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-otel-collector-1": {
|
||||
"service": "otel-collector",
|
||||
"started_at": "2026-11-12T01:21:51.528830632Z",
|
||||
"running": true,
|
||||
"health": null,
|
||||
"volumes": [],
|
||||
"memory_bytes": 402653184,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-postgres-1": {
|
||||
"service": "postgres",
|
||||
"started_at": "2026-11-12T01:21:50.009875096Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_pgdata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-prometheus-1": {
|
||||
"service": "prometheus",
|
||||
"started_at": "2026-11-12T01:21:49.578549023Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_promdata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-rabbitmq-1": {
|
||||
"service": "rabbitmq",
|
||||
"started_at": "2026-11-12T01:21:51.306616597Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_rabbitmqdata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-seaweedfs-1": {
|
||||
"service": "seaweedfs",
|
||||
"started_at": "2026-11-12T01:21:50.815349111Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_seaweeddata"
|
||||
],
|
||||
"memory_bytes": 805306368,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-tempo-1": {
|
||||
"service": "tempo",
|
||||
"started_at": "2026-11-12T01:21:51.015757118Z",
|
||||
"running": true,
|
||||
"health": null,
|
||||
"volumes": [
|
||||
"mtusi-lab6_tempodata"
|
||||
],
|
||||
"memory_bytes": 1073741824,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-valkey-1": {
|
||||
"service": "valkey",
|
||||
"started_at": "2026-11-12T01:21:49.795208905Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_valkeydata"
|
||||
],
|
||||
"memory_bytes": 134217728,
|
||||
"nano_cpus": 500000000
|
||||
},
|
||||
"mtusi-lab6-worker-1": {
|
||||
"service": "worker",
|
||||
"started_at": "2026-11-12T01:25:27.886972662Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [],
|
||||
"memory_bytes": 805306368,
|
||||
"nano_cpus": 1000000000
|
||||
}
|
||||
},
|
||||
"after": {
|
||||
"mtusi-lab6-api-1": {
|
||||
"service": "api",
|
||||
"started_at": "2026-11-12T01:25:43.517609672Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [],
|
||||
"memory_bytes": 268435456,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-api-2": {
|
||||
"service": "api",
|
||||
"started_at": "2026-11-12T01:25:43.743154951Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [],
|
||||
"memory_bytes": 268435456,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-grafana-1": {
|
||||
"service": "grafana",
|
||||
"started_at": "2026-11-12T01:25:37.85991836Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_grafanadata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-lb-1": {
|
||||
"service": "lb",
|
||||
"started_at": "2026-11-12T01:25:36.297842763Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [],
|
||||
"memory_bytes": 134217728,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-loki-1": {
|
||||
"service": "loki",
|
||||
"started_at": "2026-11-12T01:25:37.451077579Z",
|
||||
"running": true,
|
||||
"health": null,
|
||||
"volumes": [
|
||||
"mtusi-lab6_lokidata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-otel-collector-1": {
|
||||
"service": "otel-collector",
|
||||
"started_at": "2026-11-12T01:25:39.004879376Z",
|
||||
"running": true,
|
||||
"health": null,
|
||||
"volumes": [],
|
||||
"memory_bytes": 402653184,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-postgres-1": {
|
||||
"service": "postgres",
|
||||
"started_at": "2026-11-12T01:25:37.693692485Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_pgdata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-prometheus-1": {
|
||||
"service": "prometheus",
|
||||
"started_at": "2026-11-12T01:25:37.087818096Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_promdata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-rabbitmq-1": {
|
||||
"service": "rabbitmq",
|
||||
"started_at": "2026-11-12T01:25:38.135027155Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_rabbitmqdata"
|
||||
],
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-seaweedfs-1": {
|
||||
"service": "seaweedfs",
|
||||
"started_at": "2026-11-12T01:25:38.293452184Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_seaweeddata"
|
||||
],
|
||||
"memory_bytes": 805306368,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-tempo-1": {
|
||||
"service": "tempo",
|
||||
"started_at": "2026-11-12T01:25:37.986295937Z",
|
||||
"running": true,
|
||||
"health": null,
|
||||
"volumes": [
|
||||
"mtusi-lab6_tempodata"
|
||||
],
|
||||
"memory_bytes": 1073741824,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-valkey-1": {
|
||||
"service": "valkey",
|
||||
"started_at": "2026-11-12T01:25:37.254699807Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [
|
||||
"mtusi-lab6_valkeydata"
|
||||
],
|
||||
"memory_bytes": 134217728,
|
||||
"nano_cpus": 500000000
|
||||
},
|
||||
"mtusi-lab6-worker-1": {
|
||||
"service": "worker",
|
||||
"started_at": "2026-11-12T01:25:42.656281441Z",
|
||||
"running": true,
|
||||
"health": "healthy",
|
||||
"volumes": [],
|
||||
"memory_bytes": 805306368,
|
||||
"nano_cpus": 1000000000
|
||||
}
|
||||
},
|
||||
"all_services_restarted": true,
|
||||
"volumes_preserved": true
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
@@ -0,0 +1,64 @@
|
||||
$ python tests/resilience.py --mode persistence --action-script scripts/restart.cmd --base-url http://127.0.0.1:8080
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
|
||||
$ python tests/resilience.py --mode failover --action-script scripts/stop-one.cmd --base-url http://127.0.0.1:8080
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 120, "failed_attempts": 0, "first_recovery_seconds": 2.344}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
|
||||
$ docker compose up -d --wait --no-recreate --no-deps api
|
||||
Container mtusi-lab6-api-2 Running
|
||||
Container mtusi-lab6-api-1 Starting
|
||||
Container mtusi-lab6-api-1 Started
|
||||
Container mtusi-lab6-api-1 Waiting
|
||||
Container mtusi-lab6-api-2 Waiting
|
||||
Container mtusi-lab6-api-1 Healthy
|
||||
Container mtusi-lab6-api-2 Healthy
|
||||
exit=0
|
||||
|
||||
$ python tests/resilience.py --mode failover --action-script scripts/stop-one.cmd --base-url http://127.0.0.1:8080
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 119, "failed_attempts": 0, "first_recovery_seconds": 2.344}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
|
||||
$ docker compose up -d --wait --no-recreate --no-deps api
|
||||
Container mtusi-lab6-api-1 Running
|
||||
Container mtusi-lab6-api-2 Starting
|
||||
Container mtusi-lab6-api-2 Started
|
||||
Container mtusi-lab6-api-1 Waiting
|
||||
Container mtusi-lab6-api-2 Waiting
|
||||
Container mtusi-lab6-api-1 Healthy
|
||||
Container mtusi-lab6-api-2 Healthy
|
||||
exit=0
|
||||
|
||||
$ docker compose run --rm -T s3-init
|
||||
Container mtusi-lab6-seaweedfs-1 Running
|
||||
Container mtusi-lab6-seaweedfs-1 Waiting
|
||||
Container mtusi-lab6-seaweedfs-1 Healthy
|
||||
Container mtusi-lab6-s3-init-run-ed2a1968cae4 Creating
|
||||
Container mtusi-lab6-s3-init-run-ed2a1968cae4 Created
|
||||
bucket messenger-attachments уже существует
|
||||
анонимный доступ запрещён (HTTP 403)
|
||||
ключ API ограничен одним bucket (create_bucket отклонён: AccessDenied)
|
||||
bootstrap завершён
|
||||
exit=0
|
||||
|
||||
$ docker compose run --rm -T s3-init
|
||||
Container mtusi-lab6-seaweedfs-1 Running
|
||||
Container mtusi-lab6-seaweedfs-1 Waiting
|
||||
Container mtusi-lab6-seaweedfs-1 Healthy
|
||||
Container mtusi-lab6-s3-init-run-4edec659c8c0 Creating
|
||||
Container mtusi-lab6-s3-init-run-4edec659c8c0 Created
|
||||
bucket messenger-attachments уже существует
|
||||
анонимный доступ запрещён (HTTP 403)
|
||||
ключ API ограничен одним bucket (create_bucket отклонён: AccessDenied)
|
||||
bootstrap завершён
|
||||
exit=0
|
||||
|
||||
$ python tests/smoke.py --base-url http://127.0.0.1:8080
|
||||
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit=0
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"tempo_discarded_spans_before": null,
|
||||
"tempo_discarded_spans_after": null,
|
||||
"containers": {
|
||||
"mtusi-lab6-api-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 268435456,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-api-2": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 268435456,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-grafana-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-lb-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 134217728,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-loki-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-otel-collector-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 402653184,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-postgres-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-prometheus-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-rabbitmq-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 536870912,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-seaweedfs-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 805306368,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-tempo-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 1073741824,
|
||||
"nano_cpus": 1000000000
|
||||
},
|
||||
"mtusi-lab6-valkey-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 134217728,
|
||||
"nano_cpus": 500000000
|
||||
},
|
||||
"mtusi-lab6-worker-1": {
|
||||
"running": true,
|
||||
"oom_killed": false,
|
||||
"memory_bytes": 805306368,
|
||||
"nano_cpus": 1000000000
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"base_commit": "1d908578e3ccdec8440efdf2e5135580170159aa",
|
||||
"branch": "solution/bpi2302-kushnarenko",
|
||||
"source_sha256": {
|
||||
"research/requirements.txt": "0a0f9ffaa9b56d590cb38c77f9da8dbc64f2d503b69fc27b0116b9a9594b2591",
|
||||
"src/app/s3_recovery.py": "582b56ebd579c94670f28e801b7d66aa6dab2915bcbdc57f129f18651f6aa228",
|
||||
"student-tests/README.md": "ab6c3c99ef61e14ba30037d16d51b3759d0ee02b71ecbf84b51ae941dfb3b90d",
|
||||
"student-tests/test_dependencies.py": "e152b87441d1374ce9b69d3d441d262e47890313d2ccc798f5e2cff2e3719399",
|
||||
"student-tests/test_expiry.py": "16a374ebe3df15c50c07a9fc3bc801c6c532dde3c4185b164c6aea4605923f83",
|
||||
"student-tests/test_reconcile5.py": "7df51d06fc6da180fada10d3d6e1233c9462870ec18f6d55753a36e30dca458b",
|
||||
"Dockerfile": "f1dc711cacf00e3e2bd6b4a0616c925e357446ebda370e7e5fdb3170eaecd4cb",
|
||||
"compose.yaml": "acb6f5bb7a96221a077cff4f5311125cfafb16a98e0478a48c6c47b3b974b77d",
|
||||
"infra/README.md": "33a4f7b870fd0b2bed98d46daf26d45dd7436176739672925246f8e3fe7c2278",
|
||||
"infra/grafana/build_dashboard.py": "8a1eb1a037c8aeb473cfce9610682b15c1b92f4ed85efe95e61b8f293c87debf",
|
||||
"infra/grafana/dashboards/messenger.json": "d897fa6a9ac06b05520906773cce0cba3bb5118576263bc82596d462b9b9ab94",
|
||||
"infra/grafana/provisioning/dashboards/dashboards.yaml": "f2f11fb3a1d5c78745ededf551c187994bef0d3e0fbadc1c7bae3ae4bd76c52e",
|
||||
"infra/grafana/provisioning/datasources/datasources.yaml": "fe956b90867757e930ba87022a3e77584b42949ddd814ed058d6502d64200e74",
|
||||
"infra/haproxy/haproxy.cfg": "511fb24b32740c332cd7b6ea42d3f1cf252e1452de754ff97c8e6886f3692061",
|
||||
"infra/loki/loki.yaml": "9069174e115badf13e559f2c9e8d3593603b451416737d9fa7d2724113da0bd3",
|
||||
"infra/otel/README.md": "709332a3e910f9d42cb2a44c8d24b13aff6ce0ac7b671840e3cc273ddb82d3d6",
|
||||
"infra/otel/collector-tail.yaml": "3e3b5c9a371a2f9f88d4f96a6da11630e652eeea42da7dc8386c7062c7887723",
|
||||
"infra/otel/collector.yaml": "c0931a19c3b65aa893cff72aa4528aa5bf814b64ffac563506aa0ce59cc52d78",
|
||||
"infra/prometheus/prometheus.yml": "b3c5272057d171c10f01674cc02e71f62d30c6abd4a560589cb3bc106de66294",
|
||||
"infra/prometheus/rules/messenger.yml": "370cf706c19eed8acca5e310f3b036c88ef209e30cffde019d124fad35bd3252",
|
||||
"infra/tempo/tempo.yaml": "f87d6dbc22c25e4007024ade5429a8e05a2176873da69004a8f234baa7877668",
|
||||
"requirements.txt": "3538783836e3ba370df10d9335409a77fe1576f0269fea1917d54e37926e47a7",
|
||||
"research/failover_sequence.py": "9d5dec92d067f467dc7842f9c698b39de28fb5c91902668917abaf1cceae5935",
|
||||
"research/incidents.py": "4b2cd148b3b86e3e85565d4d7a5a11ad0d798f53a1709c077bb89952d4c2a98d",
|
||||
"research/loadgen.py": "e4bee7ea46ad97822d440ea0bed35e36615ae60158ab4bc770179079a7558303",
|
||||
"research/obs_cost.py": "88ecc651d0ca5d51eb5e0afafea09f12b4cd3eb91aa3400ef04eff88b502bfd0",
|
||||
"research/plot_obs_cost.py": "67e491695321a43882d9ae32645914bfe02650ee022858a43049781f3a92c1ba",
|
||||
"research/queue_overload.py": "6d0a3fdb92899a04fb1d98f5d1f4fbbb27396284dc8186266522b83c85565dbc",
|
||||
"research/rolling_update.py": "447da4a9e2161bb232669f0558d6cb15ae3f0ef181fdf563e19cd56135b58240",
|
||||
"scripts/check_contract.py": "61e300fe5c1074360418e24b4653b12f96808247a2beaf2a64859aa360f81493",
|
||||
"scripts/init-secrets.sh": "3e238e5066f323e424f26cea9e360792d8a3d55d3755742e81d130707bfe967d",
|
||||
"scripts/restart.cmd": "b4f0ada9f8b0d009a3fbaa84aecef04b6d4d0f0229c938a3a8c68ad3ba76a7f8",
|
||||
"scripts/restart.example.sh": "0328246ba75defbced992104e986fde973f63e3830d83251eced5953263e944b",
|
||||
"scripts/restart.sh": "7a567573bf3510a7d4ab5a10f656a9c3ef2f0ead1ae0802f6b4a55b800d235d0",
|
||||
"scripts/restore-replicas.sh": "4e89f3f27ab5e9c958d3716c3bb2a8323133d773617bfec4b137f1c0b40d1e97",
|
||||
"scripts/rolling-update.sh": "9663b1fe8eeda5dafdc4338105e77cf7696c117d0f4652950ae8283d50439d4d",
|
||||
"scripts/stop-one.cmd": "a12b882f0f580aa10591d167e69e01d4a5fc8c8e0520773a542b21b1aac43d39",
|
||||
"scripts/stop-one.example.sh": "1bcf34394520b89d95b7605ec56675be799eea920e83cfbba306d5dc0a6d9811",
|
||||
"scripts/stop-one.sh": "9ae4a3d75e7d857ac3c62c2d97b95282b33a30b1affbf83df6de8f88c2ffded1",
|
||||
"scripts/validate_openapi.py": "cd7a33221b1860c5d2330e52afa6cb222d375db671ae9ab379ba51a0d3a77946",
|
||||
"src/app/attachments.py": "ba4f48e2220e39e4d3dd4d04f571afc1b3bf68f1b809b2eaeff240a1da3b3329",
|
||||
"src/app/broker.py": "b68f297acd17bbd4d63b140cef06b89f73048da6d35fc6027717d54c5cf3733b",
|
||||
"src/app/config.py": "f9483cb31afd5a9be0f00e2ea71a32dd1216d5d48b4c0595ee43d31ffbfa0a61",
|
||||
"src/app/db.py": "fc6a3872f977550b2fef7cd9db9b36e1fdd8b1fc95abe77f36916d2c8422222f",
|
||||
"src/app/images.py": "3dc7434cbfbc9d4c01b95eb897c1332b2a2748dd9df88c99a7086f3e4cdf4c41",
|
||||
"src/app/main.py": "1ec3323d1edfcad9a54f8f7b62e8064daaa69555cb5cd2b87da20f7313bae954",
|
||||
"src/app/migrate.py": "cabc192ca4182af780636415a008d2dd4636dad7d3cf0f4a8a2b52a48aedaa7e",
|
||||
"src/app/outbox.py": "4255f981c059fad0dee7d355d746f53a3a1c86a8d2e7cbd9aed3e12bedb895f0",
|
||||
"src/app/passwords.py": "836fc282093058f6717eaa6374775251ed655dcd517f325dc60323a88154f261",
|
||||
"src/app/pipeline.py": "222ac87f275e4607ecdc98cdc5f68d8957fd7f68603af2d2643f3026445a3fe1",
|
||||
"src/app/reconcile.py": "c7dd35bf40e672ffe15f0e878913e17f6c6d9de3f69922b4edb38d1802330dc4",
|
||||
"src/app/replay.py": "2669b9e5fa2f6fb83dbe457f0241db166eb3e370e21d81c3e32f922060f52fa5",
|
||||
"src/app/s3.py": "86cb37980023d02e56468a355793b69a8c5f80246d36460e17f49c102385f0de",
|
||||
"src/app/s3_bootstrap.py": "216d8121d6e7b25d95b845f4deaff18fd31eeb28484e51fe4c463c646a3af0d1",
|
||||
"src/app/serve.py": "3ebe12cf8cb2dddfc7d7234bba9bd190d868cc88d02e61fe640ba51dcf115b55",
|
||||
"src/app/sessions.py": "f975eb27c50c024f3e562f755ee97bb7bfe21cf5e01cc1d347bf107971c30670",
|
||||
"src/app/telemetry.py": "16a789f79fa185598d9de9915d89e6b5275fdec819c4df78a092a7c47e952686",
|
||||
"src/app/web.py": "0c5aa4ab059a1dac64733217e143c9f96fce1f321d2727cf5580b62e04941bfd",
|
||||
"src/app/worker.py": "23024debdd22076e586d5490874de0de6167e21e472e0a83fbbc86f001e53570",
|
||||
"student-tests/fixtures/alpha.png": "1f9d6ee26fa7beb4ba179c7c38ae97f5f31e95ad9d4108267352225e6705882f",
|
||||
"student-tests/fixtures/exif_rot6.jpg": "62386265960512fd51279e40723331c6c52f81ba2325d82afc3fb14f3b332ddc",
|
||||
"student-tests/fixtures/poison.png": "2be4bea6355e83da4733b1d7f59dc985dfe22cf5d8283eea9b20871d1f43c252",
|
||||
"student-tests/fixtures/sample.jpg": "33a614b40fe6ae25fdbd99af22e7d9d3e5dbea455b36aac750de112c034a6311",
|
||||
"student-tests/fixtures/sample.png": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"student-tests/fixtures/small.png": "001e6b4538ce86cbb0c88a34a2b88c111336b8dc8825af81e0f7d9630b731e32",
|
||||
"student-tests/test_api.py": "2635113842a5b26ec1fdd98ea42fc861edb1d10895e8be6c2eff46ed73fdba9d",
|
||||
"student-tests/test_attachments.py": "441dc4c5a2d212c135a7d4326a127c95d20bdce6107a8e58fd7d3551415d59c1",
|
||||
"student-tests/test_idempotency.py": "4ee985a3ef26fefa816fdb136fa2b0644cca13d73fe3a226d1ba975a55698b5b",
|
||||
"student-tests/test_observability.py": "de61bdb52ca55c361b2394ea82e35039eca38509d3508d9918c4307ddc2336d7",
|
||||
"student-tests/test_observability_retry.py": "e38e8ab3528479ff3570af1959896571a15d18cfdf8f3761703bd6640feac999",
|
||||
"student-tests/test_pipeline.py": "1f6b031b0b67a81d4db1e09e8e334efa65a123cefd49c2fd8db05e9505834ad0",
|
||||
"student-tests/test_resilience5.py": "8906a99d9b3dbc0e47f2e963e95c5ef3c3aa7577767b6c3575eec4617ec7e23b",
|
||||
"student-tests/test_topology.py": "4401a2db10c65c41430cc0c47c37bee6aefc902880735fb489acad7ad0ff779f"
|
||||
},
|
||||
"hardware": {
|
||||
"cpu": "Intel Core i9-12900KS",
|
||||
"cores": 16,
|
||||
"logical_cpus": 24,
|
||||
"ram_bytes": 102830256128,
|
||||
"docker_cpu_count": 24,
|
||||
"docker_memory_bytes": 50392047616,
|
||||
"background_other_docker_project": true
|
||||
},
|
||||
"client_python": "3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]"
|
||||
}
|
||||
Reference in New Issue
Block a user