- evidence/s3: bootstrap, privacy (make s3_check), gRPC without token, restart and SIGKILL, client failures, memory of 20 concurrent uploads - evidence/tests: failure_checks with own S3, test_isolated prefix cleanup (red tests: no attachment_ids until attachments) - REPORT.md: S3 role, services table, bootstrap, readiness dependencies, skeleton S3_* names, evidence rows, limitations - refine expected-red counts in tasks, design and PLAN Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5.0 KiB
make failure_checks со своим S3
- Дата: 2026-10-20, 17:21:58–17:23:29 UTC.
- Commit:
2e997f9. - Стенд отказов: проект
mtusi-lab4-failures(Postgres, Valkey, S3 с bootstrap, без портов хранилищ), два API на127.0.0.1. Рабочий стендmtusi-lab4в это время запущен. Docker Desktop 29.8.2, Apple M3 Pro. - Новая проверка change
s3-storage—test_readiness_without_object_storage: спекhealth, «Хранилище объектов недоступно».
Итог: код 2, пять красных — ожидаемо до change attachments
Красны 5 проверок из уточнённого списка в шапке tasks.md change
s3-storage, у всех одна причина:
5 E AssertionError: Message schema: /: 'attachment_ids' is a required property
Контракт лабы 4 требует поле attachment_ids в Message, а код лабы 3
его не отдаёт (в src/ поля нет). Эти тесты проверяют схему ответа на
отправку сообщения. Чинит change attachments (ответ пользователя
2026-10-20, PLAN.md, s3-storage, «Вопросы», п. 2), там этот файл
переснимается зелёным. S3 и стенд отказов здесь ни при чём: остальные
13 проверок, включая новую, прошли.
Вывод (строки оркестратора и pytest)
$ make failure_checks
[failure_checks] project=mtusi-lab4-failures (working stand: mtusi-lab4)
[failure_checks] build image
[failure_checks] start postgres, valkey and s3
[failure_checks] migrations
[failure_checks] s3 bootstrap
s3-bootstrap-1 | s3-bootstrap: bucket messenger created
s3-bootstrap-1 | s3-bootstrap: user api created
s3-bootstrap-1 | s3-bootstrap: checks passed (api key put/get/delete; api key list and bucket create, anonymous get and list denied)
[failure_checks] start api containers
[failure_checks] ready: api=http://127.0.0.1:59374 tight=http://127.0.0.1:59382
[failure_checks] pytest -m fault
student-tests/test_failures.py::test_expired_token PASSED [ 5%]
student-tests/test_failures.py::test_use_does_not_extend_session PASSED [ 11%]
student-tests/test_failures.py::test_token_while_database_stopped PASSED [ 16%]
student-tests/test_failures.py::test_members_failure_rolls_back_chat PASSED [ 22%]
student-tests/test_failures.py::test_database_stopped_and_back FAILED [ 27%]
student-tests/test_failures.py::test_pool_exhausted PASSED [ 33%]
student-tests/test_failures.py::test_connection_limit_reached PASSED [ 38%]
student-tests/test_failures.py::test_pool_keeps_connections PASSED [ 44%]
student-tests/test_failures.py::test_readiness_without_database PASSED [ 50%]
student-tests/test_failures.py::test_readiness_without_cache PASSED [ 55%]
student-tests/test_failures.py::test_readiness_without_object_storage PASSED [ 61%]
student-tests/test_failures.py::test_flush_cache PASSED [ 66%]
student-tests/test_failures.py::test_valkey_stopped FAILED [ 72%]
student-tests/test_failures.py::test_valkey_paused PASSED [ 77%]
student-tests/test_failures.py::test_valkey_back PASSED [ 83%]
student-tests/test_failures.py::test_message_failure_keeps_key_free FAILED [ 88%]
student-tests/test_failures.py::test_database_outage_keeps_key_free FAILED [ 94%]
student-tests/test_failures.py::test_key_free_after_ttl FAILED [100%]
=========== 5 failed, 13 passed, 142 deselected in 69.48s (0:01:09) ============
[failure_checks] postgres log: 380 lines, crash markers 0; "too many clients" 25, "administrator command" 129
[failure_checks] last 50 lines of mtusi-lab4-failures-api
[failure_checks] last 50 lines of mtusi-lab4-failures-api-tight
[failure_checks] cleanup
[failure_checks] results: {'fault': 1, 'postgres': 0}
exit=2
Журналы API стенда отказов, которые печатает оркестратор, здесь опущены.
Уборка и рабочий стенд
working stand StartedAt unchanged
left: containers 0, volumes 0
StartedAtвсех контейнеровmtusi-lab4до и после прогона совпали.- У проекта
mtusi-lab4-failuresне осталось ни контейнеров, ни volumes, включая volume S3.
Новая проверка
test_readiness_without_object_storage: hook останавливает s3 стенда
отказов (stop_grace_period: 2s). GET /health/ready и GET /health/live отвечают 200 {"status": "ok"} быстрее 1 с, после этого
s3 запускается снова. Отдельный прогон make failure_checks FAULT_ARGS='-k object_storage' в apply: 1 passed, код 0, стенд отказов
убран, у рабочего стенда прежний StartedAt.