docs: re-measure attachments rollout on a clean tree and update report
- bench_rollout label attachments from e1f8531 (dirty: false):
replacement 8.67 s, 0 errors, 12001 messages = keys
- student_test through LB (197 passed) and failure_checks (24/24)
after verify fixes
- REPORT: upload memory ~1.2 bodies with fixed mmap threshold,
strict UTF-8 filename, env does not change attachment limits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,24 +1,30 @@
|
||||
# `make failure_checks` со своим S3 и проверками отказов вложений
|
||||
|
||||
- Дата: 2026-10-20, 22:41:37–22:43:32 UTC.
|
||||
- Commit: `d56b892` (код приложения — `116d8d3`, change `attachments`).
|
||||
- Дата: 2026-10-20, 23:22:22–23:24:14 UTC.
|
||||
- Commit: `e1f8531` (код приложения и тестов — `dba40bc`, правки по
|
||||
verify change `attachments`); незакоммичен только новый каталог
|
||||
`evidence/rollout/attachments/`.
|
||||
- Стенд отказов: проект `mtusi-lab4-failures` (PostgreSQL, Valkey, S3 с
|
||||
bootstrap, без портов хранилищ), два API на `127.0.0.1`: обычный и
|
||||
«тесный» (сроки сессии и ключа 2 с, пул 1). Рабочий стенд `mtusi-lab4`
|
||||
в это время запущен. Docker Desktop 29.8.2, Apple M3 Pro.
|
||||
bootstrap, без портов хранилищ), два API на `127.0.0.1`: обычный — с
|
||||
`MAX_UPLOAD_BYTES=1` и `MAX_IMAGE_PIXELS=1` в окружении (`LIMITS_ENV`
|
||||
в `run_failures.py`), и «тесный» (сроки сессии и ключа 2 с, пул 1).
|
||||
Рабочий стенд `mtusi-lab4` в это время запущен. Docker Desktop
|
||||
29.8.2, Apple M3 Pro.
|
||||
- Проверки отказов change `attachments` (спек `attachments`, design
|
||||
решение 12): «Запись в S3 не удалась»
|
||||
(`test_upload_with_object_storage_stopped`), «Отклонённая загрузка
|
||||
ничего не оставляет» (`test_rejected_uploads_leave_nothing`), «S3
|
||||
остановлен» (`test_object_storage_stopped`), «S3 завис»
|
||||
остановлен» (`test_object_storage_stopped`, после verify — ещё
|
||||
история с `attachment_ids` без S3), «S3 завис»
|
||||
(`test_object_storage_paused`). Hook считает вложения по статусам
|
||||
(`count-attachments`, psql) и объекты вложений в bucket стенда
|
||||
(`count-objects`, `weed shell fs.ls`).
|
||||
- Прежняя пересъёмка этого файла (commit `f57635a`, change
|
||||
`s3-storage`) была красной на 5 проверках из-за схемы `Message` без
|
||||
`attachment_ids` — ожидаемо до `attachments`; теперь все зелёные.
|
||||
- После verify добавлен `test_environment_does_not_change_limits` —
|
||||
сценарий `service-configuration` «Окружение не меняет лимит» (вне
|
||||
сверки покрытия, сценарий в докстринге).
|
||||
- Прежний снимок этого файла (commit `d56b892`) — 23 из 23; сейчас 24.
|
||||
|
||||
## Итог: код 0, 23 из 23
|
||||
## Итог: код 0, 24 из 24
|
||||
|
||||
```
|
||||
$ make failure_checks
|
||||
@@ -31,33 +37,34 @@ 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:54995 tight=http://127.0.0.1:54999
|
||||
[failure_checks] ready: api=http://127.0.0.1:59320 tight=http://127.0.0.1:59327
|
||||
[failure_checks] pytest -m fault
|
||||
student-tests/test_failures.py::test_expired_token PASSED [ 4%]
|
||||
student-tests/test_failures.py::test_use_does_not_extend_session PASSED [ 8%]
|
||||
student-tests/test_failures.py::test_token_while_database_stopped PASSED [ 13%]
|
||||
student-tests/test_failures.py::test_members_failure_rolls_back_chat PASSED [ 17%]
|
||||
student-tests/test_failures.py::test_database_stopped_and_back PASSED [ 21%]
|
||||
student-tests/test_failures.py::test_pool_exhausted PASSED [ 26%]
|
||||
student-tests/test_failures.py::test_connection_limit_reached PASSED [ 30%]
|
||||
student-tests/test_failures.py::test_pool_keeps_connections PASSED [ 34%]
|
||||
student-tests/test_failures.py::test_readiness_without_database PASSED [ 39%]
|
||||
student-tests/test_failures.py::test_readiness_without_cache PASSED [ 43%]
|
||||
student-tests/test_failures.py::test_readiness_without_object_storage[stop] PASSED [ 47%]
|
||||
student-tests/test_failures.py::test_readiness_without_object_storage[pause] PASSED [ 52%]
|
||||
student-tests/test_failures.py::test_flush_cache PASSED [ 56%]
|
||||
student-tests/test_failures.py::test_valkey_stopped PASSED [ 60%]
|
||||
student-tests/test_failures.py::test_valkey_paused PASSED [ 65%]
|
||||
student-tests/test_failures.py::test_valkey_back PASSED [ 69%]
|
||||
student-tests/test_failures.py::test_message_failure_keeps_key_free PASSED [ 73%]
|
||||
student-tests/test_failures.py::test_database_outage_keeps_key_free PASSED [ 78%]
|
||||
student-tests/test_failures.py::test_key_free_after_ttl PASSED [ 82%]
|
||||
student-tests/test_failures.py::test_upload_with_object_storage_stopped PASSED [ 86%]
|
||||
student-tests/test_failures.py::test_rejected_uploads_leave_nothing PASSED [ 91%]
|
||||
student-tests/test_failures.py::test_object_storage_stopped PASSED [ 95%]
|
||||
student-tests/test_failures.py::test_token_while_database_stopped PASSED [ 12%]
|
||||
student-tests/test_failures.py::test_members_failure_rolls_back_chat PASSED [ 16%]
|
||||
student-tests/test_failures.py::test_database_stopped_and_back PASSED [ 20%]
|
||||
student-tests/test_failures.py::test_pool_exhausted PASSED [ 25%]
|
||||
student-tests/test_failures.py::test_connection_limit_reached PASSED [ 29%]
|
||||
student-tests/test_failures.py::test_pool_keeps_connections PASSED [ 33%]
|
||||
student-tests/test_failures.py::test_readiness_without_database PASSED [ 37%]
|
||||
student-tests/test_failures.py::test_readiness_without_cache PASSED [ 41%]
|
||||
student-tests/test_failures.py::test_readiness_without_object_storage[stop] PASSED [ 45%]
|
||||
student-tests/test_failures.py::test_readiness_without_object_storage[pause] PASSED [ 50%]
|
||||
student-tests/test_failures.py::test_flush_cache PASSED [ 54%]
|
||||
student-tests/test_failures.py::test_valkey_stopped PASSED [ 58%]
|
||||
student-tests/test_failures.py::test_valkey_paused PASSED [ 62%]
|
||||
student-tests/test_failures.py::test_valkey_back PASSED [ 66%]
|
||||
student-tests/test_failures.py::test_message_failure_keeps_key_free PASSED [ 70%]
|
||||
student-tests/test_failures.py::test_database_outage_keeps_key_free PASSED [ 75%]
|
||||
student-tests/test_failures.py::test_key_free_after_ttl PASSED [ 79%]
|
||||
student-tests/test_failures.py::test_upload_with_object_storage_stopped PASSED [ 83%]
|
||||
student-tests/test_failures.py::test_rejected_uploads_leave_nothing PASSED [ 87%]
|
||||
student-tests/test_failures.py::test_object_storage_stopped PASSED [ 91%]
|
||||
student-tests/test_failures.py::test_environment_does_not_change_limits PASSED [ 95%]
|
||||
student-tests/test_failures.py::test_object_storage_paused PASSED [100%]
|
||||
================ 23 passed, 196 deselected in 95.64s (0:01:35) =================
|
||||
[failure_checks] postgres log: 375 lines, crash markers 0; "too many clients" 20, "administrator command" 129
|
||||
================ 24 passed, 197 deselected in 93.64s (0:01:33) =================
|
||||
[failure_checks] postgres log: 377 lines, crash markers 0; "too many clients" 20, "administrator command" 131
|
||||
[failure_checks] cleanup
|
||||
[failure_checks] results: {'fault': 0, 'postgres': 0}
|
||||
exit=0
|
||||
@@ -67,19 +74,19 @@ exit=0
|
||||
|
||||
```
|
||||
$ docker inspect -f '{{.Name}} {{.State.StartedAt}}' $(docker compose ps -q) # до
|
||||
/mtusi-lab4-api-5 2026-10-20T22:35:43.977516884Z
|
||||
/mtusi-lab4-api-6 2026-10-20T22:36:34.974230921Z
|
||||
/mtusi-lab4-haproxy-1 2026-10-20T22:32:07.873866047Z
|
||||
/mtusi-lab4-postgres-1 2026-10-20T22:31:42.768951925Z
|
||||
/mtusi-lab4-s3-1 2026-10-20T22:31:57.790816751Z
|
||||
/mtusi-lab4-valkey-1 2026-10-20T22:31:42.807267216Z
|
||||
/mtusi-lab4-api-7 2026-10-20T23:20:24.831729764Z
|
||||
/mtusi-lab4-api-8 2026-10-20T23:20:24.757192264Z
|
||||
/mtusi-lab4-haproxy-1 2026-10-20T23:20:24.889181597Z
|
||||
/mtusi-lab4-postgres-1 2026-10-20T23:20:15.037524634Z
|
||||
/mtusi-lab4-s3-1 2026-10-20T23:20:15.099371842Z
|
||||
/mtusi-lab4-valkey-1 2026-10-20T23:20:15.166031342Z
|
||||
$ docker inspect -f '{{.Name}} {{.State.StartedAt}}' $(docker compose ps -q) # после
|
||||
/mtusi-lab4-api-5 2026-10-20T22:35:43.977516884Z
|
||||
/mtusi-lab4-api-6 2026-10-20T22:36:34.974230921Z
|
||||
/mtusi-lab4-haproxy-1 2026-10-20T22:32:07.873866047Z
|
||||
/mtusi-lab4-postgres-1 2026-10-20T22:31:42.768951925Z
|
||||
/mtusi-lab4-s3-1 2026-10-20T22:31:57.790816751Z
|
||||
/mtusi-lab4-valkey-1 2026-10-20T22:31:42.807267216Z
|
||||
/mtusi-lab4-api-7 2026-10-20T23:20:24.831729764Z
|
||||
/mtusi-lab4-api-8 2026-10-20T23:20:24.757192264Z
|
||||
/mtusi-lab4-haproxy-1 2026-10-20T23:20:24.889181597Z
|
||||
/mtusi-lab4-postgres-1 2026-10-20T23:20:15.037524634Z
|
||||
/mtusi-lab4-s3-1 2026-10-20T23:20:15.099371842Z
|
||||
/mtusi-lab4-valkey-1 2026-10-20T23:20:15.166031342Z
|
||||
left: containers 0, volumes 0
|
||||
```
|
||||
|
||||
@@ -100,7 +107,12 @@ left: containers 0, volumes 0
|
||||
объектов в bucket не изменились (перед этим одна настоящая загрузка:
|
||||
счётчики ненулевые).
|
||||
- «S3 остановлен»: скачивание 503, метаданные 200 (равны ответу
|
||||
загрузки), сообщение с этим вложением 201, `/health/ready` 200; после
|
||||
`start` скачивание — те же байты.
|
||||
загрузки), сообщение с этим вложением 201, история чата — 200 с этим
|
||||
сообщением и его `attachment_ids`, `/health/ready` 200; после `start`
|
||||
скачивание — те же байты.
|
||||
- «S3 завис» (`docker pause`): загрузка и скачивание — 503 не позже
|
||||
5 с + 0,6 с; после `unpause` скачивание — те же байты.
|
||||
- «Окружение не меняет лимит»: тест сверяет, что обычный API запущен с
|
||||
`MAX_UPLOAD_BYTES=1` и `MAX_IMAGE_PIXELS=1` (`FAULT_LIMITS_ENV`), и
|
||||
загружает `sample.png` (111 817 байт, 64 000 пикселей) — 201: лимиты
|
||||
вложений — константы контракта.
|
||||
|
||||
Reference in New Issue
Block a user