forked from mtusi2026/mtusi2026lab4
lab4: доказательства из чистого clone, REPORT, текст PR
Прогон scripts/collect_evidence.py на свежем clone (f9f5ab9) + повтор своих тестов,
публичных проверок и замера стоимости после найденных им исправлений.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6fb70de7ff
commit
85ca984ab8
@@ -83,3 +83,174 @@ Readiness-критичные зависимости: PostgreSQL, Valkey и S3. L
|
||||
| `PENDING_GRACE_SECONDS`, `JANITOR_INTERVAL_SECONDS` | `900`, `60` | janitor незавершённых загрузок |
|
||||
| `FAULT_POINTS` | пусто | внедрение отказов в экспериментах |
|
||||
| `API_CPUS/MEMORY`, `S3_CPUS/MEMORY`, `PG_*`, `VALKEY_CPUS`, `LB_CPUS` | 1.0/512m, 1.0/1g, 2.0/1g, 0.5, 1.0 | лимиты контейнеров |
|
||||
|
||||
## Доказательства критериев
|
||||
|
||||
Стенд: Windows 10 22H2, AMD Ryzen 5 3400G (4 ядра / 8 потоков), 30 ГБ RAM, Docker Desktop 29.8.0 (WSL2), Python 3.14 на хосте, GNU make 4.4.1. Проверки выполнены 2026-10-25 **на стенде из чистого clone** (новая папка, `git clone`, пустые volumes, secrets созданы заново) одной командой `python scripts/collect_evidence.py`, коммит `f9f5ab9`. Этот прогон нашёл два дефекта (см. ниже). После исправления (коммиты `046e257`, `fc50362`, `6fb70de`) на том же стенде целиком повторены свои тесты, публичные `make test` / `test-persistence` / `test-failover` ×2 и замер стоимости обхода — [final-commit-public-checks.txt](evidence/final-commit-public-checks.txt).
|
||||
|
||||
| Критерий README | Команда / сценарий | Наблюдаемый результат | Файл |
|
||||
| --- | --- | --- | --- |
|
||||
| Чистый clone, secrets, миграции, bucket с нуля | `init_secrets.py`, `compose config --quiet`, `compose up -d --build --wait`, логи `migrate` и `s3-init` | 7 сервисов healthy / exit 0; `0001…0004: applied`; `bucket messenger-attachments: created`; образы по digest | [clean-clone.txt](evidence/clean-clone.txt) |
|
||||
| Контракт | `make check`, `make validate` | PASS, PASS | [make-check-validate-test.txt](evidence/make-check-validate-test.txt) |
|
||||
| **3:** публичный smoke (checksum, посторонний) | `make test` | `PASS: lab4 public API scenario` (и на финальном коммите) | там же, [final-commit-public-checks.txt](evidence/final-commit-public-checks.txt) |
|
||||
| **3:** S3 в стенде; метаданные в PostgreSQL, байты в приватном bucket, не в БД и не на API | `test_metadata_reveals_no_storage_details`, `test_original_is_not_stored_on_api_containers`, политика compose | строка `ready` + объект `o/<hex>` того же размера в bucket; в ФС реплик нет файла такого размера; у `api` нет volume | [student-tests.txt](evidence/student-tests.txt) |
|
||||
| **3:** 201 ready, оригинал побайтно, сообщение с `attachment_ids` читают участники | `test_png_and_jpeg_roundtrip_byte_for_byte`, `test_message_with_attachments_and_history`, `scripts/demo_attachments.py` | PNG и JPEG: SHA-256 и размер совпадают; `text=""` + файл → 201; история возвращает `attachment_ids` по порядку | там же |
|
||||
| **3:** реальные PNG/JPEG ≤ 10 MiB и ≤ 40 Мпикс, MIME по содержимому, опасные filename, лимиты до чтения и декодирования | `test_size_limit_through_the_load_balancer`, `test_exactly_40_megapixels_is_accepted`, `test_pixel_limit_before_decoding`, `test_bad_content_is_415` (16 случаев), `test_bad_filename_is_400` (14) | ровно 10 485 760 байт через LB → 201, +1 байт → 413 за < 5 с, chunked сверх лимита → 413; 8000×5000 → 201; 20000×10000 / 8001×5000 / JPEG 400 Мпикс → 413 за < 2 с | там же |
|
||||
| **3:** upload → остановка обслужившей реплики → download через другую | `test_upload_survives_failover_of_the_serving_replica`, `make test-failover` ×2 | после SIGKILL обслужившей 5 скачиваний с другой реплики — те же байты; публичный тест для `api-1` и `api-2`: 131 / 132 записи, **0 неудачных**, оригинал на месте | [test-failover.txt](evidence/test-failover.txt) |
|
||||
| **3:** restart с volumes сохраняет метаданные и оригинал | `make test-persistence ACTION_SCRIPT=scripts/restart.cmd` | PASS; новые PID и `StartedAt` у `lb`, `api-*`, `postgres`, `valkey`, **`s3`**; прежний токен, файл скачивается | [test-persistence.txt](evidence/test-persistence.txt) |
|
||||
| **4:** тесты: большой файл, повреждённое изображение, подмена MIME, чужое `attachment_id`, файл другого чата; ошибки пользователя не дают 500 | `test_attachments.py` (56 тестов) | 413 / 415 / 400 / 404 по контракту; `Api.call` проверяет у **каждого** ответа формат ошибки, `X-Request-Id`, `X-Instance-Id`, отсутствие stack trace | [student-tests.txt](evidence/student-tests.txt) |
|
||||
| **4:** прерывание загрузки и отказ между S3 и БД не оставляют вечных объектов; grace period | `test_consistency.py` (4), [CONSISTENCY.md](docs/CONSISTENCY.md) | обрыв и зависание тела — ничего не записано; `after_s3_put` → `pending` + объект, janitor убирает оба (grace 3 с в тесте, 900 с в стенде); `after_ready_commit` → ничего не удалено, файл скачивается; свежий `pending` не тронут | там же |
|
||||
| **4:** RAM одной загрузки ограничена; ≥ 10 одновременных загрузок с пиком памяти | `bench/upload_memory.py` (16 и 32 клиента) | см. «Эксперименты»: пик +81…113 МБ и при 16, и при 32 клиентах (4 слота), лимит 512 МБ, 0 OOM процесса API | [memory/summary.json](evidence/memory/summary.json) |
|
||||
| **4:** bootstrap идемпотентен, отдельные ограниченные ключи S3, консоль закрыта, проверка приватности вне API | логи `s3-init` (при каждом `up`), `test_bucket_is_private_outside_the_api`, `test_compose_policy_…` | anonymous GET/LIST → 403; ключ API: Read/Write да, List/CreateBucket/чужой bucket — нет; ключ reconciler: List да; повторный bootstrap — `exists, kept as is`; порты 9333/8888/8080 SeaweedFS недоступны из сети | [clean-clone.txt](evidence/clean-clone.txt), [student-tests.txt](evidence/student-tests.txt) |
|
||||
| **4:** отказ S3 | `test_s3_outage_is_503_and_text_keeps_working[stop/pause]` | readiness 503 на всех репликах (core 200), upload/download 503 за < 8 с, метаданные 200, **текст работает** (деградированный режим LB); после восстановления файл цел | там же |
|
||||
| **5:** трек 2 | `test_reconcile.py` (6), `bench/reconcile_faults.py`, `bench/reconcile_cost.py` | см. раздел «Трек 2» | [evidence/reconcile/](evidence/reconcile/) |
|
||||
| Перенесённое из lab3 | все тесты lab3 (балансировка, идемпотентность, отказы БД/Valkey, explain) | проходят без ослабления; адаптированы только списки сервисов и миграций | [student-tests.txt](evidence/student-tests.txt) |
|
||||
| Публичный генератор нагрузки | `tests/load.py --duration 30 --concurrency 4` | 5416 успешных, 0 ошибок, 180 req/s, p50/p95/p99 = 18 / 49 / 64 мс | [load.json](evidence/load.json) |
|
||||
| Свои тесты | `python -m pytest student-tests -v` | **316 passed, 4 skipped** (113 unit + 203 против стенда, 21 мин); skipped — 4 unit-теста djpeg на хосте без libjpeg-turbo, те же случаи проходят на стенде | [student-tests.txt](evidence/student-tests.txt) |
|
||||
|
||||
**Что нашёл прогон из чистого clone (`f9f5ab9`).** 314 из 316 тестов прошли, два упали:
|
||||
|
||||
1. `test_s3_outage_is_503_and_text_keeps_working[stop]`. После stop/start S3 первое скачивание получало 503: в пуле aiobotocore оставались keep-alive соединения к старому процессу, а повторов не было. Исправлено одной повторной попыткой в том же дедлайне — все операции идемпотентны по ключу ([storage.py](src/messenger/storage.py), `046e257`).
|
||||
2. `test_restart_does_not_extend_ttl`. Рестарт Valkey и обеих реплик (readiness теперь ждёт и S3) длился дольше 12-секундного TTL теста. TTL теста увеличен до 30 с.
|
||||
|
||||
Ещё дефекты нашли замеры памяти до этого прогона:
|
||||
|
||||
- семафор загрузок отпускался сразу после чтения тела, а буфер жил до конца S3 PUT. При 32 клиентах пик рос до +214 МБ при 4 слотах. Теперь слот держится до конца загрузки (`277d06f`);
|
||||
- djpeg, убитый OOM-killer'ом, давал 415 вместо 503 — исправлено;
|
||||
- PNG-валидатор копировал остаток IDAT на каждом шаге (`unconsumed_tail`) — исправлено.
|
||||
|
||||
И одну ошибку reconciler нашёл замер стоимости на том же стенде: `--apply` **без** `--verify-checksums` видел совпадающий размер и снимал карантин `checksum_mismatch` как `restored_object`, хотя сумму в этом режиме проверить не может. Теперь такой карантин снимает только проход с проверкой сумм (`6fb70de`). Тест дополнен, 6/6 тестов reconciler и smoke повторены на этом коммите — [reconcile-fix-rerun.txt](evidence/reconcile-fix-rerun.txt). Первый прогон своих тестов с двумя падениями сохранён как есть: [student-tests-first-run-f9f5ab9.txt](evidence/student-tests-first-run-f9f5ab9.txt).
|
||||
|
||||
## Проверки, на которых ловили другие работы
|
||||
|
||||
Замечания преподавателя к PR lab4 (#1–#13) других студентов, проверенные на своём стенде:
|
||||
|
||||
| Замечание к чужим PR | У нас | Где проверено |
|
||||
| --- | --- | --- |
|
||||
| PNG с корректным IHDR и мусорным IDAT (86 байт), обрезанный PNG, первые 33 байта fixture, повреждение после первых 64 KiB → 201 | 415: CRC каждого chunk, zlib до точного размера, IEND обязателен | `test_bad_content_is_415[png:*]`, unit `test_broken_png_is_415` |
|
||||
| JPEG без данных после SOS → 201 | 415: `djpeg -strict` (Pillow такой файл принимает — проверено) | `test_bad_content_is_415[jpeg: no scan data after SOS]` |
|
||||
| PNG 6–10 MiB → 413 HTML от nginx | HAProxy не ограничивает тело; ровно 10 485 760 байт → 201 через LB | `test_size_limit_through_the_load_balancer` |
|
||||
| 20000×10000 → 500 (`DecompressionBombError`) | 413 по IHDR, ничего не декодируется; 40 000 000 px принимается, 40 005 000 → 413 | `test_pixel_limit_before_decoding`, `test_exactly_40_megapixels_is_accepted` |
|
||||
| `img.load()` до проверки размера (пик 252 МБ на файле 131 КБ) | размер берётся из заголовка до чтения остального тела; растр PNG не создаётся вовсе | unit `test_png_verification_is_streaming_and_fast` (40 Мпикс < 5 с) |
|
||||
| API получает admin-ключи MinIO и создаёт bucket | у API своя пара: CreateBucket → AccessDenied (проверяет `s3-init`) | [clean-clone.txt](evidence/clean-clone.txt), `test_compose_policy_…` |
|
||||
| S3 остановлен: readiness 200 / 500 за 9 с, upload 500 / 504 | readiness 503, upload 503 за < 8 с (S3 3 с), без 500 | `test_s3_outage_…[stop/pause]` |
|
||||
| filename с C1 (U+0085) или из пробелов `%20%20%20` → 201 | 400; также `/`, `\`, NUL, TAB, U+2028, bidi U+202E, `.`, `..`, невалидный UTF-8, повтор параметра | `test_bad_filename_is_400` (14) |
|
||||
| `{"attachment_ids":[A]}`, `{"text":null,…}`, `{"text":"x","attachment_ids":null}` → 201 | 400 | `test_message_body_validation` (12) |
|
||||
| COMMIT прошёл, ответ потерян → API удаляет объект, остаётся `ready` без байтов | в обработчике компенсации нет; janitor трогает только `pending` | `test_lost_answer_after_commit_never_deletes_the_object` |
|
||||
| dry-run продолжает частичное удаление | dry-run read-only на уровне БД (`default_transaction_read_only`) и S3-обёртки; промежуточного состояния «deleting» нет | `test_detect_and_safely_fix_faults_on_both_sides` (отпечатки до/после) |
|
||||
| тело накапливается целиком, рост RAM «не доказывает потоковость» | буфер ровно `Content-Length`, число буферов ограничено слотами; замер 16 и 32 клиентов | [memory/summary.json](evidence/memory/summary.json) |
|
||||
| тест шлёт POST в чужой чат без `Idempotency-Key`; гонка считает 5xx конфликтом | все POST сообщений в своих тестах — с ключом; `Api.call` требует точный ожидаемый код | [conftest.py](student-tests/conftest.py) |
|
||||
|
||||
## Эксперименты и отказы
|
||||
|
||||
### Уровень 4: память при ≥ 10 одновременных загрузках
|
||||
|
||||
**Гипотеза:** память реплики ограничена `UPLOAD_CONCURRENCY × MAX_UPLOAD_BYTES` плюс одна полная проверка (`IMAGE_VERIFY_CONCURRENCY`) и не зависит от числа клиентов.
|
||||
|
||||
**Методика** ([bench/upload_memory.py](bench/upload_memory.py)):
|
||||
|
||||
- перед каждым сценарием реплики api пересоздаются: cgroup `memory.peak` начинается с простоя;
|
||||
- N клиентов стартуют одновременно (barrier) через LB, у каждого свой файл;
|
||||
- `memory.current` каждой реплики снимается каждые 50 мс внутри контейнера; затем читаются `memory.peak` (все процессы контейнера, включая djpeg), `VmHWM` процесса Python и `memory.events` (OOM-kill) всех контейнеров.
|
||||
|
||||
Лимит api: 1 CPU, 512 МБ, swap выключен (`memswap_limit`). Файлы: PNG 9,42 МБ из шума (не сжимается), JPEG 8000×5000 progressive 4:4:4 (0,6 МБ, самый дорогой для декодера: ~240 МБ буферов коэффициентов). Один прогон на сценарий, коммит `f9f5ab9`, сырые данные — [summary.json](evidence/memory/summary.json).
|
||||
|
||||
| Сценарий | Ответы | Пик реплик − простой (≈ 75 МБ) | Python VmHWM | OOM-kill |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| PNG ×16, 4 слота (по умолчанию) | 16 × 201, p50 3,6 с | +81 / +89 МБ | 153 МБ | 0 |
|
||||
| PNG ×**32**, 4 слота | 25 × 201, 7 × 503 «слишком много загрузок» (+Retry-After) | +80 / +113 МБ — **как при 16** | 144 / 181 МБ | 0 |
|
||||
| PNG ×32, **16 слотов** | 24 × 201, 8 × 503 «хранилище недоступно» | +209 / +193 МБ | 286 / 267 МБ | 0 |
|
||||
| JPEG 40 Мпикс ×16, verify=1 (по умолчанию) | 16 × 201 | +242 / +242 МБ (djpeg) | 108 МБ | 0 |
|
||||
| JPEG 40 Мпикс ×16, **verify=4** | 2 × 201, 14 × 503 «не хватило ресурсов» | 512 / 512 МБ (лимит) | 111 / 92 МБ | 6 / 7 (djpeg) |
|
||||
|
||||
**Выводы:**
|
||||
|
||||
- Удвоение числа клиентов при тех же 4 слотах пик не меняет; лишние клиенты быстро получают 503 с `Retry-After`, а их байты ждут в TCP-буферах, а не в процессе.
|
||||
- Повышение границы до 16 слотов поднимает пик в 2–2,5 раза и упирается уже в S3: SeaweedFS ограничивает одновременные загрузки, PUT не укладывается в дедлайн, клиент получает 503. Значит, 4 слота — разумная граница при 1 CPU.
|
||||
- Полная проверка JPEG — самая дорогая часть. При одной проверке за раз пик +242 МБ укладывается в 512 МБ. При четырёх cgroup убивает djpeg; API это переживает, отвечает 503 (а не 415 — исправлено после первого замера) и не теряет ни процесс, ни другие запросы.
|
||||
- S3 (SeaweedFS, лимит 1 ГБ, `GOMEMLIMIT=600MiB`): anon-память 386–412 МБ; `memory.current` до 1 ГБ — это page cache записанных томов.
|
||||
|
||||
**Ограничения.** Один хост и один прогон на сценарий (разброс между прогонами в моих повторах — до ±25 МБ). Клиенты на том же хосте. Python не возвращает освобождённую память ОС мгновенно, поэтому VmHWM — верхняя оценка.
|
||||
|
||||
### Отказы
|
||||
|
||||
| Воздействие | Что ожидаем | Что наблюдали | Восстановление / потеря данных |
|
||||
| --- | --- | --- | --- |
|
||||
| `docker compose stop s3` | readiness 503, вложения 503, текст работает | так и есть, загрузка 503 за < 8 с; HAProxy на `api_core` | сразу после старта S3 (с повтором соединения); потерь нет |
|
||||
| `docker compose pause s3` | то же, ответ по дедлайну, а не зависание | 503 за ≤ 3 с + запас; readiness 503 | после unpause; потерь нет |
|
||||
| сбой между PUT и COMMIT (`FAULT_POINTS=after_s3_put`) | 503, `pending` + объект, уборка после grace | так и есть, janitor убрал за ≤ 30 с при grace 3 с | мусор убран, `ready`-данные не затронуты |
|
||||
| потерян ответ после COMMIT (`after_ready_commit`) | 503, но файл цел | `ready`, объект на месте, скачивается | ничего не удалено |
|
||||
| клиент оборвал тело / застрял на середине | ничего не записано / 400 по дедлайну | 0 строк, 0 объектов; 400 с `X-Instance-Id` | — |
|
||||
| SIGKILL реплики, обслужившей загрузку | другая реплика отдаёт файл | 5/5 скачиваний, те же байты | — |
|
||||
| stop одной реплики (публичный тест) ×2 | ≤ 10 с, без потерь и дублей | 0 неудачных записей, ~6 с до первой записи после хука (время самого `docker stop` с drain) | — |
|
||||
| restart всего стенда с volumes | данные, сессия и оригинал на месте | PASS, все 6 долгоживущих контейнеров с новым PID | — |
|
||||
|
||||
## Трек 2: согласованность двух хранилищ
|
||||
|
||||
**Гипотеза.** Один повторяемый проход, который merge-join'ит упорядоченный листинг S3 и keyset-страницы `attachments` по `object_key`, находит все расхождения обеих сторон. Он безопасно исправляет их (dry-run ничего не меняет; свежие и используемые вложения не удаляются; повторный запуск идемпотентен), а стоит O(N) по запросам и O(1) по памяти. Устройство и правила — [CONSISTENCY.md](docs/CONSISTENCY.md), код — [reconcile.py](src/messenger/reconcile.py).
|
||||
|
||||
**Методика.** Ошибки внедряются напрямую в хранилища: в S3 — изнутри сети `storage` ключами API/reconciler, в PostgreSQL — через psql. Затем запускается reconciler, сохраняется каждый JSON-отчёт. Повторяется тестом ([test_reconcile.py](student-tests/test_reconcile.py), 6 тестов) и сценарием с сохранением отчётов ([bench/reconcile_faults.py](bench/reconcile_faults.py) → [evidence/reconcile/](evidence/reconcile/)). `--grace 30 --allow-small-grace`, чтобы «старое» и «свежее» различались за секунды.
|
||||
|
||||
**Результаты, сценарий A** (все виды ошибок; [faults-summary.json](evidence/reconcile/faults-summary.json)):
|
||||
|
||||
| Внедрено | dry-run | `--apply` | повторный `--apply` | состояние после |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| старый объект без строки | `orphan_object`, planned | удалён | — | объекта нет |
|
||||
| `pending` старше grace с объектом / без | `stale_intent` ×2 | удалены (объект, затем строка) | — | нет ни строк, ни объекта |
|
||||
| объект удалён под **используемым** `ready` (C) | `missing_object`, used | карантин `missing_object` | — | строка и ссылка из сообщения целы; content 404; прикрепить — 409 |
|
||||
| объект обрезан под неиспользуемым `ready` (D) | `size_mismatch` | карантин | — | content 404 |
|
||||
| тот же размер, другие байты (F, только `--verify-checksums`) | `checksum_mismatch` | карантин | — | content 404 |
|
||||
| ложный карантин у здорового объекта (E) | `restored_object` | карантин снят | — | content 200 |
|
||||
| свежий объект без строки, свежий `pending` (загрузка в процессе) | `fresh_*`, not_actionable | **не тронуты** | удалены, когда стали старше grace | — |
|
||||
| здоровые A (используется), B | нет находок | не тронуты | — | content 200 |
|
||||
| объект C возвращён «из бэкапа» | — | — | `restored_object` → карантин снят | content 200, те же байты |
|
||||
|
||||
- Dry-run: отпечаток всех строк `attachments` и список ключей bucket до и после совпали (`dry_run_changed_nothing: true`).
|
||||
- Повторный `--apply`: 0 действий по исправленным ключам.
|
||||
|
||||
**Сценарий B — прерванный `--apply`.** 2000 старых сирот; S3 ставится на паузу во время удаления:
|
||||
|
||||
- прерванный проход: exit 1, `store_unavailable`, успел удалить 440;
|
||||
- после unpause осталось 1560;
|
||||
- повторный запуск: exit 0, удалено 1562 (1560 этих + 2 сироты, оставшиеся от тестов);
|
||||
- третий запуск: 0 запланированных действий;
|
||||
- [interrupted-*.json](evidence/reconcile/).
|
||||
|
||||
Ни одна `ready`-строка за весь эксперимент не удалена.
|
||||
|
||||
**Тесты безопасности:**
|
||||
|
||||
- `test_safety_valve_refuses_mass_deletion`: при `--max-orphan-fraction` ниже доли сирот выход 3, ничего не удалено;
|
||||
- `test_store_outage_stops_the_run_without_damage[s3/postgres]`: выход 1 с JSON-отчётом;
|
||||
- `test_live_uploads_are_never_hurt_by_concurrent_apply`: 40 загрузок + сообщений идут параллельно с повторяющимся `--apply --grace 8`. Все 40 вложений `ready`, без карантина, байты на месте.
|
||||
|
||||
**Стоимость обхода** ([cost.json](evidence/reconcile/cost.json)) — синтетические согласованные вложения по 1 КиБ, dry-run, медиана 3 запусков, reconciler 1 CPU / 256 МБ:
|
||||
|
||||
| Синтетических вложений (всего объектов в bucket) | Режим | Длительность, медиана из 3 | Запросы листинга S3 | Страницы БД | Прочитано байтов |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| 1 000 (1 285) | dry-run, страница 1000 | 0,30 с | 2 | 2 | 0 |
|
||||
| 10 000 (10 285) | dry-run, страница 1000 | 1,67 с | 11 | 11 | 0 |
|
||||
| 10 000 (10 285) | dry-run, страница 100 | 2,28 с (+37 %) | 103 | 103 | 0 |
|
||||
| 10 000 (10 285) | dry-run, `--verify-checksums` | 48,4 с | 11 | 11 | 694 МБ (≈ 14 МБ/с) |
|
||||
| 50 000 (50 285) | dry-run, страница 1000 | 8,4 с | 51 | 51 | 0 |
|
||||
|
||||
Время растёт линейно: ≈ 0,17 мс на объект, ≈ 6 000 объектов/с при 1 CPU. Число запросов ровно ⌈N/страница⌉ с каждой стороны. Страница 100 даёт в 10 раз больше запросов и +37 % времени, поэтому по умолчанию страница 1000 — максимум ListObjectsV2. Проверка сумм стоит O(объёма): 694 МБ — это в основном 10-мегабайтные файлы предыдущих тестов на стенде, а не 1-килобайтная синтетика. Поэтому `--verify-checksums` — режим для редкого (например, ночного) прогона, а сверка по листингу — для частого. Память reconciler от N не зависит (лимит 256 МБ, страница хранится одна).
|
||||
|
||||
**Ограничения трека:**
|
||||
|
||||
- Время берётся из часов БД (строки) и хоста (LastModified объектов). Поэтому grace должен быть много больше расхождения часов; при одном хосте это выполняется.
|
||||
- Без `--verify-checksums` порча с тем же размером не видна; проверка сумм читает все байты и стоит O(общего объёма).
|
||||
- Reconciler не знает, «правильный» ли объект вернули из бэкапа: он проверяет размер и SHA-256 по метаданным, а значит, восстановить можно только тот же оригинал.
|
||||
- Карантин — решение для оператора, не автоматическое восстановление: байты потеряны.
|
||||
- Листинг S3 и чтение БД — не единый снимок. Гонки закрывают grace и перепроверка под `FOR UPDATE`, а не изоляция.
|
||||
|
||||
## Ограничения и следующие шаги
|
||||
|
||||
- **Один Docker-хост, один экземпляр SeaweedFS** без репликации (`000`): отказ диска хоста теряет и БД, и bucket. Бэкап `s3data` и `pgdata` должен быть согласованным по времени; reconciler найдёт расхождение после восстановления, но байты не вернёт.
|
||||
- **SeaweedFS 4.46**: S3 gRPC-порт 18333 слушает сеть `storage` вместе с 8333 (отдельного bind для него нет); сеть internal, в ней только api, s3-init и reconciler. KEK для SSE-S3 не задан: шифрования «на диске» нет (в lab4 не требуется, вопрос lab7).
|
||||
- **HTTP внутри стенда**: Basic и ключи S3 идут без TLS — допустимо для локального стенда с синтетикой, TLS/mTLS — lab7.
|
||||
- **Тело загрузки в памяти** (ограниченно): потоковой передачи в S3 через multipart нет. Причина — полная проверка изображения до записи требует весь файл. Граница — слоты; lab5 перенесёт обработку в staging + worker.
|
||||
- **Повторная загрузка того же файла** создаёт новое вложение (контракт это разрешает); дедупликации по SHA-256 нет.
|
||||
- **Проверка JPEG** принимает файлы, которые libjpeg декодирует без единого предупреждения. Редкие реальные файлы с «extraneous bytes» от кривых кодеков получат 415 — сознательная строгость.
|
||||
- **Janitor** работает в репликах API (одна за раз, advisory-замок); при большой доле мусора его стоило бы вынести в отдельный сервис, как reconciler.
|
||||
- **Замеры** — один хост и по одному прогону на сценарий памяти; выводы сделаны по крупным, повторяющимся различиям, а не по процентам.
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
# Clean clone: secrets, config, build, migrations from zero, start, versions
|
||||
# 2026-10-25T11:39:46Z, commit f9f5ab9 bench: сценарий прерванного apply на 2000 сирот, понятные подписи итогов
|
||||
|
||||
$ git status --short --branch
|
||||
## solution/bvt2302-bodanyuk...origin/solution/bvt2302-bodanyuk
|
||||
[exit 0, 0.1 s]
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe --version
|
||||
Python 3.14.6
|
||||
[exit 0, 0.0 s]
|
||||
|
||||
$ docker version --format client {{.Client.Version}} / server {{.Server.Version}}
|
||||
client 29.8.0 / server 29.8.0
|
||||
[exit 0, 0.1 s]
|
||||
|
||||
$ docker compose version
|
||||
Docker Compose version v5.5.1
|
||||
[exit 0, 0.1 s]
|
||||
|
||||
$ make --version
|
||||
GNU Make 4.4.1
|
||||
Built for Windows32
|
||||
Copyright (C) 1988-2023 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
[exit 0, 0.1 s]
|
||||
|
||||
$ python scripts/init_secrets.py
|
||||
created secrets/postgres_password
|
||||
created secrets/valkey_password
|
||||
created secrets/database_url
|
||||
created secrets/cache_url
|
||||
created secrets/s3_admin_access_key_id
|
||||
created secrets/s3_admin_secret_access_key
|
||||
created secrets/s3_api_access_key_id
|
||||
created secrets/s3_api_secret_access_key
|
||||
created secrets/s3_reconciler_access_key_id
|
||||
created secrets/s3_reconciler_secret_access_key
|
||||
[exit 0, 0.1 s]
|
||||
|
||||
$ cp .env.example .env
|
||||
|
||||
$ docker compose --env-file .env config --quiet
|
||||
|
||||
[exit 0, 0.2 s]
|
||||
|
||||
$ docker compose --env-file .env up -d --build --wait
|
||||
#1 [internal] load local bake definitions
|
||||
#1 reading from stdin 1.32kB 0.0s done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [migrate internal] load build definition from Dockerfile
|
||||
#2 transferring dockerfile: 2.90kB done
|
||||
#2 DONE 0.0s
|
||||
|
||||
#3 [api] resolve image config for docker-image://docker.io/docker/dockerfile:1
|
||||
#3 DONE 1.1s
|
||||
|
||||
#4 [migrate] docker-image://docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e
|
||||
#4 resolve docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e 0.0s done
|
||||
#4 CACHED
|
||||
|
||||
#5 [api internal] load metadata for docker.io/library/python:3.13.16-slim-bookworm@sha256:a1165e272e578941b84abc79e4ab38a0305cd12803a5c4247979ac7655f4d641
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [api internal] load .dockerignore
|
||||
#6 transferring context: 196B done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [migrate 1/9] FROM docker.io/library/python:3.13.16-slim-bookworm@sha256:a1165e272e578941b84abc79e4ab38a0305cd12803a5c4247979ac7655f4d641
|
||||
#7 resolve docker.io/library/python:3.13.16-slim-bookworm@sha256:a1165e272e578941b84abc79e4ab38a0305cd12803a5c4247979ac7655f4d641 0.0s done
|
||||
#7 DONE 0.1s
|
||||
|
||||
#8 [migrate internal] load build context
|
||||
#8 transferring context: 420.34kB 0.1s done
|
||||
#8 transferring context: 420.34kB 0.1s done
|
||||
#8 DONE 0.1s
|
||||
|
||||
#9 [api 2/9] WORKDIR /app
|
||||
#9 CACHED
|
||||
|
||||
#10 [api 5/9] RUN apt-get update && apt-get install -y --no-install-recommends libjpeg-turbo-progs=1:2.1.5-2 && rm -rf /var/lib/apt/lists/*
|
||||
#10 CACHED
|
||||
|
||||
#11 [api 3/9] COPY requirements.txt ./
|
||||
#11 CACHED
|
||||
|
||||
#12 [api 4/9] RUN pip install --root-user-action=ignore --require-hashes --no-deps -r requirements.txt
|
||||
#12 CACHED
|
||||
|
||||
#13 [api 7/9] COPY src/ ./src/
|
||||
#13 CACHED
|
||||
|
||||
#14 [api 6/9] RUN groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --no-create-home --shell /usr/sbin/nologin app
|
||||
#14 CACHED
|
||||
|
||||
#15 [api 8/9] COPY migrations/ ./migrations/
|
||||
#15 CACHED
|
||||
|
||||
#16 [api 9/9] COPY contracts/openapi.json ./contracts/openapi.json
|
||||
#16 DONE 0.0s
|
||||
|
||||
#17 [api] exporting to image
|
||||
#17 exporting layers
|
||||
#17 exporting layers 0.1s done
|
||||
#17 exporting manifest sha256:61c866ef0176db37bf16836248289c639db9adf4af46bbd1bbd6b5bf36f37d64 0.0s done
|
||||
#17 exporting config sha256:51199f0c44f5a7bb410bb7446b9c1a569b46165515f46d4065fb1fcdb4bbeb73 0.0s done
|
||||
#17 exporting attestation manifest sha256:05366afe97838405c3e894464a12615f917115bec85c16befdc5503003c1f470
|
||||
#17 ...
|
||||
|
||||
#18 [migrate] exporting to image
|
||||
#18 exporting layers 0.1s done
|
||||
#18 exporting manifest sha256:4110f2c418eaa8d2334845ca16721650556be9cf998b3763e558d1677128333e 0.0s done
|
||||
#18 exporting config sha256:fdc58a5045cb098687769b14073cec7a7867599a2eb441679c0ac97df186c22b 0.0s done
|
||||
#18 exporting attestation manifest sha256:d356c4ccd69e747feceab14426981048b02a2b0bcba8a29ad66d24ffe553177c 0.0s done
|
||||
#18 exporting manifest list sha256:cf5183dbd465657100545822d97a395adee71d05ac7e2b9d5f5f4fa25de424dc 0.0s done
|
||||
#18 naming to docker.io/library/mtusi-messenger:lab4 done
|
||||
#18 unpacking to docker.io/library/mtusi-messenger:lab4 0.1s done
|
||||
#18 DONE 0.3s
|
||||
|
||||
#17 [api] exporting to image
|
||||
#17 exporting attestation manifest sha256:05366afe97838405c3e894464a12615f917115bec85c16befdc5503003c1f470 0.0s done
|
||||
#17 exporting manifest list sha256:c438a3f95cfa71ecc8ddb2d7bda0b2f7a4b549ba73a3a45c523539d162c8f2de 0.0s done
|
||||
#17 naming to docker.io/library/mtusi-messenger:lab4 done
|
||||
#17 unpacking to docker.io/library/mtusi-messenger:lab4 0.1s done
|
||||
#17 DONE 0.4s
|
||||
|
||||
#19 [migrate] resolving provenance for metadata file
|
||||
#19 DONE 0.0s
|
||||
|
||||
#20 [api] resolving provenance for metadata file
|
||||
#20 DONE 0.0s
|
||||
Image mtusi-messenger:lab4 Building
|
||||
Image mtusi-messenger:lab4 Building
|
||||
Image mtusi-messenger:lab4 Built
|
||||
Image mtusi-messenger:lab4 Built
|
||||
Network mtusi-lab4_edge Creating
|
||||
Network mtusi-lab4_data Creating
|
||||
Volume mtusi-lab4_s3data Creating
|
||||
Network mtusi-lab4_edge Creating
|
||||
Volume mtusi-lab4_pgdata Creating
|
||||
Volume mtusi-lab4_pgdata Creating
|
||||
Network mtusi-lab4_storage Creating
|
||||
Network mtusi-lab4_storage Creating
|
||||
Volume mtusi-lab4_s3data Creating
|
||||
Network mtusi-lab4_data Creating
|
||||
Volume mtusi-lab4_valkeydata Creating
|
||||
Volume mtusi-lab4_valkeydata Creating
|
||||
Volume mtusi-lab4_s3data Created
|
||||
Volume mtusi-lab4_s3data Created
|
||||
Volume mtusi-lab4_pgdata Created
|
||||
Volume mtusi-lab4_pgdata Created
|
||||
Volume mtusi-lab4_valkeydata Created
|
||||
Volume mtusi-lab4_valkeydata Created
|
||||
Network mtusi-lab4_edge Created
|
||||
Network mtusi-lab4_edge Created
|
||||
Network mtusi-lab4_storage Created
|
||||
Network mtusi-lab4_storage Created
|
||||
Container mtusi-lab4-s3-1 Creating
|
||||
Network mtusi-lab4_data Created
|
||||
Network mtusi-lab4_data Created
|
||||
Container mtusi-lab4-valkey-1 Creating
|
||||
Container mtusi-lab4-postgres-1 Creating
|
||||
Container mtusi-lab4-valkey-1 Created
|
||||
Container mtusi-lab4-postgres-1 Created
|
||||
Container mtusi-lab4-migrate-1 Creating
|
||||
Container mtusi-lab4-s3-1 Created
|
||||
Container mtusi-lab4-migrate-1 Created
|
||||
Container mtusi-lab4-s3-init-1 Creating
|
||||
Container mtusi-lab4-s3-init-1 Created
|
||||
Container mtusi-lab4-api-2 Creating
|
||||
Container mtusi-lab4-api-1 Creating
|
||||
Container mtusi-lab4-api-2 Created
|
||||
Container mtusi-lab4-lb-1 Creating
|
||||
Container mtusi-lab4-lb-1 Created
|
||||
Container mtusi-lab4-api-1 Created
|
||||
Container mtusi-lab4-postgres-1 Starting
|
||||
Container mtusi-lab4-s3-1 Starting
|
||||
Container mtusi-lab4-valkey-1 Starting
|
||||
Container mtusi-lab4-postgres-1 Started
|
||||
Container mtusi-lab4-postgres-1 Waiting
|
||||
Container mtusi-lab4-s3-1 Started
|
||||
Container mtusi-lab4-valkey-1 Started
|
||||
Container mtusi-lab4-postgres-1 Healthy
|
||||
Container mtusi-lab4-migrate-1 Starting
|
||||
Container mtusi-lab4-migrate-1 Started
|
||||
Container mtusi-lab4-s3-1 Waiting
|
||||
Container mtusi-lab4-migrate-1 Waiting
|
||||
Container mtusi-lab4-s3-1 Healthy
|
||||
Container mtusi-lab4-migrate-1 Exited
|
||||
Container mtusi-lab4-s3-init-1 Starting
|
||||
Container mtusi-lab4-s3-init-1 Started
|
||||
Container mtusi-lab4-postgres-1 Waiting
|
||||
Container mtusi-lab4-valkey-1 Waiting
|
||||
Container mtusi-lab4-s3-1 Waiting
|
||||
Container mtusi-lab4-migrate-1 Waiting
|
||||
Container mtusi-lab4-s3-init-1 Waiting
|
||||
Container mtusi-lab4-migrate-1 Exited
|
||||
Container mtusi-lab4-s3-1 Healthy
|
||||
Container mtusi-lab4-valkey-1 Healthy
|
||||
Container mtusi-lab4-postgres-1 Healthy
|
||||
Container mtusi-lab4-s3-init-1 Exited
|
||||
Container mtusi-lab4-api-1 Starting
|
||||
Container mtusi-lab4-api-1 Started
|
||||
Container mtusi-lab4-api-2 Starting
|
||||
Container mtusi-lab4-api-2 Started
|
||||
Container mtusi-lab4-api-1 Waiting
|
||||
Container mtusi-lab4-api-2 Waiting
|
||||
Container mtusi-lab4-api-1 Healthy
|
||||
Container mtusi-lab4-api-2 Healthy
|
||||
Container mtusi-lab4-lb-1 Starting
|
||||
Container mtusi-lab4-lb-1 Started
|
||||
Container mtusi-lab4-s3-init-1 Waiting
|
||||
Container mtusi-lab4-api-1 Waiting
|
||||
Container mtusi-lab4-api-2 Waiting
|
||||
Container mtusi-lab4-postgres-1 Waiting
|
||||
Container mtusi-lab4-s3-1 Waiting
|
||||
Container mtusi-lab4-lb-1 Waiting
|
||||
Container mtusi-lab4-valkey-1 Waiting
|
||||
Container mtusi-lab4-migrate-1 Waiting
|
||||
Container mtusi-lab4-valkey-1 Healthy
|
||||
Container mtusi-lab4-migrate-1 Exited
|
||||
Container mtusi-lab4-s3-init-1 Exited
|
||||
Container mtusi-lab4-postgres-1 Healthy
|
||||
Container mtusi-lab4-s3-1 Healthy
|
||||
Container mtusi-lab4-api-1 Healthy
|
||||
Container mtusi-lab4-api-2 Healthy
|
||||
Container mtusi-lab4-lb-1 Healthy
|
||||
[exit 0, 31.3 s]
|
||||
|
||||
$ docker compose ps -a --format table {{.Service}} {{.Image}} {{.Status}}
|
||||
SERVICE IMAGE STATUS
|
||||
api mtusi-messenger:lab4 Up 12 seconds (healthy)
|
||||
api mtusi-messenger:lab4 Up 12 seconds (healthy)
|
||||
lb haproxy:3.2.26-alpine@sha256:254e6370f01cd654e0744edf607c67f33777c1b6a9dc0d4b28bcba7171460122 Up 5 seconds (healthy)
|
||||
migrate mtusi-messenger:lab4 Exited (0) 18 seconds ago
|
||||
postgres postgres:18.6-bookworm@sha256:afc7e2d441324c0388fa80c3d24f733b4194a4eb7f47dd8ee2b08eb1a24a647c Up 25 seconds (healthy)
|
||||
s3 chrislusf/seaweedfs:4.46@sha256:08d516132314207d10c8e37cbffc1f32b147d870169688734cc61c6231625b62 Up 25 seconds (healthy)
|
||||
s3-init mtusi-messenger:lab4 Exited (0) 12 seconds ago
|
||||
valkey valkey/valkey:8.1.3-bookworm@sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571 Up 25 seconds (healthy)
|
||||
[exit 0, 0.3 s]
|
||||
|
||||
$ docker compose logs --no-log-prefix migrate
|
||||
migrate: 0001_init: applied
|
||||
migrate: 0002_idempotency_keys: applied
|
||||
migrate: 0003_post_message_function: applied
|
||||
migrate: 0004_attachments: applied
|
||||
migrate: done, 4 migration file(s) checked
|
||||
[exit 0, 0.3 s]
|
||||
|
||||
$ docker compose logs --no-log-prefix s3-init
|
||||
s3-bootstrap: bucket messenger-attachments: created
|
||||
s3-bootstrap: sentinel health/sentinel: written
|
||||
s3-bootstrap: anonymous GET object: HTTP 403 -> refused
|
||||
s3-bootstrap: anonymous LIST bucket: HTTP 403 -> refused
|
||||
s3-bootstrap: api: read object: allowed -> OK
|
||||
s3-bootstrap: api: write object: allowed -> OK
|
||||
s3-bootstrap: api: delete object: allowed -> OK
|
||||
s3-bootstrap: api: list bucket: refused (AccessDenied) -> OK
|
||||
s3-bootstrap: api: create bucket: refused (AccessDenied) -> OK
|
||||
s3-bootstrap: api: read object of another bucket: refused (403) -> OK
|
||||
s3-bootstrap: reconciler: list bucket: allowed -> OK
|
||||
s3-bootstrap: reconciler: create bucket: refused (AccessDenied) -> OK
|
||||
s3-bootstrap: api: buckets visible in ListBuckets: [] -> OK
|
||||
s3-bootstrap: done: private bucket, least-privilege keys verified
|
||||
[exit 0, 0.3 s]
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lbctl.py replicas
|
||||
mtusi-lab4-api-1 X-Instance-Id=8691c30aa702 running health=healthy pid=28760 started=2026-10-25T11:40:06.635 ip=172.25.0.2,172.26.0.3,172.27.0.4
|
||||
mtusi-lab4-api-2 X-Instance-Id=4026e296947c running health=healthy pid=28857 started=2026-10-25T11:40:07.085 ip=172.25.0.3,172.26.0.4,172.27.0.5
|
||||
[exit 0, 0.5 s]
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lbctl.py status
|
||||
api1 172.25.0.2 UP mtusi-lab4-api-1 X-Instance-Id=8691c30aa702
|
||||
api2 172.25.0.3 UP mtusi-lab4-api-2 X-Instance-Id=4026e296947c
|
||||
(other slots: MAINT, no container)
|
||||
[exit 0, 0.7 s]
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe -m venv .venv
|
||||
|
||||
[exit 0, 6.9 s]
|
||||
|
||||
$ C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe -m pip install -q --require-hashes --no-deps -r requirements.txt
|
||||
|
||||
[notice] A new release of pip is available: 26.1.2 -> 26.2.2
|
||||
[notice] To update, run: C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe -m pip install --upgrade pip
|
||||
[exit 0, 21.2 s]
|
||||
|
||||
$ C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe -m pip install -q -r requirements-test.txt -r requirements-dev.txt
|
||||
|
||||
[notice] A new release of pip is available: 26.1.2 -> 26.2.2
|
||||
[notice] To update, run: C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe -m pip install --upgrade pip
|
||||
[exit 0, 14.0 s]
|
||||
@@ -0,0 +1,16 @@
|
||||
# Public checks repeated on the final commit fc50362 after the fixes (2026-10-25T12:34:34Z)
|
||||
$ make test
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
$ make test-persistence ACTION_SCRIPT=scripts/restart.cmd
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
2 API replica(s) UP in HAProxy after 0.7 s: ['0e899ebdfc56', '92fdfb319248']
|
||||
$ make test-failover ACTION_SCRIPT=scripts/stop-one.cmd
|
||||
{"observed_instances_before": 2, "successful_writes": 131, "failed_attempts": 0, "first_recovery_seconds": 5.837}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
mtusi-lab4-api-2 X-Instance-Id=0e899ebdfc56 exited health=unhealthy pid=0 started=2026-10-25T12:35:22.631 ip=-
|
||||
2 API replica(s) UP in HAProxy after 0.6 s: ['0e899ebdfc56', '92fdfb319248']
|
||||
$ make test-failover ACTION_SCRIPT=scripts/stop-one.cmd
|
||||
{"observed_instances_before": 2, "successful_writes": 133, "failed_attempts": 0, "first_recovery_seconds": 5.922}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
mtusi-lab4-api-1 X-Instance-Id=92fdfb319248 exited health=unhealthy pid=0 started=2026-10-25T12:35:22.981 ip=-
|
||||
2 API replica(s) UP in HAProxy after 0.6 s: ['0e899ebdfc56', '92fdfb319248']
|
||||
@@ -0,0 +1,328 @@
|
||||
# Lab 4: memory under 16 simultaneous uploads, reconciler faults + cost, load.py
|
||||
# 2026-10-25T12:03:36Z, commit f9f5ab9 bench: сценарий прерванного apply на 2000 сирот, понятные подписи итогов
|
||||
|
||||
$ C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe bench/upload_memory.py --output evidence/memory
|
||||
generating files ...
|
||||
{"scenario": "png-9.4MiB x16, slots=4 (default)", "settings": {"UPLOAD_CONCURRENCY": "4", "IMAGE_VERIFY_CONCURRENCY": "1"}, "clients": 16, "s3_sampled_max_mib": 548.3, "s3_anon_after_mib": 386.7, "s3_limit_mib": 1024.0, "incidents": {}, "file_mib_each": 9.42, "types": ["image/png"], "status_codes": {"201": 16}, "error_reasons": {}, "wall_seconds": 4.37, "latency_s": {"p50": 3.62, "max": 4.34}, "replicas": {"f2c108a7e1b2": {"idle_mib": 75.3, "peak_mib": 156.3, "sampled_max_mib": 156.1, "python_vmhwm_mib": 152.6, "uploads_served": 8, "limit_mib": 512.0, "peak_minus_idle_mib": 81.0}, "2e1bacf102e6": {"idle_mib": 74.5, "peak_mib": 163.2, "sampled_max_mib": 161.7, "python_vmhwm_mib": 152.9, "uploads_served": 8, "limit_mib": 512.0, "peak_minus_idle_mib": 88.7}}}
|
||||
{"scenario": "png-9.4MiB x32, slots=4 (default)", "settings": {"UPLOAD_CONCURRENCY": "4", "IMAGE_VERIFY_CONCURRENCY": "1"}, "clients": 32, "s3_sampled_max_mib": 800.5, "s3_anon_after_mib": 399.1, "s3_limit_mib": 1024.0, "incidents": {}, "file_mib_each": 9.42, "types": ["image/png"], "status_codes": {"201": 25, "503": 7}, "error_reasons": {"Слишком много одновременных загрузок, повторите позже": 7}, "wall_seconds": 6.96, "latency_s": {"p50": 4.99, "max": 6.91}, "replicas": {"5e7cbb39228d": {"idle_mib": 74.9, "peak_mib": 155.1, "sampled_max_mib": 153.6, "python_vmhwm_mib": 143.8, "uploads_served": 16, "limit_mib": 512.0, "peak_minus_idle_mib": 80.2}, "0036ead083c5": {"idle_mib": 74.6, "peak_mib": 187.5, "sampled_max_mib": 185.9, "python_vmhwm_mib": 181.2, "uploads_served": 16, "limit_mib": 512.0, "peak_minus_idle_mib": 112.9}}}
|
||||
{"scenario": "png-9.4MiB x32, slots=16 (bound raised)", "settings": {"UPLOAD_CONCURRENCY": "16", "IMAGE_VERIFY_CONCURRENCY": "1"}, "clients": 32, "s3_sampled_max_mib": 1023.9, "s3_anon_after_mib": 411.8, "s3_limit_mib": 1024.0, "incidents": {}, "file_mib_each": 9.42, "types": ["image/png"], "status_codes": {"201": 24, "503": 8}, "error_reasons": {"Хранилище файлов временно недоступно": 8}, "wall_seconds": 10.2, "latency_s": {"p50": 7.46, "max": 10.04}, "replicas": {"04b50b0bdc7f": {"idle_mib": 75.2, "peak_mib": 284.6, "sampled_max_mib": 284.3, "python_vmhwm_mib": 285.9, "uploads_served": 16, "limit_mib": 512.0, "peak_minus_idle_mib": 209.4}, "f860d892caaf": {"idle_mib": 75.1, "peak_mib": 268.2, "sampled_max_mib": 265.8, "python_vmhwm_mib": 266.7, "uploads_served": 16, "limit_mib": 512.0, "peak_minus_idle_mib": 193.1}}}
|
||||
{"scenario": "jpeg-40Mpx-progressive-4:4:4 x16, verify=1 (default)", "settings": {"UPLOAD_CONCURRENCY": "4", "IMAGE_VERIFY_CONCURRENCY": "1"}, "clients": 16, "s3_sampled_max_mib": 990.1, "s3_anon_after_mib": 386.0, "s3_limit_mib": 1024.0, "incidents": {}, "file_mib_each": 0.6, "types": ["image/jpeg"], "status_codes": {"201": 16}, "error_reasons": {}, "wall_seconds": 5.77, "latency_s": {"p50": 3.58, "max": 5.74}, "replicas": {"2c78d3ce98f5": {"idle_mib": 75.0, "peak_mib": 317.1, "sampled_max_mib": 315.5, "python_vmhwm_mib": 107.5, "uploads_served": 8, "limit_mib": 512.0, "peak_minus_idle_mib": 242.1}, "2220bc508f5c": {"idle_mib": 74.7, "peak_mib": 316.5, "sampled_max_mib": 315.5, "python_vmhwm_mib": 107.2, "uploads_served": 8, "limit_mib": 512.0, "peak_minus_idle_mib": 241.8}}}
|
||||
{"scenario": "jpeg-40Mpx-progressive-4:4:4 x16, verify=4", "settings": {"UPLOAD_CONCURRENCY": "4", "IMAGE_VERIFY_CONCURRENCY": "4"}, "clients": 16, "s3_sampled_max_mib": 995.3, "s3_anon_after_mib": 386.6, "s3_limit_mib": 1024.0, "incidents": {"mtusi-lab4-api-1": "restarts=0 oom_kill=6", "mtusi-lab4-api-2": "restarts=0 oom_kill=7"}, "file_mib_each": 0.6, "types": ["image/jpeg"], "status_codes": {"201": 2, "503": 14}, "error_reasons": {"Не хватило ресурсов для проверки изображения, повторите позже": 13, "Слишком много одновременных загрузок, повторите позже": 1}, "wall_seconds": 8.15, "latency_s": {"p50": 8.12, "max": 8.12}, "replicas": {"984d6a81b4b8": {"idle_mib": 86.2, "peak_mib": 512.0, "sampled_max_mib": 511.9, "python_vmhwm_mib": 110.7, "uploads_served": 8, "limit_mib": 512.0, "peak_minus_idle_mib": 425.8}, "42f112fb4559": {"idle_mib": 74.5, "peak_mib": 512.0, "sampled_max_mib": 507.9, "python_vmhwm_mib": 92.3, "uploads_served": 8, "limit_mib": 512.0, "peak_minus_idle_mib": 437.5}}}
|
||||
{"date": "2026-10-25 15:08:28", "host": "Windows-10-10.0.19045-SP0", "cpus": 8, "commit": "f9f5ab9", "api_limits": "1000000000 536870912", "jpeg_file_mib": 0.6, "png_file_mib": 9.42}
|
||||
[exit 0, 292.6 s]
|
||||
|
||||
$ C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe bench/reconcile_faults.py --output evidence/reconcile
|
||||
{
|
||||
"dry_run_changed_nothing": true,
|
||||
"per_key": {
|
||||
"dry-run": {
|
||||
"healthy used A": null,
|
||||
"healthy unused B": null,
|
||||
"used, object deleted C": {
|
||||
"kind": "missing_object",
|
||||
"result": "planned",
|
||||
"used": true
|
||||
},
|
||||
"unused, object truncated D": {
|
||||
"kind": "size_mismatch",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"quarantined but healthy E": {
|
||||
"kind": "restored_object",
|
||||
"result": "planned",
|
||||
"used": true
|
||||
},
|
||||
"same-size corruption F": {
|
||||
"kind": "checksum_mismatch",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"old orphan object": {
|
||||
"kind": "orphan_object",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"stale intent + object": {
|
||||
"kind": "stale_intent",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"stale intent, no object": {
|
||||
"kind": "stale_intent",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"fresh orphan (in-flight)": {
|
||||
"kind": "fresh_orphan_object",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
},
|
||||
"fresh intent (in-flight)": {
|
||||
"kind": "fresh_intent",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
}
|
||||
},
|
||||
"apply": {
|
||||
"healthy used A": null,
|
||||
"healthy unused B": null,
|
||||
"used, object deleted C": {
|
||||
"kind": "missing_object",
|
||||
"result": "applied",
|
||||
"used": true
|
||||
},
|
||||
"unused, object truncated D": {
|
||||
"kind": "size_mismatch",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"quarantined but healthy E": {
|
||||
"kind": "restored_object",
|
||||
"result": "applied",
|
||||
"used": true
|
||||
},
|
||||
"same-size corruption F": {
|
||||
"kind": "checksum_mismatch",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"old orphan object": {
|
||||
"kind": "orphan_object",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"stale intent + object": {
|
||||
"kind": "stale_intent",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"stale intent, no object": {
|
||||
"kind": "stale_intent",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"fresh orphan (in-flight)": {
|
||||
"kind": "fresh_orphan_object",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
},
|
||||
"fresh intent (in-flight)": {
|
||||
"kind": "fresh_intent",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
}
|
||||
},
|
||||
"apply again": {
|
||||
"healthy used A": null,
|
||||
"healthy unused B": null,
|
||||
"used, object deleted C": null,
|
||||
"unused, object truncated D": null,
|
||||
"quarantined but healthy E": null,
|
||||
"same-size corruption F": null,
|
||||
"old orphan object": null,
|
||||
"stale intent + object": null,
|
||||
"stale intent, no object": null,
|
||||
"fresh orphan (in-flight)": {
|
||||
"kind": "fresh_orphan_object",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
},
|
||||
"fresh intent (in-flight)": {
|
||||
"kind": "fresh_intent",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
}
|
||||
},
|
||||
"after restore of C": {
|
||||
"healthy used A": null,
|
||||
"healthy unused B": null,
|
||||
"used, object deleted C": {
|
||||
"kind": "restored_object",
|
||||
"result": "applied",
|
||||
"used": true
|
||||
},
|
||||
"unused, object truncated D": null,
|
||||
"quarantined but healthy E": null,
|
||||
"same-size corruption F": null,
|
||||
"old orphan object": null,
|
||||
"stale intent + object": null,
|
||||
"stale intent, no object": null,
|
||||
"fresh orphan (in-flight)": {
|
||||
"kind": "orphan_object",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"fresh intent (in-flight)": {
|
||||
"kind": "stale_intent",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"objects_present_at_end (fresh items were older than --grace by the later runs)": {
|
||||
"healthy used A": true,
|
||||
"healthy unused B": true,
|
||||
"used, object deleted C": true,
|
||||
"unused, object truncated D": true,
|
||||
"quarantined but healthy E": true,
|
||||
"same-size corruption F": true,
|
||||
"old orphan object": false,
|
||||
"stale intent + object": false,
|
||||
"stale intent, no object": false,
|
||||
"fresh orphan (in-flight)": false,
|
||||
"fresh intent (in-flight)": false
|
||||
},
|
||||
"rows_after": {
|
||||
"C": {
|
||||
"status": "ready",
|
||||
"lost_reason": null
|
||||
},
|
||||
"D": {
|
||||
"status": "ready",
|
||||
"lost_reason": "size_mismatch"
|
||||
},
|
||||
"E": {
|
||||
"status": "ready",
|
||||
"lost_reason": null
|
||||
},
|
||||
"F": {
|
||||
"status": "ready",
|
||||
"lost_reason": "checksum_mismatch"
|
||||
},
|
||||
"A": {
|
||||
"status": "ready",
|
||||
"lost_reason": null
|
||||
},
|
||||
"B": {
|
||||
"status": "ready",
|
||||
"lost_reason": null
|
||||
}
|
||||
},
|
||||
"content_status_after": {
|
||||
"A": 200,
|
||||
"B": 200,
|
||||
"C": 200,
|
||||
"D": 404,
|
||||
"E": 200,
|
||||
"F": 404
|
||||
},
|
||||
"durations_s": [
|
||||
3.94,
|
||||
3.983,
|
||||
3.0,
|
||||
3.548
|
||||
]
|
||||
}
|
||||
{
|
||||
"orphans_injected": 2000,
|
||||
"interrupted_run": {
|
||||
"exit_code": 1,
|
||||
"error": "store_unavailable: Unavailable",
|
||||
"applied": 440
|
||||
},
|
||||
"orphans_left_after_interrupt": 1560,
|
||||
"rerun": {
|
||||
"exit_code": 0,
|
||||
"applied": 1562,
|
||||
"error": null
|
||||
},
|
||||
"third": {
|
||||
"exit_code": 0,
|
||||
"planned": 0
|
||||
},
|
||||
"orphans_left_at_end": 0
|
||||
}
|
||||
[exit 0, 182.1 s]
|
||||
|
||||
$ C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe bench/reconcile_cost.py --output evidence/reconcile
|
||||
removed 0 synthetic attachments
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\bench\reconcile_cost.py", line 155, in <module>
|
||||
sys.exit(main())
|
||||
~~~~^^
|
||||
File "C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\bench\reconcile_cost.py", line 127, in main
|
||||
add(target - present, owner, chat)
|
||||
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\bench\reconcile_cost.py", line 89, in add
|
||||
psql("INSERT INTO attachments (id, chat_id, owner_id, filename, content_type, size_bytes, sha256, width, height, "
|
||||
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
"object_key, status, created_at, updated_at) "
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
f"SELECT v.id::uuid, '{chat}', '{owner}', 'bench-reconcile', 'image/png', {len(OBJECT)}, "
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
f"decode('{SHA}', 'hex'), 1, 1, v.k, 'ready', clock_timestamp() - interval '2 hours', "
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
f"clock_timestamp() - interval '2 hours' FROM (VALUES {values}) AS v(id, k)")
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\bench\reconcile_cost.py", line 62, in psql
|
||||
return compose("exec", "-T", "postgres", "psql", "-U", "messenger", "-d", "messenger", "-At", "-v",
|
||||
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
"ON_ERROR_STOP=1", "-c", sql).stdout.strip()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\bench\reconcile_cost.py", line 57, in compose
|
||||
return subprocess.run(["docker", "compose", *args], cwd=ROOT, input=stdin, capture_output=True, text=True,
|
||||
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
encoding="utf-8", timeout=timeout, check=check)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py", line 555, in run
|
||||
with Popen(*popenargs, **kwargs) as process:
|
||||
~~~~~^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py", line 1039, in __init__
|
||||
self._execute_child(args, executable, preexec_fn, close_fds,
|
||||
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
pass_fds, cwd, env,
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
...<5 lines>...
|
||||
gid, gids, uid, umask,
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
start_new_session, process_group)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py", line 1553, in _execute_child
|
||||
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
|
||||
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
|
||||
# no special security
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
...<4 lines>...
|
||||
cwd,
|
||||
^^^^
|
||||
startupinfo)
|
||||
^^^^^^^^^^^^
|
||||
FileNotFoundError: [WinError 206] Имя файла или его расширение имеет слишком большую длину
|
||||
[exit 1, 1.3 s]
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lbctl.py wait-up 2
|
||||
2 API replica(s) UP in HAProxy after 0.6 s: ['379d13a0775a', '862067d68c1c']
|
||||
[exit 0, 1.4 s]
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe tests/load.py --duration 30 --concurrency 4 --output evidence/load.json
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"elapsed_seconds": 30.091,
|
||||
"concurrency": 4,
|
||||
"successful_requests": 5416,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 179.989,
|
||||
"successful_latency_ms": {
|
||||
"p50": 17.684,
|
||||
"p95": 49.053,
|
||||
"p99": 63.81
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
[exit 0, 30.7 s]
|
||||
|
||||
$ docker compose ps -a --format table {{.Service}} {{.Status}}
|
||||
SERVICE STATUS
|
||||
api Up 3 minutes (healthy)
|
||||
api Up 3 minutes (healthy)
|
||||
lb Up 24 minutes (healthy)
|
||||
migrate Exited (0) 10 minutes ago
|
||||
postgres Up 11 minutes (healthy)
|
||||
s3 Up 6 minutes (healthy)
|
||||
s3-init Exited (0) 10 minutes ago
|
||||
valkey Up 12 minutes (healthy)
|
||||
[exit 0, 0.4 s]
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"elapsed_seconds": 30.091,
|
||||
"concurrency": 4,
|
||||
"successful_requests": 5416,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 179.989,
|
||||
"successful_latency_ms": {
|
||||
"p50": 17.684,
|
||||
"p95": 49.053,
|
||||
"p99": 63.81
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# make check, make validate (venv), make test
|
||||
# 2026-10-25T11:41:03Z, commit f9f5ab9 bench: сценарий прерванного apply на 2000 сирот, понятные подписи итогов
|
||||
|
||||
$ make check
|
||||
python scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
[exit 0, 1.3 s]
|
||||
|
||||
$ make validate PYTHON=.venv/Scripts/python.exe
|
||||
.venv/Scripts/python.exe scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
[exit 0, 2.3 s]
|
||||
|
||||
$ make test
|
||||
python tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
[exit 0, 1.3 s]
|
||||
@@ -0,0 +1,251 @@
|
||||
{
|
||||
"meta": {
|
||||
"date": "2026-10-25 15:08:28",
|
||||
"host": "Windows-10-10.0.19045-SP0",
|
||||
"cpus": 8,
|
||||
"commit": "f9f5ab9",
|
||||
"api_limits": "1000000000 536870912",
|
||||
"jpeg_file_mib": 0.6,
|
||||
"png_file_mib": 9.42
|
||||
},
|
||||
"scenarios": [
|
||||
{
|
||||
"scenario": "png-9.4MiB x16, slots=4 (default)",
|
||||
"settings": {
|
||||
"UPLOAD_CONCURRENCY": "4",
|
||||
"IMAGE_VERIFY_CONCURRENCY": "1"
|
||||
},
|
||||
"clients": 16,
|
||||
"s3_sampled_max_mib": 548.3,
|
||||
"s3_anon_after_mib": 386.7,
|
||||
"s3_limit_mib": 1024.0,
|
||||
"incidents": {},
|
||||
"file_mib_each": 9.42,
|
||||
"types": [
|
||||
"image/png"
|
||||
],
|
||||
"status_codes": {
|
||||
"201": 16
|
||||
},
|
||||
"error_reasons": {},
|
||||
"wall_seconds": 4.37,
|
||||
"latency_s": {
|
||||
"p50": 3.62,
|
||||
"max": 4.34
|
||||
},
|
||||
"replicas": {
|
||||
"f2c108a7e1b2": {
|
||||
"idle_mib": 75.3,
|
||||
"peak_mib": 156.3,
|
||||
"sampled_max_mib": 156.1,
|
||||
"python_vmhwm_mib": 152.6,
|
||||
"uploads_served": 8,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 81.0
|
||||
},
|
||||
"2e1bacf102e6": {
|
||||
"idle_mib": 74.5,
|
||||
"peak_mib": 163.2,
|
||||
"sampled_max_mib": 161.7,
|
||||
"python_vmhwm_mib": 152.9,
|
||||
"uploads_served": 8,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 88.7
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scenario": "png-9.4MiB x32, slots=4 (default)",
|
||||
"settings": {
|
||||
"UPLOAD_CONCURRENCY": "4",
|
||||
"IMAGE_VERIFY_CONCURRENCY": "1"
|
||||
},
|
||||
"clients": 32,
|
||||
"s3_sampled_max_mib": 800.5,
|
||||
"s3_anon_after_mib": 399.1,
|
||||
"s3_limit_mib": 1024.0,
|
||||
"incidents": {},
|
||||
"file_mib_each": 9.42,
|
||||
"types": [
|
||||
"image/png"
|
||||
],
|
||||
"status_codes": {
|
||||
"201": 25,
|
||||
"503": 7
|
||||
},
|
||||
"error_reasons": {
|
||||
"Слишком много одновременных загрузок, повторите позже": 7
|
||||
},
|
||||
"wall_seconds": 6.96,
|
||||
"latency_s": {
|
||||
"p50": 4.99,
|
||||
"max": 6.91
|
||||
},
|
||||
"replicas": {
|
||||
"5e7cbb39228d": {
|
||||
"idle_mib": 74.9,
|
||||
"peak_mib": 155.1,
|
||||
"sampled_max_mib": 153.6,
|
||||
"python_vmhwm_mib": 143.8,
|
||||
"uploads_served": 16,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 80.2
|
||||
},
|
||||
"0036ead083c5": {
|
||||
"idle_mib": 74.6,
|
||||
"peak_mib": 187.5,
|
||||
"sampled_max_mib": 185.9,
|
||||
"python_vmhwm_mib": 181.2,
|
||||
"uploads_served": 16,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 112.9
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scenario": "png-9.4MiB x32, slots=16 (bound raised)",
|
||||
"settings": {
|
||||
"UPLOAD_CONCURRENCY": "16",
|
||||
"IMAGE_VERIFY_CONCURRENCY": "1"
|
||||
},
|
||||
"clients": 32,
|
||||
"s3_sampled_max_mib": 1023.9,
|
||||
"s3_anon_after_mib": 411.8,
|
||||
"s3_limit_mib": 1024.0,
|
||||
"incidents": {},
|
||||
"file_mib_each": 9.42,
|
||||
"types": [
|
||||
"image/png"
|
||||
],
|
||||
"status_codes": {
|
||||
"201": 24,
|
||||
"503": 8
|
||||
},
|
||||
"error_reasons": {
|
||||
"Хранилище файлов временно недоступно": 8
|
||||
},
|
||||
"wall_seconds": 10.2,
|
||||
"latency_s": {
|
||||
"p50": 7.46,
|
||||
"max": 10.04
|
||||
},
|
||||
"replicas": {
|
||||
"04b50b0bdc7f": {
|
||||
"idle_mib": 75.2,
|
||||
"peak_mib": 284.6,
|
||||
"sampled_max_mib": 284.3,
|
||||
"python_vmhwm_mib": 285.9,
|
||||
"uploads_served": 16,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 209.4
|
||||
},
|
||||
"f860d892caaf": {
|
||||
"idle_mib": 75.1,
|
||||
"peak_mib": 268.2,
|
||||
"sampled_max_mib": 265.8,
|
||||
"python_vmhwm_mib": 266.7,
|
||||
"uploads_served": 16,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 193.1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scenario": "jpeg-40Mpx-progressive-4:4:4 x16, verify=1 (default)",
|
||||
"settings": {
|
||||
"UPLOAD_CONCURRENCY": "4",
|
||||
"IMAGE_VERIFY_CONCURRENCY": "1"
|
||||
},
|
||||
"clients": 16,
|
||||
"s3_sampled_max_mib": 990.1,
|
||||
"s3_anon_after_mib": 386.0,
|
||||
"s3_limit_mib": 1024.0,
|
||||
"incidents": {},
|
||||
"file_mib_each": 0.6,
|
||||
"types": [
|
||||
"image/jpeg"
|
||||
],
|
||||
"status_codes": {
|
||||
"201": 16
|
||||
},
|
||||
"error_reasons": {},
|
||||
"wall_seconds": 5.77,
|
||||
"latency_s": {
|
||||
"p50": 3.58,
|
||||
"max": 5.74
|
||||
},
|
||||
"replicas": {
|
||||
"2c78d3ce98f5": {
|
||||
"idle_mib": 75.0,
|
||||
"peak_mib": 317.1,
|
||||
"sampled_max_mib": 315.5,
|
||||
"python_vmhwm_mib": 107.5,
|
||||
"uploads_served": 8,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 242.1
|
||||
},
|
||||
"2220bc508f5c": {
|
||||
"idle_mib": 74.7,
|
||||
"peak_mib": 316.5,
|
||||
"sampled_max_mib": 315.5,
|
||||
"python_vmhwm_mib": 107.2,
|
||||
"uploads_served": 8,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 241.8
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scenario": "jpeg-40Mpx-progressive-4:4:4 x16, verify=4",
|
||||
"settings": {
|
||||
"UPLOAD_CONCURRENCY": "4",
|
||||
"IMAGE_VERIFY_CONCURRENCY": "4"
|
||||
},
|
||||
"clients": 16,
|
||||
"s3_sampled_max_mib": 995.3,
|
||||
"s3_anon_after_mib": 386.6,
|
||||
"s3_limit_mib": 1024.0,
|
||||
"incidents": {
|
||||
"mtusi-lab4-api-1": "restarts=0 oom_kill=6",
|
||||
"mtusi-lab4-api-2": "restarts=0 oom_kill=7"
|
||||
},
|
||||
"file_mib_each": 0.6,
|
||||
"types": [
|
||||
"image/jpeg"
|
||||
],
|
||||
"status_codes": {
|
||||
"201": 2,
|
||||
"503": 14
|
||||
},
|
||||
"error_reasons": {
|
||||
"Не хватило ресурсов для проверки изображения, повторите позже": 13,
|
||||
"Слишком много одновременных загрузок, повторите позже": 1
|
||||
},
|
||||
"wall_seconds": 8.15,
|
||||
"latency_s": {
|
||||
"p50": 8.12,
|
||||
"max": 8.12
|
||||
},
|
||||
"replicas": {
|
||||
"984d6a81b4b8": {
|
||||
"idle_mib": 86.2,
|
||||
"peak_mib": 512.0,
|
||||
"sampled_max_mib": 511.9,
|
||||
"python_vmhwm_mib": 110.7,
|
||||
"uploads_served": 8,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 425.8
|
||||
},
|
||||
"42f112fb4559": {
|
||||
"idle_mib": 74.5,
|
||||
"peak_mib": 512.0,
|
||||
"sampled_max_mib": 507.9,
|
||||
"python_vmhwm_mib": 92.3,
|
||||
"uploads_served": 8,
|
||||
"limit_mib": 512.0,
|
||||
"peak_minus_idle_mib": 437.5
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Reconciler fix 6fb70de (checksum quarantine lifted only with --verify-checksums), 2026-10-25T12:47:16Z
|
||||
$ docker compose run --rm reconciler --apply (plain pass right after quarantining 3 leftover rows with --verify-checksums)
|
||||
findings {'fresh_intent': 2} actions {'planned': 0, 'applied': 0, 'skipped': 0, 'failed': 0}
|
||||
$ python -m pytest student-tests/test_reconcile.py -v
|
||||
student-tests/test_reconcile.py::test_detect_and_safely_fix_faults_on_both_sides PASSED [ 16%]
|
||||
student-tests/test_reconcile.py::test_checksum_mode_finds_same_size_corruption PASSED [ 33%]
|
||||
student-tests/test_reconcile.py::test_safety_valve_refuses_mass_deletion PASSED [ 50%]
|
||||
student-tests/test_reconcile.py::test_store_outage_stops_the_run_without_damage[s3] PASSED [ 66%]
|
||||
student-tests/test_reconcile.py::test_store_outage_stops_the_run_without_damage[postgres] PASSED [ 83%]
|
||||
student-tests/test_reconcile.py::test_live_uploads_are_never_hurt_by_concurrent_apply PASSED [100%]
|
||||
======================== 6 passed in 386.80s (0:06:26) ========================
|
||||
|
||||
# make test on 6fb70de (2026-10-25T12:54:03Z)
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,139 @@
|
||||
{
|
||||
"meta": {
|
||||
"date": "2026-10-25 15:45:05",
|
||||
"host": "Windows-10-10.0.19045-SP0",
|
||||
"cpus": 8,
|
||||
"commit": "fc50362",
|
||||
"object_bytes": 1024,
|
||||
"reconciler_limits": "cpus 1.0, memory 256m (compose)",
|
||||
"note": "the bucket/table also contain the attachments of earlier test runs (counted in objects/rows)"
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"synthetic": 1000,
|
||||
"label": "dry-run, page 1000",
|
||||
"args": [],
|
||||
"runs": 3,
|
||||
"duration_s_median": 0.301,
|
||||
"duration_s_all": [
|
||||
0.353,
|
||||
0.289,
|
||||
0.301
|
||||
],
|
||||
"objects": 1285,
|
||||
"rows": 1286,
|
||||
"findings": {
|
||||
"fresh_intent": 2
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 2,
|
||||
"s3_head_requests": 0,
|
||||
"s3_get_bytes": 0,
|
||||
"db_pages": 2,
|
||||
"page_size": 1000
|
||||
}
|
||||
},
|
||||
{
|
||||
"synthetic": 10000,
|
||||
"label": "dry-run, page 1000",
|
||||
"args": [],
|
||||
"runs": 3,
|
||||
"duration_s_median": 1.669,
|
||||
"duration_s_all": [
|
||||
1.669,
|
||||
1.744,
|
||||
1.653
|
||||
],
|
||||
"objects": 10285,
|
||||
"rows": 10286,
|
||||
"findings": {
|
||||
"fresh_intent": 2
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 11,
|
||||
"s3_head_requests": 0,
|
||||
"s3_get_bytes": 0,
|
||||
"db_pages": 11,
|
||||
"page_size": 1000
|
||||
}
|
||||
},
|
||||
{
|
||||
"synthetic": 10000,
|
||||
"label": "dry-run, page 100",
|
||||
"args": [
|
||||
"--page-size",
|
||||
"100"
|
||||
],
|
||||
"runs": 3,
|
||||
"duration_s_median": 2.278,
|
||||
"duration_s_all": [
|
||||
2.278,
|
||||
1.999,
|
||||
2.312
|
||||
],
|
||||
"objects": 10285,
|
||||
"rows": 10286,
|
||||
"findings": {
|
||||
"fresh_intent": 2
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 103,
|
||||
"s3_head_requests": 0,
|
||||
"s3_get_bytes": 0,
|
||||
"db_pages": 103,
|
||||
"page_size": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"synthetic": 10000,
|
||||
"label": "dry-run, --verify-checksums",
|
||||
"args": [
|
||||
"--verify-checksums"
|
||||
],
|
||||
"runs": 3,
|
||||
"duration_s_median": 48.411,
|
||||
"duration_s_all": [
|
||||
53.483,
|
||||
48.411,
|
||||
48.288
|
||||
],
|
||||
"objects": 10285,
|
||||
"rows": 10286,
|
||||
"findings": {
|
||||
"checksum_mismatch": 3,
|
||||
"fresh_intent": 2
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 11,
|
||||
"s3_head_requests": 0,
|
||||
"s3_get_bytes": 694445075,
|
||||
"db_pages": 11,
|
||||
"page_size": 1000
|
||||
}
|
||||
},
|
||||
{
|
||||
"synthetic": 50000,
|
||||
"label": "dry-run, page 1000",
|
||||
"args": [],
|
||||
"runs": 3,
|
||||
"duration_s_median": 8.435,
|
||||
"duration_s_all": [
|
||||
8.538,
|
||||
8.435,
|
||||
8.139
|
||||
],
|
||||
"objects": 50285,
|
||||
"rows": 50286,
|
||||
"findings": {
|
||||
"fresh_intent": 2
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 51,
|
||||
"s3_head_requests": 0,
|
||||
"s3_get_bytes": 0,
|
||||
"db_pages": 51,
|
||||
"page_size": 1000
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 30.0,
|
||||
"verify_checksums": true,
|
||||
"duration_seconds": 3.94,
|
||||
"error": null,
|
||||
"scanned": {
|
||||
"objects": 198,
|
||||
"rows": 199,
|
||||
"consistent": 181
|
||||
},
|
||||
"findings": {
|
||||
"orphan_object": 1,
|
||||
"stale_intent": 12,
|
||||
"missing_object": 1,
|
||||
"size_mismatch": 1,
|
||||
"checksum_mismatch": 2,
|
||||
"restored_object": 1,
|
||||
"fresh_orphan_object": 1,
|
||||
"fresh_intent": 1,
|
||||
"fresh_missing_object": 0
|
||||
},
|
||||
"used_attachments_in_findings": 2,
|
||||
"actions": {
|
||||
"planned": 18,
|
||||
"applied": 0,
|
||||
"skipped": 0,
|
||||
"failed": 0
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 1,
|
||||
"s3_head_requests": 0,
|
||||
"s3_get_bytes": 668556368,
|
||||
"db_pages": 1,
|
||||
"page_size": 1000
|
||||
},
|
||||
"samples": {
|
||||
"stale_intent": [
|
||||
{
|
||||
"key": "o/02e47f043e4a2d0fdfb8823308b5a6f8",
|
||||
"attachment_id": "445129ca-5e0a-48eb-9e9a-cb841aa3c21f",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/3738b895df9e4a2af8e83d5c31cbdb97",
|
||||
"attachment_id": "418dcc4d-a2e9-4653-8209-5a8b77f6cbba",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/3f04e9b122374a366667ec50283ff028",
|
||||
"attachment_id": "7832128b-d4b0-4128-92d0-fa4d9e998789",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/58646a726a50106dfeb7b214a0b68e45",
|
||||
"attachment_id": "8919db52-4396-46c5-99cd-13df371436fc",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/5ca75dbe045e57c0683a60a2da3b4801",
|
||||
"attachment_id": "53062ac4-cfbb-4393-944c-a2931ca2e34d",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/74c65b3fa98dc631e6f57909079c4da3",
|
||||
"attachment_id": "a71a1c20-f815-49a7-945d-e45bdd4afec3",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object absent"
|
||||
},
|
||||
{
|
||||
"key": "o/b65a274dcfc743b9b07ac223e9846546",
|
||||
"attachment_id": "723cb122-1fd3-41e5-8e7f-712e39066ae3",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/c412437db6184a939bed9283b11a94f4",
|
||||
"attachment_id": "58548b0c-4025-47c7-8377-28b85bfc1d46",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object absent"
|
||||
},
|
||||
{
|
||||
"key": "o/c5326823b48696d02dd38321e5ddedde",
|
||||
"attachment_id": "cbe8966a-bb9e-49f5-8799-fdb341929f15",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/cf65354466733e9171737583f869c0fc",
|
||||
"attachment_id": "71b2e4a6-615e-4d6c-a35c-34ac0f703662",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/d3dca5b6df5b097cfd537a6b3ffd3deb",
|
||||
"attachment_id": "ab9acee5-a57a-4698-8724-cd08431fa502",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/e8cda21ebf7a465d6687da4c0b3c7a2a",
|
||||
"attachment_id": "99d11e03-ae13-4255-b9a9-8ee8679024ff",
|
||||
"used": false,
|
||||
"result": "planned",
|
||||
"detail": "object present"
|
||||
}
|
||||
],
|
||||
"fresh_orphan_object": [
|
||||
{
|
||||
"key": "o/04232d5e57374a09b5e5368916176439",
|
||||
"attachment_id": null,
|
||||
"used": false,
|
||||
"result": "not_actionable"
|
||||
}
|
||||
],
|
||||
"fresh_intent": [
|
||||
{
|
||||
"key": "o/2a286f02c3854017886a0b371d08f2c9",
|
||||
"attachment_id": "697c1bdb-dee1-4a43-b26e-131a02cba9c6",
|
||||
"used": false,
|
||||
"result": "not_actionable",
|
||||
"detail": "object present"
|
||||
}
|
||||
],
|
||||
"size_mismatch": [
|
||||
{
|
||||
"key": "o/5be370c6443c51303e893c28529376b6",
|
||||
"attachment_id": "a65a12d5-9369-4322-93ce-62f8f8a142a0",
|
||||
"used": false,
|
||||
"result": "planned"
|
||||
}
|
||||
],
|
||||
"checksum_mismatch": [
|
||||
{
|
||||
"key": "o/77f4fbc630a1966cb3f6d4e09c019318",
|
||||
"attachment_id": "ed0ff4c7-507b-44cd-8928-622ea6e977a8",
|
||||
"used": false,
|
||||
"result": "planned"
|
||||
},
|
||||
{
|
||||
"key": "o/ee7f3d21bebb4a56572b9b1f7d2299ee",
|
||||
"attachment_id": "4c72dcfe-c46f-47a0-a442-2937c722ed99",
|
||||
"used": false,
|
||||
"result": "planned"
|
||||
}
|
||||
],
|
||||
"missing_object": [
|
||||
{
|
||||
"key": "o/ac353be8ed77f5c230f7be71809ce405",
|
||||
"attachment_id": "89e1b8ca-e554-4691-92b0-667b46757d10",
|
||||
"used": true,
|
||||
"result": "planned"
|
||||
}
|
||||
],
|
||||
"restored_object": [
|
||||
{
|
||||
"key": "o/adc1d649f5b94260bd28445fb55ac5fa",
|
||||
"attachment_id": "becdb821-076e-4bff-ada3-d0bf6823cce7",
|
||||
"used": true,
|
||||
"result": "planned"
|
||||
}
|
||||
],
|
||||
"orphan_object": [
|
||||
{
|
||||
"key": "o/d2b0819448ab4d06a1dca06df4fac200",
|
||||
"attachment_id": null,
|
||||
"used": false,
|
||||
"result": "planned"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
{
|
||||
"mode": "apply",
|
||||
"grace_seconds": 30.0,
|
||||
"verify_checksums": true,
|
||||
"duration_seconds": 3.983,
|
||||
"error": null,
|
||||
"scanned": {
|
||||
"objects": 198,
|
||||
"rows": 199,
|
||||
"consistent": 181
|
||||
},
|
||||
"findings": {
|
||||
"orphan_object": 1,
|
||||
"stale_intent": 12,
|
||||
"missing_object": 1,
|
||||
"size_mismatch": 1,
|
||||
"checksum_mismatch": 2,
|
||||
"restored_object": 1,
|
||||
"fresh_orphan_object": 1,
|
||||
"fresh_intent": 1,
|
||||
"fresh_missing_object": 0
|
||||
},
|
||||
"used_attachments_in_findings": 2,
|
||||
"actions": {
|
||||
"planned": 18,
|
||||
"applied": 18,
|
||||
"skipped": 0,
|
||||
"failed": 0
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 1,
|
||||
"s3_head_requests": 5,
|
||||
"s3_get_bytes": 668676391,
|
||||
"db_pages": 1,
|
||||
"page_size": 1000
|
||||
},
|
||||
"samples": {
|
||||
"stale_intent": [
|
||||
{
|
||||
"key": "o/02e47f043e4a2d0fdfb8823308b5a6f8",
|
||||
"attachment_id": "445129ca-5e0a-48eb-9e9a-cb841aa3c21f",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/3738b895df9e4a2af8e83d5c31cbdb97",
|
||||
"attachment_id": "418dcc4d-a2e9-4653-8209-5a8b77f6cbba",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/3f04e9b122374a366667ec50283ff028",
|
||||
"attachment_id": "7832128b-d4b0-4128-92d0-fa4d9e998789",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/58646a726a50106dfeb7b214a0b68e45",
|
||||
"attachment_id": "8919db52-4396-46c5-99cd-13df371436fc",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/5ca75dbe045e57c0683a60a2da3b4801",
|
||||
"attachment_id": "53062ac4-cfbb-4393-944c-a2931ca2e34d",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/74c65b3fa98dc631e6f57909079c4da3",
|
||||
"attachment_id": "a71a1c20-f815-49a7-945d-e45bdd4afec3",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object absent"
|
||||
},
|
||||
{
|
||||
"key": "o/b65a274dcfc743b9b07ac223e9846546",
|
||||
"attachment_id": "723cb122-1fd3-41e5-8e7f-712e39066ae3",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/c412437db6184a939bed9283b11a94f4",
|
||||
"attachment_id": "58548b0c-4025-47c7-8377-28b85bfc1d46",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object absent"
|
||||
},
|
||||
{
|
||||
"key": "o/c5326823b48696d02dd38321e5ddedde",
|
||||
"attachment_id": "cbe8966a-bb9e-49f5-8799-fdb341929f15",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/cf65354466733e9171737583f869c0fc",
|
||||
"attachment_id": "71b2e4a6-615e-4d6c-a35c-34ac0f703662",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/d3dca5b6df5b097cfd537a6b3ffd3deb",
|
||||
"attachment_id": "ab9acee5-a57a-4698-8724-cd08431fa502",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
},
|
||||
{
|
||||
"key": "o/e8cda21ebf7a465d6687da4c0b3c7a2a",
|
||||
"attachment_id": "99d11e03-ae13-4255-b9a9-8ee8679024ff",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
}
|
||||
],
|
||||
"fresh_orphan_object": [
|
||||
{
|
||||
"key": "o/04232d5e57374a09b5e5368916176439",
|
||||
"attachment_id": null,
|
||||
"used": false,
|
||||
"result": "not_actionable"
|
||||
}
|
||||
],
|
||||
"fresh_intent": [
|
||||
{
|
||||
"key": "o/2a286f02c3854017886a0b371d08f2c9",
|
||||
"attachment_id": "697c1bdb-dee1-4a43-b26e-131a02cba9c6",
|
||||
"used": false,
|
||||
"result": "not_actionable",
|
||||
"detail": "object present"
|
||||
}
|
||||
],
|
||||
"size_mismatch": [
|
||||
{
|
||||
"key": "o/5be370c6443c51303e893c28529376b6",
|
||||
"attachment_id": "a65a12d5-9369-4322-93ce-62f8f8a142a0",
|
||||
"used": false,
|
||||
"result": "applied"
|
||||
}
|
||||
],
|
||||
"checksum_mismatch": [
|
||||
{
|
||||
"key": "o/77f4fbc630a1966cb3f6d4e09c019318",
|
||||
"attachment_id": "ed0ff4c7-507b-44cd-8928-622ea6e977a8",
|
||||
"used": false,
|
||||
"result": "applied"
|
||||
},
|
||||
{
|
||||
"key": "o/ee7f3d21bebb4a56572b9b1f7d2299ee",
|
||||
"attachment_id": "4c72dcfe-c46f-47a0-a442-2937c722ed99",
|
||||
"used": false,
|
||||
"result": "applied"
|
||||
}
|
||||
],
|
||||
"missing_object": [
|
||||
{
|
||||
"key": "o/ac353be8ed77f5c230f7be71809ce405",
|
||||
"attachment_id": "89e1b8ca-e554-4691-92b0-667b46757d10",
|
||||
"used": true,
|
||||
"result": "applied"
|
||||
}
|
||||
],
|
||||
"restored_object": [
|
||||
{
|
||||
"key": "o/adc1d649f5b94260bd28445fb55ac5fa",
|
||||
"attachment_id": "becdb821-076e-4bff-ada3-d0bf6823cce7",
|
||||
"used": true,
|
||||
"result": "applied"
|
||||
}
|
||||
],
|
||||
"orphan_object": [
|
||||
{
|
||||
"key": "o/d2b0819448ab4d06a1dca06df4fac200",
|
||||
"attachment_id": null,
|
||||
"used": false,
|
||||
"result": "applied"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"mode": "apply",
|
||||
"grace_seconds": 30.0,
|
||||
"verify_checksums": true,
|
||||
"duration_seconds": 3.0,
|
||||
"error": null,
|
||||
"scanned": {
|
||||
"objects": 187,
|
||||
"rows": 187,
|
||||
"consistent": 186
|
||||
},
|
||||
"findings": {
|
||||
"orphan_object": 0,
|
||||
"stale_intent": 0,
|
||||
"missing_object": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0,
|
||||
"restored_object": 0,
|
||||
"fresh_orphan_object": 1,
|
||||
"fresh_intent": 1,
|
||||
"fresh_missing_object": 0
|
||||
},
|
||||
"used_attachments_in_findings": 0,
|
||||
"actions": {
|
||||
"planned": 0,
|
||||
"applied": 0,
|
||||
"skipped": 0,
|
||||
"failed": 0
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 1,
|
||||
"s3_head_requests": 0,
|
||||
"s3_get_bytes": 668556368,
|
||||
"db_pages": 1,
|
||||
"page_size": 1000
|
||||
},
|
||||
"samples": {
|
||||
"fresh_orphan_object": [
|
||||
{
|
||||
"key": "o/04232d5e57374a09b5e5368916176439",
|
||||
"attachment_id": null,
|
||||
"used": false,
|
||||
"result": "not_actionable"
|
||||
}
|
||||
],
|
||||
"fresh_intent": [
|
||||
{
|
||||
"key": "o/2a286f02c3854017886a0b371d08f2c9",
|
||||
"attachment_id": "697c1bdb-dee1-4a43-b26e-131a02cba9c6",
|
||||
"used": false,
|
||||
"result": "not_actionable",
|
||||
"detail": "object present"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"mode": "apply",
|
||||
"grace_seconds": 30.0,
|
||||
"verify_checksums": true,
|
||||
"duration_seconds": 3.548,
|
||||
"error": null,
|
||||
"scanned": {
|
||||
"objects": 188,
|
||||
"rows": 187,
|
||||
"consistent": 185
|
||||
},
|
||||
"findings": {
|
||||
"orphan_object": 1,
|
||||
"stale_intent": 1,
|
||||
"missing_object": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0,
|
||||
"restored_object": 1,
|
||||
"fresh_orphan_object": 0,
|
||||
"fresh_intent": 0,
|
||||
"fresh_missing_object": 0
|
||||
},
|
||||
"used_attachments_in_findings": 1,
|
||||
"actions": {
|
||||
"planned": 3,
|
||||
"applied": 3,
|
||||
"skipped": 0,
|
||||
"failed": 0
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 1,
|
||||
"s3_head_requests": 2,
|
||||
"s3_get_bytes": 668564124,
|
||||
"db_pages": 1,
|
||||
"page_size": 1000
|
||||
},
|
||||
"samples": {
|
||||
"orphan_object": [
|
||||
{
|
||||
"key": "o/04232d5e57374a09b5e5368916176439",
|
||||
"attachment_id": null,
|
||||
"used": false,
|
||||
"result": "applied"
|
||||
}
|
||||
],
|
||||
"stale_intent": [
|
||||
{
|
||||
"key": "o/2a286f02c3854017886a0b371d08f2c9",
|
||||
"attachment_id": "697c1bdb-dee1-4a43-b26e-131a02cba9c6",
|
||||
"used": false,
|
||||
"result": "applied",
|
||||
"detail": "object present"
|
||||
}
|
||||
],
|
||||
"restored_object": [
|
||||
{
|
||||
"key": "o/ac353be8ed77f5c230f7be71809ce405",
|
||||
"attachment_id": "89e1b8ca-e554-4691-92b0-667b46757d10",
|
||||
"used": true,
|
||||
"result": "applied"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
{
|
||||
"date": "2026-10-25 15:11:30",
|
||||
"commit": "f9f5ab9",
|
||||
"grace_seconds": 30,
|
||||
"scenario_a": {
|
||||
"dry_run_changed_nothing": true,
|
||||
"per_key": {
|
||||
"dry-run": {
|
||||
"healthy used A": null,
|
||||
"healthy unused B": null,
|
||||
"used, object deleted C": {
|
||||
"kind": "missing_object",
|
||||
"result": "planned",
|
||||
"used": true
|
||||
},
|
||||
"unused, object truncated D": {
|
||||
"kind": "size_mismatch",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"quarantined but healthy E": {
|
||||
"kind": "restored_object",
|
||||
"result": "planned",
|
||||
"used": true
|
||||
},
|
||||
"same-size corruption F": {
|
||||
"kind": "checksum_mismatch",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"old orphan object": {
|
||||
"kind": "orphan_object",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"stale intent + object": {
|
||||
"kind": "stale_intent",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"stale intent, no object": {
|
||||
"kind": "stale_intent",
|
||||
"result": "planned",
|
||||
"used": false
|
||||
},
|
||||
"fresh orphan (in-flight)": {
|
||||
"kind": "fresh_orphan_object",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
},
|
||||
"fresh intent (in-flight)": {
|
||||
"kind": "fresh_intent",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
}
|
||||
},
|
||||
"apply": {
|
||||
"healthy used A": null,
|
||||
"healthy unused B": null,
|
||||
"used, object deleted C": {
|
||||
"kind": "missing_object",
|
||||
"result": "applied",
|
||||
"used": true
|
||||
},
|
||||
"unused, object truncated D": {
|
||||
"kind": "size_mismatch",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"quarantined but healthy E": {
|
||||
"kind": "restored_object",
|
||||
"result": "applied",
|
||||
"used": true
|
||||
},
|
||||
"same-size corruption F": {
|
||||
"kind": "checksum_mismatch",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"old orphan object": {
|
||||
"kind": "orphan_object",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"stale intent + object": {
|
||||
"kind": "stale_intent",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"stale intent, no object": {
|
||||
"kind": "stale_intent",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"fresh orphan (in-flight)": {
|
||||
"kind": "fresh_orphan_object",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
},
|
||||
"fresh intent (in-flight)": {
|
||||
"kind": "fresh_intent",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
}
|
||||
},
|
||||
"apply again": {
|
||||
"healthy used A": null,
|
||||
"healthy unused B": null,
|
||||
"used, object deleted C": null,
|
||||
"unused, object truncated D": null,
|
||||
"quarantined but healthy E": null,
|
||||
"same-size corruption F": null,
|
||||
"old orphan object": null,
|
||||
"stale intent + object": null,
|
||||
"stale intent, no object": null,
|
||||
"fresh orphan (in-flight)": {
|
||||
"kind": "fresh_orphan_object",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
},
|
||||
"fresh intent (in-flight)": {
|
||||
"kind": "fresh_intent",
|
||||
"result": "not_actionable",
|
||||
"used": false
|
||||
}
|
||||
},
|
||||
"after restore of C": {
|
||||
"healthy used A": null,
|
||||
"healthy unused B": null,
|
||||
"used, object deleted C": {
|
||||
"kind": "restored_object",
|
||||
"result": "applied",
|
||||
"used": true
|
||||
},
|
||||
"unused, object truncated D": null,
|
||||
"quarantined but healthy E": null,
|
||||
"same-size corruption F": null,
|
||||
"old orphan object": null,
|
||||
"stale intent + object": null,
|
||||
"stale intent, no object": null,
|
||||
"fresh orphan (in-flight)": {
|
||||
"kind": "orphan_object",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
},
|
||||
"fresh intent (in-flight)": {
|
||||
"kind": "stale_intent",
|
||||
"result": "applied",
|
||||
"used": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"objects_present_at_end (fresh items were older than --grace by the later runs)": {
|
||||
"healthy used A": true,
|
||||
"healthy unused B": true,
|
||||
"used, object deleted C": true,
|
||||
"unused, object truncated D": true,
|
||||
"quarantined but healthy E": true,
|
||||
"same-size corruption F": true,
|
||||
"old orphan object": false,
|
||||
"stale intent + object": false,
|
||||
"stale intent, no object": false,
|
||||
"fresh orphan (in-flight)": false,
|
||||
"fresh intent (in-flight)": false
|
||||
},
|
||||
"rows_after": {
|
||||
"C": {
|
||||
"status": "ready",
|
||||
"lost_reason": null
|
||||
},
|
||||
"D": {
|
||||
"status": "ready",
|
||||
"lost_reason": "size_mismatch"
|
||||
},
|
||||
"E": {
|
||||
"status": "ready",
|
||||
"lost_reason": null
|
||||
},
|
||||
"F": {
|
||||
"status": "ready",
|
||||
"lost_reason": "checksum_mismatch"
|
||||
},
|
||||
"A": {
|
||||
"status": "ready",
|
||||
"lost_reason": null
|
||||
},
|
||||
"B": {
|
||||
"status": "ready",
|
||||
"lost_reason": null
|
||||
}
|
||||
},
|
||||
"content_status_after": {
|
||||
"A": 200,
|
||||
"B": 200,
|
||||
"C": 200,
|
||||
"D": 404,
|
||||
"E": 200,
|
||||
"F": 404
|
||||
},
|
||||
"durations_s": [
|
||||
3.94,
|
||||
3.983,
|
||||
3.0,
|
||||
3.548
|
||||
]
|
||||
},
|
||||
"scenario_b_interrupted": {
|
||||
"orphans_injected": 2000,
|
||||
"interrupted_run": {
|
||||
"exit_code": 1,
|
||||
"error": "store_unavailable: Unavailable",
|
||||
"applied": 440
|
||||
},
|
||||
"orphans_left_after_interrupt": 1560,
|
||||
"rerun": {
|
||||
"exit_code": 0,
|
||||
"applied": 1562,
|
||||
"error": null
|
||||
},
|
||||
"third": {
|
||||
"exit_code": 0,
|
||||
"planned": 0
|
||||
},
|
||||
"orphans_left_at_end": 0
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"mode": "apply",
|
||||
"grace_seconds": 30.0,
|
||||
"verify_checksums": false,
|
||||
"duration_seconds": 0.103,
|
||||
"error": null,
|
||||
"scanned": {
|
||||
"objects": 186,
|
||||
"rows": 186,
|
||||
"consistent": 186
|
||||
},
|
||||
"findings": {
|
||||
"orphan_object": 0,
|
||||
"stale_intent": 0,
|
||||
"missing_object": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0,
|
||||
"restored_object": 0,
|
||||
"fresh_orphan_object": 0,
|
||||
"fresh_intent": 0,
|
||||
"fresh_missing_object": 0
|
||||
},
|
||||
"used_attachments_in_findings": 0,
|
||||
"actions": {
|
||||
"planned": 0,
|
||||
"applied": 0,
|
||||
"skipped": 0,
|
||||
"failed": 0
|
||||
},
|
||||
"cost": {
|
||||
"s3_list_requests": 1,
|
||||
"s3_head_requests": 0,
|
||||
"s3_get_bytes": 0,
|
||||
"db_pages": 1,
|
||||
"page_size": 1000
|
||||
},
|
||||
"samples": {}
|
||||
}
|
||||
@@ -0,0 +1,414 @@
|
||||
# Own tests: unit + stand (pytest -v); failures restored in finally
|
||||
# 2026-10-25T11:43:04Z, commit f9f5ab9 bench: сценарий прерванного apply на 2000 сирот, понятные подписи итогов
|
||||
|
||||
$ python -m pytest student-tests -v
|
||||
============================= test session starts =============================
|
||||
platform win32 -- Python 3.14.6, pytest-9.1.1, pluggy-1.7.0 -- C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe
|
||||
rootdir: C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean
|
||||
plugins: anyio-4.15.1
|
||||
collecting ... collected 320 items
|
||||
|
||||
student-tests/test_api.py::test_register_never_returns_password_and_login_returns_bearer PASSED [ 0%]
|
||||
student-tests/test_api.py::test_duplicate_username_is_409 PASSED [ 0%]
|
||||
student-tests/test_api.py::test_bad_password_on_registration_is_400[short-11ch] PASSED [ 0%]
|
||||
student-tests/test_api.py::test_bad_password_on_registration_is_400[ ] PASSED [ 1%]
|
||||
student-tests/test_api.py::test_bad_password_on_registration_is_400[ \t \n \t \n \t \n ] PASSED [ 1%]
|
||||
student-tests/test_api.py::test_bad_password_on_registration_is_400[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 1%]
|
||||
student-tests/test_api.py::test_edge_passwords_register_and_login[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 2%]
|
||||
student-tests/test_api.py::test_edge_passwords_register_and_login[with:colons:inside] PASSED [ 2%]
|
||||
student-tests/test_api.py::test_edge_passwords_register_and_login[Twelve chars] PASSED [ 2%]
|
||||
student-tests/test_api.py::test_wrong_password_and_unknown_user_give_the_same_401 PASSED [ 3%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic \xe9] PASSED [ 3%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic !!!] PASSED [ 3%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic bm9fY29sb24=] PASSED [ 4%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic //46eA==] PASSED [ 4%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 4%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[] PASSED [ 5%]
|
||||
student-tests/test_api.py::test_logout_revokes_only_this_token PASSED [ 5%]
|
||||
student-tests/test_api.py::test_x_user_id_basic_and_garbage_do_not_authenticate PASSED [ 5%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[{] PASSED [ 5%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[] PASSED [ 6%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[[]] PASSED [ 6%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[null] PASSED [ 6%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[{"username": "abc_def", "display_name": NaN, "password": "Twelve-chars"}] PASSED [ 7%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[{"username": "abc_def", "display_name": "x", "password": "Twelve-chars"}{"a": 1}] PASSED [ 7%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[{"username": "abc_def", "display_name": "\ud800", "password": "Twelve-chars"}] PASSED [ 7%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body0] PASSED [ 8%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body1] PASSED [ 8%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body2] PASSED [ 8%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body3] PASSED [ 9%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body4] PASSED [ 9%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body5] PASSED [ 9%]
|
||||
student-tests/test_api.py::test_unicode_limits_are_code_points_and_nul_is_stored PASSED [ 10%]
|
||||
student-tests/test_api.py::test_oversized_body_and_wrong_content_type PASSED [ 10%]
|
||||
student-tests/test_api.py::test_chat_validation PASSED [ 10%]
|
||||
student-tests/test_api.py::test_foreign_chat_is_indistinguishable_from_missing PASSED [ 10%]
|
||||
student-tests/test_api.py::test_chat_list_order_pagination_and_isolation PASSED [ 11%]
|
||||
student-tests/test_api.py::test_history_pages_without_loss_or_duplicates PASSED [ 11%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=0] PASSED [ 11%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=101] PASSED [ 12%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=abc] PASSED [ 12%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=1&limit=2] PASSED [ 12%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=] PASSED [ 13%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=garbage] PASSED [ 13%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=djF8bXx4fDF8Mg] PASSED [ 13%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=djF8bXx4fDk5OTk5OTk5OTk5OTk5OTk5OTk5fHk=] PASSED [ 14%]
|
||||
student-tests/test_api.py::test_cursor_bound_to_chat PASSED [ 14%]
|
||||
student-tests/test_api.py::test_read_after_write PASSED [ 14%]
|
||||
student-tests/test_api.py::test_malformed_cursor_values_are_400_on_both_lists PASSED [ 15%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[\xff] PASSED [ 15%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"first","TEXT":"second"}] PASSED [ 15%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"a","text":"b"}] PASSED [ 15%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":123}] PASSED [ 16%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"valid"}}] PASSED [ 16%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"valid"}]] PASSED [ 16%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x"} {}] PASSED [ 17%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x","sender_id":"11111111-1111-4111-8111-111111111111"}] PASSED [ 17%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x","attachment_ids":null}] PASSED [ 17%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x","attachment_ids":["nope"]}] PASSED [ 18%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":" \n\t "}] PASSED [ 18%]
|
||||
student-tests/test_api.py::test_ff_byte_body_on_registration_is_contract_error PASSED [ 18%]
|
||||
student-tests/test_api.py::test_text_is_stored_verbatim_and_length_counts_raw_text PASSED [ 19%]
|
||||
student-tests/test_api.py::test_unknown_attachment_ids_are_404 PASSED [ 19%]
|
||||
student-tests/test_api.py::test_member_ids_are_compared_as_uuids_not_strings PASSED [ 19%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer \xe9] PASSED [ 20%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer .] PASSED [ 20%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer a b] PASSED [ 20%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer \xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9] PASSED [ 20%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[bearer\taaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 21%]
|
||||
student-tests/test_api.py::test_login_with_a_body_is_rejected PASSED [ 21%]
|
||||
student-tests/test_api.py::test_password_range_is_12_to_128_code_points PASSED [ 21%]
|
||||
student-tests/test_api.py::test_every_api_response_carries_instance_and_request_id PASSED [ 22%]
|
||||
student-tests/test_api.py::test_unicode_whitespace_only_strings_are_400[\xa0] PASSED [ 22%]
|
||||
student-tests/test_api.py::test_unicode_whitespace_only_strings_are_400[\u2003\u2003] PASSED [ 22%]
|
||||
student-tests/test_api.py::test_unicode_whitespace_only_strings_are_400[ \xa0\t\u3000] PASSED [ 23%]
|
||||
student-tests/test_api.py::test_odd_registration_bodies_are_400_and_the_api_survives[{"username":"num_probe","display_name":"x","password":1e1000}] PASSED [ 23%]
|
||||
student-tests/test_api.py::test_odd_registration_bodies_are_400_and_the_api_survives[{"username":"ff_probe","display_name":"x","password":"12345678901\xff"}] PASSED [ 23%]
|
||||
student-tests/test_api.py::test_odd_registration_bodies_are_400_and_the_api_survives[{"username":"num_probe","display_name":1,"password":"Twelve-chars-ok"}] PASSED [ 24%]
|
||||
student-tests/test_api.py::test_more_than_100_members_is_400 PASSED [ 24%]
|
||||
student-tests/test_api.py::test_cursor_of_one_list_is_rejected_by_the_other PASSED [ 24%]
|
||||
student-tests/test_attachments.py::test_png_and_jpeg_roundtrip_byte_for_byte PASSED [ 25%]
|
||||
student-tests/test_attachments.py::test_metadata_reveals_no_storage_details PASSED [ 25%]
|
||||
student-tests/test_attachments.py::test_original_is_not_stored_on_api_containers PASSED [ 25%]
|
||||
student-tests/test_attachments.py::test_outsider_and_unknown_get_404 PASSED [ 25%]
|
||||
student-tests/test_attachments.py::test_attachment_ids_are_checked_per_chat PASSED [ 26%]
|
||||
student-tests/test_attachments.py::test_message_with_attachments_and_history PASSED [ 26%]
|
||||
student-tests/test_attachments.py::test_idempotent_replay_with_attachments PASSED [ 26%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"attachment_ids":["%(a)s"]}] PASSED [ 27%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":null,"attachment_ids":["%(a)s"]}] PASSED [ 27%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":1,"attachment_ids":["%(a)s"]}] PASSED [ 27%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":null}] PASSED [ 28%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":"%(a)s"}] PASSED [ 28%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":{}}] PASSED [ 28%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":["%(a)s","%] PASSED [ 29%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":["%(a)s",1]] PASSED [ 29%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":["not-a-uui] PASSED [ 29%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"","attachment_ids":[]}] PASSED [ 30%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":" "}] PASSED [ 30%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":[],"sender_] PASSED [ 30%]
|
||||
student-tests/test_attachments.py::test_at_most_ten_attachments PASSED [ 30%]
|
||||
student-tests/test_attachments.py::test_size_limit_through_the_load_balancer PASSED [ 31%]
|
||||
student-tests/test_attachments.py::test_pixel_limit_before_decoding PASSED [ 31%]
|
||||
student-tests/test_attachments.py::test_exactly_40_megapixels_is_accepted PASSED [ 31%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: first 33 bytes of the fixture] PASSED [ 32%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: truncated] PASSED [ 32%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: corrupt IDAT, valid CRC] PASSED [ 32%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: fewer rows than IHDR] PASSED [ 33%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: flipped byte] PASSED [ 33%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: bytes after IEND] PASSED [ 33%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[jpeg: no scan data after SOS] PASSED [ 34%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[jpeg: truncated] PASSED [ 34%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[mime: png bytes declared jpeg] PASSED [ 34%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[mime: jpeg bytes declared png] PASSED [ 35%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[mime: gif declared png] PASSED [ 35%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[mime: html declared png] PASSED [ 35%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[type: text/plain] PASSED [ 35%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[type: octet-stream] PASSED [ 36%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[type: multipart] PASSED [ 36%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[type: missing] PASSED [ 36%]
|
||||
student-tests/test_attachments.py::test_empty_body_is_400 PASSED [ 37%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[missing] PASSED [ 37%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=] PASSED [ 37%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=%20%20%20] PASSED [ 38%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=.] PASSED [ 38%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=..] PASSED [ 38%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a%2Fb.png] PASSED [ 39%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a%5Cb.png] PASSED [ 39%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a%00b.png] PASSED [ 39%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=c1%C2%85.png] PASSED [ 40%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=tab%09.png] PASSED [ 40%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=photo%E2%80%AEgnp.exe] PASSED [ 40%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=%FF%FE.png] PASSED [ 40%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a.png&filename=b.png] PASSED [ 41%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 41%]
|
||||
student-tests/test_attachments.py::test_unicode_filename_is_kept_and_safely_exposed PASSED [ 41%]
|
||||
student-tests/test_attachments.py::test_variant_parameter PASSED [ 42%]
|
||||
student-tests/test_balancing.py::test_one_session_is_served_by_every_real_replica PASSED [ 42%]
|
||||
student-tests/test_balancing.py::test_write_on_one_replica_is_read_on_the_other PASSED [ 42%]
|
||||
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[0-pg_hba] PASSED [ 43%]
|
||||
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[0-network] PASSED [ 43%]
|
||||
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[1-pg_hba] PASSED [ 43%]
|
||||
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[1-network] PASSED [ 44%]
|
||||
student-tests/test_balancing.py::test_graceful_stop_of_each_replica_loses_no_request[0] PASSED [ 44%]
|
||||
student-tests/test_balancing.py::test_graceful_stop_of_each_replica_loses_no_request[1] PASSED [ 44%]
|
||||
student-tests/test_balancing.py::test_killed_replica_bounded_errors_recovery_and_no_duplicates[0] PASSED [ 45%]
|
||||
student-tests/test_balancing.py::test_killed_replica_bounded_errors_recovery_and_no_duplicates[1] PASSED [ 45%]
|
||||
student-tests/test_balancing.py::test_graceful_shutdown_order_in_logs PASSED [ 45%]
|
||||
student-tests/test_balancing.py::test_full_restart_lb_rediscovers_all_replicas PASSED [ 45%]
|
||||
student-tests/test_balancing.py::test_scale_up_and_down_is_picked_up_without_errors PASSED [ 46%]
|
||||
student-tests/test_balancing.py::test_compose_policy_limits_ports_secrets_images PASSED [ 46%]
|
||||
student-tests/test_balancing.py::test_running_containers_have_limits_and_no_bypass_ports PASSED [ 46%]
|
||||
student-tests/test_balancing.py::test_migrations_ran_once_by_the_migrate_service PASSED [ 47%]
|
||||
student-tests/test_consistency.py::test_interrupted_and_stalled_uploads_leave_nothing PASSED [ 47%]
|
||||
student-tests/test_consistency.py::test_crash_between_s3_put_and_commit_is_cleaned_by_janitor PASSED [ 47%]
|
||||
student-tests/test_consistency.py::test_lost_answer_after_commit_never_deletes_the_object PASSED [ 48%]
|
||||
student-tests/test_consistency.py::test_fresh_pending_upload_is_not_touched_by_janitor PASSED [ 48%]
|
||||
student-tests/test_db.py::test_registration_race_exactly_one_201_and_seven_409 PASSED [ 48%]
|
||||
student-tests/test_db.py::test_create_chat_rolls_back_after_the_chat_row_was_inserted PASSED [ 49%]
|
||||
student-tests/test_db.py::test_migrations_rerun_is_a_noop PASSED [ 49%]
|
||||
student-tests/test_db.py::test_100_messages_from_10_clients_keep_order_and_cursor_walk PASSED [ 49%]
|
||||
student-tests/test_db.py::test_secrets_are_not_stored_in_plain_text PASSED [ 50%]
|
||||
student-tests/test_explain.py::test_late_page_uses_index_range_not_filter PASSED [ 50%]
|
||||
student-tests/test_failures.py::test_valkey_failure[stop] PASSED [ 50%]
|
||||
student-tests/test_failures.py::test_valkey_failure[pause] PASSED [ 50%]
|
||||
student-tests/test_failures.py::test_postgres_failure[stop] PASSED [ 51%]
|
||||
student-tests/test_failures.py::test_postgres_failure[pause] PASSED [ 51%]
|
||||
student-tests/test_failures.py::test_locked_table_gives_bounded_503 PASSED [ 51%]
|
||||
student-tests/test_failures.py::test_logout_during_valkey_outage_is_never_lost PASSED [ 52%]
|
||||
student-tests/test_idempotency.py::test_replay_returns_the_same_201_and_message_from_every_replica PASSED [ 52%]
|
||||
student-tests/test_idempotency.py::test_other_body_with_the_same_key_is_409_and_keeps_the_original PASSED [ 52%]
|
||||
student-tests/test_idempotency.py::test_key_order_and_missing_attachment_ids_are_the_same_body PASSED [ 53%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[] PASSED [ 53%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 53%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[\u043a\u043b\u044e\u0447] PASSED [ 54%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a b] PASSED [ 54%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a/b] PASSED [ 54%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a,b] PASSED [ 55%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a\tb] PASSED [ 55%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[*] PASSED [ 55%]
|
||||
student-tests/test_idempotency.py::test_repeated_key_header_is_400 PASSED [ 55%]
|
||||
student-tests/test_idempotency.py::test_longest_key_and_every_allowed_character PASSED [ 56%]
|
||||
student-tests/test_idempotency.py::test_scope_is_user_plus_chat_plus_key PASSED [ 56%]
|
||||
student-tests/test_idempotency.py::test_outsider_and_revoked_session_never_see_the_stored_result PASSED [ 56%]
|
||||
student-tests/test_idempotency.py::test_concurrent_same_key_through_different_replicas_creates_exactly_one PASSED [ 57%]
|
||||
student-tests/test_idempotency.py::test_concurrent_same_key_different_bodies_one_wins PASSED [ 57%]
|
||||
student-tests/test_idempotency.py::test_failure_after_the_key_insert_rolls_everything_back PASSED [ 57%]
|
||||
student-tests/test_idempotency.py::test_client_timeout_then_retry_with_the_same_key_gives_the_committed_message PASSED [ 58%]
|
||||
student-tests/test_idempotency.py::test_lock_timeout_is_a_transient_503_that_is_not_recorded PASSED [ 58%]
|
||||
student-tests/test_idempotency.py::test_replay_after_the_serving_replica_is_stopped PASSED [ 58%]
|
||||
student-tests/test_reconcile.py::test_detect_and_safely_fix_faults_on_both_sides PASSED [ 59%]
|
||||
student-tests/test_reconcile.py::test_checksum_mode_finds_same_size_corruption PASSED [ 59%]
|
||||
student-tests/test_reconcile.py::test_safety_valve_refuses_mass_deletion PASSED [ 59%]
|
||||
student-tests/test_reconcile.py::test_store_outage_stops_the_run_without_damage[s3] PASSED [ 60%]
|
||||
student-tests/test_reconcile.py::test_store_outage_stops_the_run_without_damage[postgres] PASSED [ 60%]
|
||||
student-tests/test_reconcile.py::test_live_uploads_are_never_hurt_by_concurrent_apply PASSED [ 60%]
|
||||
student-tests/test_sessions.py::test_short_ttl_expires[valkey] PASSED [ 60%]
|
||||
student-tests/test_sessions.py::test_short_ttl_expires[postgres] PASSED [ 61%]
|
||||
student-tests/test_sessions.py::test_restart_does_not_extend_ttl FAILED [ 61%]
|
||||
student-tests/test_sessions.py::test_postgres_session_store PASSED [ 61%]
|
||||
student-tests/test_storage_failures.py::test_s3_outage_is_503_and_text_keeps_working[stop] FAILED [ 62%]
|
||||
student-tests/test_storage_failures.py::test_s3_outage_is_503_and_text_keeps_working[pause] PASSED [ 62%]
|
||||
student-tests/test_storage_failures.py::test_upload_survives_failover_of_the_serving_replica PASSED [ 62%]
|
||||
student-tests/test_storage_failures.py::test_bucket_is_private_outside_the_api PASSED [ 63%]
|
||||
student-tests/test_storage_failures.py::test_s3_restart_keeps_objects PASSED [ 63%]
|
||||
student-tests/unit/test_images.py::test_public_fixture_is_accepted PASSED [ 63%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[rgba] PASSED [ 64%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[palette] PASSED [ 64%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[1bit] PASSED [ 64%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[gray] PASSED [ 65%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[noise] PASSED [ 65%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[1x1] PASSED [ 65%]
|
||||
student-tests/unit/test_images.py::test_interlaced_png_is_accepted PASSED [ 65%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[first 33 bytes of the fixture] PASSED [ 66%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[truncated (no IEND)] PASSED [ 66%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[truncated in IDAT] PASSED [ 66%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[flipped byte -> CRC error] PASSED [ 67%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[garbage IDAT with valid CRC] PASSED [ 67%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[fewer rows than IHDR] PASSED [ 67%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[bytes after IEND (polyglot)] PASSED [ 68%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[text] PASSED [ 68%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[gif] PASSED [ 68%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[two bytes of a signature] PASSED [ 69%]
|
||||
student-tests/unit/test_images.py::test_pixel_limit_is_checked_from_the_header PASSED [ 69%]
|
||||
student-tests/unit/test_images.py::test_png_verification_is_streaming_and_fast PASSED [ 69%]
|
||||
student-tests/unit/test_images.py::test_jpeg_header_is_parsed_incrementally PASSED [ 70%]
|
||||
student-tests/unit/test_images.py::test_valid_jpeg[base] SKIPPED (dj...) [ 70%]
|
||||
student-tests/unit/test_images.py::test_valid_jpeg[prog] SKIPPED (dj...) [ 70%]
|
||||
student-tests/unit/test_images.py::test_broken_jpeg_is_415[no scan data after SOS-] SKIPPED [ 70%]
|
||||
student-tests/unit/test_images.py::test_broken_jpeg_is_415[truncated-] SKIPPED [ 71%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[photo.png] PASSED [ 71%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[\u0444\u043e\u0442\u043e \u043e\u0442\u043f\u0443\u0441\u043a\u0430.jpg] PASSED [ 71%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 72%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[emoji \U0001f468\u200d\U0001f469\u200d\U0001f467.png] PASSED [ 72%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[ x ] PASSED [ 72%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[..x] PASSED [ 73%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[] PASSED [ 73%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[ ] PASSED [ 73%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[\u3000] PASSED [ 74%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[.] PASSED [ 74%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[..] PASSED [ 74%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[a/b.png] PASSED [ 75%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[a\\b.png] PASSED [ 75%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[a\x00b] PASSED [ 75%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[c1\x85.png] PASSED [ 75%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[tab\t.png] PASSED [ 76%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[del\x7f.png] PASSED [ 76%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[x\u2028y] PASSED [ 76%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[photo\u202egnp.exe] PASSED [ 77%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 77%]
|
||||
student-tests/unit/test_images.py::test_filename_must_be_single_and_present PASSED [ 77%]
|
||||
student-tests/unit/test_images.py::test_query_must_be_valid_utf8 PASSED [ 78%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[Twelve-chars] PASSED [ 78%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 78%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[\u043f\u0430\u0440\u043e\u043b\u044c:\u0441:\u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f\u043c\u0438] PASSED [ 79%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600] PASSED [ 79%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[a b c d e f g] PASSED [ 79%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[short-11ch] PASSED [ 80%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 80%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[ ] PASSED [ 80%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[\t\n\u3000\t\n\u3000\t\n\u3000\t\n\u3000\t\n\u3000] PASSED [ 80%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800] PASSED [ 81%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[None] PASSED [ 81%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[123456789012] PASSED [ 81%]
|
||||
student-tests/unit/test_unit.py::test_text_may_contain_nul_but_not_lone_surrogates PASSED [ 82%]
|
||||
student-tests/unit/test_unit.py::test_cursor_roundtrip_and_binding PASSED [ 82%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|253402300800000000|11111111-1111-4111-8111-111111111111] PASSED [ 82%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|9999999999999999999|11111111-1111-4111-8111-111111111111] PASSED [ 83%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|-1|11111111-1111-4111-8111-111111111111] PASSED [ 83%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|1|not-a-uuid] PASSED [ 83%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|1|11111111-1111-4111-8111-11111111111G] PASSED [ 84%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v2|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|1|11111111-1111-4111-8111-111111111111] PASSED [ 84%]
|
||||
student-tests/unit/test_unit.py::test_time_helpers_are_exact PASSED [ 84%]
|
||||
student-tests/unit/test_unit.py::test_basic_is_parsed_and_password_may_contain_colons PASSED [ 85%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[None] PASSED [ 85%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[] PASSED [ 85%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic] PASSED [ 85%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic \xe9] PASSED [ 86%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic !!!!] PASSED [ 86%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic bm8tY29sb24=] PASSED [ 86%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic //46cHc=] PASSED [ 87%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic OnBhc3N3b3Jk] PASSED [ 87%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic YWxpY2U6] PASSED [ 87%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic 0JDQu9C40YHQsDpwdw==] PASSED [ 88%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 88%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA] PASSED [ 88%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[None] PASSED [ 89%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[] PASSED [ 89%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer] PASSED [ 89%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer short] PASSED [ 90%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!] PASSED [ 90%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Basic YWxpY2U6cGFzc3dvcmQtMTIz] PASSED [ 90%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Token aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 90%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer \xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9] PASSED [ 91%]
|
||||
student-tests/unit/test_unit.py::test_bearer_ok PASSED [ 91%]
|
||||
student-tests/unit/test_unit.py::test_argon2id_hash_and_verify PASSED [ 91%]
|
||||
student-tests/unit/test_unit.py::test_s3_settings_are_validated_and_contract_limits_cannot_be_raised PASSED [ 92%]
|
||||
student-tests/unit/test_unit.py::test_settings_read_secret_files_and_contract_names PASSED [ 92%]
|
||||
student-tests/unit/test_unit.py::test_valid_idempotency_keys[a] PASSED [ 92%]
|
||||
student-tests/unit/test_unit.py::test_valid_idempotency_keys[kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk] PASSED [ 93%]
|
||||
student-tests/unit/test_unit.py::test_valid_idempotency_keys[A-Za-z0-9._:-] PASSED [ 93%]
|
||||
student-tests/unit/test_unit.py::test_valid_idempotency_keys[2026-10-16T10:00:00.1] PASSED [ 93%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[None] PASSED [ 94%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[] PASSED [ 94%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk] PASSED [ 94%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[\u043a\u043b\u044e\u0447] PASSED [ 95%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a b] PASSED [ 95%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a/b] PASSED [ 95%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a,b] PASSED [ 95%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a\tb] PASSED [ 96%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a\x00b] PASSED [ 96%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[*] PASSED [ 96%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[\xe9] PASSED [ 97%]
|
||||
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[{"text":"a","text":"b"}] PASSED [ 97%]
|
||||
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[{"a":{"x":1,"x":2}}] PASSED [ 97%]
|
||||
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[\xff] PASSED [ 98%]
|
||||
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[{"text":"x"} {}] PASSED [ 98%]
|
||||
student-tests/unit/test_unit.py::test_attachment_ids_absent_equals_empty_and_is_validated PASSED [ 98%]
|
||||
student-tests/unit/test_unit.py::test_request_fingerprint_ignores_key_order_and_default_attachments PASSED [ 99%]
|
||||
student-tests/unit/test_unit.py::test_instance_id_defaults_to_hostname_and_is_validated PASSED [ 99%]
|
||||
student-tests/unit/test_unit.py::test_idempotency_ttl_cannot_be_below_24_hours PASSED [ 99%]
|
||||
student-tests/unit/test_unit.py::test_message_write_path_setting PASSED [100%]
|
||||
|
||||
================================== FAILURES ===================================
|
||||
______________________ test_restart_does_not_extend_ttl _______________________
|
||||
|
||||
api = <conftest.Api object at 0x000002244DC7BCB0>
|
||||
|
||||
def test_restart_does_not_extend_ttl(api):
|
||||
with api_with_env(SESSION_TTL_SECONDS="12"):
|
||||
actor = api.register("ttlrestart")
|
||||
session = login_session(api, actor)
|
||||
restart_services("valkey", "api")
|
||||
> assert seconds_left(session["expires_at"]) > 0, "restart took longer than the TTL; increase it"
|
||||
E AssertionError: restart took longer than the TTL; increase it
|
||||
E assert -0.024317 > 0
|
||||
E + where -0.024317 = seconds_left('2026-10-25T12:00:02.431630Z')
|
||||
|
||||
student-tests\test_sessions.py:45: AssertionError
|
||||
_____________ test_s3_outage_is_503_and_text_keeps_working[stop] ______________
|
||||
|
||||
api = <conftest.Api object at 0x000002244DC7BCB0>
|
||||
pair = ({'id': '4b97c381-df7f-48f6-92df-bb7a17232630', 'user': {'id': '4b97c381-df7f-48f6-92df-bb7a17232630', 'username': 'al...81-df7f-48f6-92df-bb7a17232630', '1a1510cc-7f0b-423f-8645-70e2fa838cb2'], 'created_at': '2026-10-25T12:01:26.054625Z'})
|
||||
how = 'stop'
|
||||
|
||||
@pytest.mark.parametrize("how", ["stop", "pause"])
|
||||
def test_s3_outage_is_503_and_text_keeps_working(api, pair, how):
|
||||
"""S3 down (stopped: connection refused; paused: no answer at all):
|
||||
* readiness is 503 on every replica (and through the LB), quickly;
|
||||
* uploads/downloads are 503 `unavailable` within the S3 deadline, never 500;
|
||||
* the LB's degraded mode keeps chats/text messages working (HAProxy backend api_core);
|
||||
* after recovery the earlier file is intact."""
|
||||
alice, bob, chat = pair
|
||||
att = api.upload(alice, chat, SAMPLE).json()
|
||||
with service_down("s3", how):
|
||||
deadline = time.monotonic() + 15
|
||||
while api.client.get("/health/ready").status_code != 503:
|
||||
assert time.monotonic() < deadline, "readiness did not turn 503"
|
||||
time.sleep(0.5)
|
||||
for replica in running_replicas():
|
||||
assert probe_inside(replica, "/health/ready") == 503
|
||||
assert probe_inside(replica, "/health/ready/core") == 200
|
||||
started = time.monotonic()
|
||||
error = api.upload(alice, chat, SAMPLE, 503).json()
|
||||
assert error["error"]["code"] == "unavailable"
|
||||
assert time.monotonic() - started < 8
|
||||
started = time.monotonic()
|
||||
api.call("GET", f"/api/v1/attachments/{att['id']}/content", 503, token=bob["token"])
|
||||
assert time.monotonic() - started < 8
|
||||
api.call("GET", f"/api/v1/attachments/{att['id']}", 200, token=bob["token"]) # metadata: PostgreSQL only
|
||||
api.send(alice, chat, "текст работает без S3") # degraded mode
|
||||
> got = api.call("GET", f"/api/v1/attachments/{att['id']}/content", 200, token=bob["token"])
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
student-tests\test_storage_failures.py:53:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
|
||||
self = <conftest.Api object at 0x000002244DC7BCB0>, method = 'GET'
|
||||
path = '/api/v1/attachments/57b6e686-85b7-4dd3-8e02-076b19a8ca79/content'
|
||||
expected = 200, token = 'S12UUVFiNSnc1NKWb-5PmdJBo9_J6P1-5TihoVd7xBs'
|
||||
json_body = None, raw = None, headers = None, schema = None, lb_error_ok = False
|
||||
|
||||
def call(self, method: str, path: str, expected: int | tuple[int, ...], *, token: str | None = None,
|
||||
json_body=None, raw: bytes | None = None, headers: dict | None = None, schema: str | None = None,
|
||||
lb_error_ok: bool = False):
|
||||
"""lb_error_ok: a 502/503/504 generated by HAProxy itself (no API replica answered) is
|
||||
accepted without X-Instance-Id; every response of an API replica must carry it."""
|
||||
h = dict(headers or {})
|
||||
if token is not None:
|
||||
h["Authorization"] = "Bearer " + token
|
||||
if json_body is not None:
|
||||
raw = json.dumps(json_body, ensure_ascii=False).encode("utf-8")
|
||||
h.setdefault("Content-Type", "application/json")
|
||||
response = self.client.request(method, path, content=raw, headers=h)
|
||||
allowed = (expected,) if isinstance(expected, int) else expected
|
||||
> assert response.status_code in allowed, (method, path, response.status_code, response.text[:300])
|
||||
E AssertionError: ('GET', '/api/v1/attachments/57b6e686-85b7-4dd3-8e02-076b19a8ca79/content', 503, '{"error":{"code":"unavailable","message":"Хранилище файлов временно недоступно","request_id":"8ecf9351-b1db-4e6d-99da-89f4de083683"}}')
|
||||
E assert 503 in (200,)
|
||||
E + where 503 = <Response [503 Service Unavailable]>.status_code
|
||||
|
||||
student-tests\conftest.py:184: AssertionError
|
||||
=========================== short test summary info ===========================
|
||||
FAILED student-tests/test_sessions.py::test_restart_does_not_extend_ttl - Ass...
|
||||
FAILED student-tests/test_storage_failures.py::test_s3_outage_is_503_and_text_keeps_working[stop]
|
||||
============ 2 failed, 314 passed, 4 skipped in 1229.88s (0:20:29) ============
|
||||
[exit 1, 1231.4 s]
|
||||
@@ -0,0 +1,331 @@
|
||||
# Own tests after fixes found by the first clean-clone run
|
||||
# 2026-10-25T12:12:45Z, commit fc50362 bench: SQL синтетики через stdin psql (лимит командной строки Windows)
|
||||
$ python -m pytest student-tests -v
|
||||
============================= test session starts =============================
|
||||
platform win32 -- Python 3.14.6, pytest-9.1.1, pluggy-1.7.0 -- C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe
|
||||
rootdir: C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean
|
||||
plugins: anyio-4.15.1
|
||||
collecting ... collected 320 items
|
||||
|
||||
student-tests/test_api.py::test_register_never_returns_password_and_login_returns_bearer PASSED [ 0%]
|
||||
student-tests/test_api.py::test_duplicate_username_is_409 PASSED [ 0%]
|
||||
student-tests/test_api.py::test_bad_password_on_registration_is_400[short-11ch] PASSED [ 0%]
|
||||
student-tests/test_api.py::test_bad_password_on_registration_is_400[ ] PASSED [ 1%]
|
||||
student-tests/test_api.py::test_bad_password_on_registration_is_400[ \t \n \t \n \t \n ] PASSED [ 1%]
|
||||
student-tests/test_api.py::test_bad_password_on_registration_is_400[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 1%]
|
||||
student-tests/test_api.py::test_edge_passwords_register_and_login[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 2%]
|
||||
student-tests/test_api.py::test_edge_passwords_register_and_login[with:colons:inside] PASSED [ 2%]
|
||||
student-tests/test_api.py::test_edge_passwords_register_and_login[Twelve chars] PASSED [ 2%]
|
||||
student-tests/test_api.py::test_wrong_password_and_unknown_user_give_the_same_401 PASSED [ 3%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic \xe9] PASSED [ 3%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic !!!] PASSED [ 3%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic bm9fY29sb24=] PASSED [ 4%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic //46eA==] PASSED [ 4%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 4%]
|
||||
student-tests/test_api.py::test_malformed_basic_is_401_not_500[] PASSED [ 5%]
|
||||
student-tests/test_api.py::test_logout_revokes_only_this_token PASSED [ 5%]
|
||||
student-tests/test_api.py::test_x_user_id_basic_and_garbage_do_not_authenticate PASSED [ 5%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[{] PASSED [ 5%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[] PASSED [ 6%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[[]] PASSED [ 6%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[null] PASSED [ 6%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[{"username": "abc_def", "display_name": NaN, "password": "Twelve-chars"}] PASSED [ 7%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[{"username": "abc_def", "display_name": "x", "password": "Twelve-chars"}{"a": 1}] PASSED [ 7%]
|
||||
student-tests/test_api.py::test_malformed_json_is_400[{"username": "abc_def", "display_name": "\ud800", "password": "Twelve-chars"}] PASSED [ 7%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body0] PASSED [ 8%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body1] PASSED [ 8%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body2] PASSED [ 8%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body3] PASSED [ 9%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body4] PASSED [ 9%]
|
||||
student-tests/test_api.py::test_invalid_registration_fields_are_400[body5] PASSED [ 9%]
|
||||
student-tests/test_api.py::test_unicode_limits_are_code_points_and_nul_is_stored PASSED [ 10%]
|
||||
student-tests/test_api.py::test_oversized_body_and_wrong_content_type PASSED [ 10%]
|
||||
student-tests/test_api.py::test_chat_validation PASSED [ 10%]
|
||||
student-tests/test_api.py::test_foreign_chat_is_indistinguishable_from_missing PASSED [ 10%]
|
||||
student-tests/test_api.py::test_chat_list_order_pagination_and_isolation PASSED [ 11%]
|
||||
student-tests/test_api.py::test_history_pages_without_loss_or_duplicates PASSED [ 11%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=0] PASSED [ 11%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=101] PASSED [ 12%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=abc] PASSED [ 12%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=1&limit=2] PASSED [ 12%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=] PASSED [ 13%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=garbage] PASSED [ 13%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=djF8bXx4fDF8Mg] PASSED [ 13%]
|
||||
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=djF8bXx4fDk5OTk5OTk5OTk5OTk5OTk5OTk5fHk=] PASSED [ 14%]
|
||||
student-tests/test_api.py::test_cursor_bound_to_chat PASSED [ 14%]
|
||||
student-tests/test_api.py::test_read_after_write PASSED [ 14%]
|
||||
student-tests/test_api.py::test_malformed_cursor_values_are_400_on_both_lists PASSED [ 15%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[\xff] PASSED [ 15%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"first","TEXT":"second"}] PASSED [ 15%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"a","text":"b"}] PASSED [ 15%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":123}] PASSED [ 16%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"valid"}}] PASSED [ 16%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"valid"}]] PASSED [ 16%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x"} {}] PASSED [ 17%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x","sender_id":"11111111-1111-4111-8111-111111111111"}] PASSED [ 17%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x","attachment_ids":null}] PASSED [ 17%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x","attachment_ids":["nope"]}] PASSED [ 18%]
|
||||
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":" \n\t "}] PASSED [ 18%]
|
||||
student-tests/test_api.py::test_ff_byte_body_on_registration_is_contract_error PASSED [ 18%]
|
||||
student-tests/test_api.py::test_text_is_stored_verbatim_and_length_counts_raw_text PASSED [ 19%]
|
||||
student-tests/test_api.py::test_unknown_attachment_ids_are_404 PASSED [ 19%]
|
||||
student-tests/test_api.py::test_member_ids_are_compared_as_uuids_not_strings PASSED [ 19%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer \xe9] PASSED [ 20%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer .] PASSED [ 20%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer a b] PASSED [ 20%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer \xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9] PASSED [ 20%]
|
||||
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[bearer\taaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 21%]
|
||||
student-tests/test_api.py::test_login_with_a_body_is_rejected PASSED [ 21%]
|
||||
student-tests/test_api.py::test_password_range_is_12_to_128_code_points PASSED [ 21%]
|
||||
student-tests/test_api.py::test_every_api_response_carries_instance_and_request_id PASSED [ 22%]
|
||||
student-tests/test_api.py::test_unicode_whitespace_only_strings_are_400[\xa0] PASSED [ 22%]
|
||||
student-tests/test_api.py::test_unicode_whitespace_only_strings_are_400[\u2003\u2003] PASSED [ 22%]
|
||||
student-tests/test_api.py::test_unicode_whitespace_only_strings_are_400[ \xa0\t\u3000] PASSED [ 23%]
|
||||
student-tests/test_api.py::test_odd_registration_bodies_are_400_and_the_api_survives[{"username":"num_probe","display_name":"x","password":1e1000}] PASSED [ 23%]
|
||||
student-tests/test_api.py::test_odd_registration_bodies_are_400_and_the_api_survives[{"username":"ff_probe","display_name":"x","password":"12345678901\xff"}] PASSED [ 23%]
|
||||
student-tests/test_api.py::test_odd_registration_bodies_are_400_and_the_api_survives[{"username":"num_probe","display_name":1,"password":"Twelve-chars-ok"}] PASSED [ 24%]
|
||||
student-tests/test_api.py::test_more_than_100_members_is_400 PASSED [ 24%]
|
||||
student-tests/test_api.py::test_cursor_of_one_list_is_rejected_by_the_other PASSED [ 24%]
|
||||
student-tests/test_attachments.py::test_png_and_jpeg_roundtrip_byte_for_byte PASSED [ 25%]
|
||||
student-tests/test_attachments.py::test_metadata_reveals_no_storage_details PASSED [ 25%]
|
||||
student-tests/test_attachments.py::test_original_is_not_stored_on_api_containers PASSED [ 25%]
|
||||
student-tests/test_attachments.py::test_outsider_and_unknown_get_404 PASSED [ 25%]
|
||||
student-tests/test_attachments.py::test_attachment_ids_are_checked_per_chat PASSED [ 26%]
|
||||
student-tests/test_attachments.py::test_message_with_attachments_and_history PASSED [ 26%]
|
||||
student-tests/test_attachments.py::test_idempotent_replay_with_attachments PASSED [ 26%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"attachment_ids":["%(a)s"]}] PASSED [ 27%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":null,"attachment_ids":["%(a)s"]}] PASSED [ 27%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":1,"attachment_ids":["%(a)s"]}] PASSED [ 27%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":null}] PASSED [ 28%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":"%(a)s"}] PASSED [ 28%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":{}}] PASSED [ 28%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":["%(a)s","%] PASSED [ 29%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":["%(a)s",1]] PASSED [ 29%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":["not-a-uui] PASSED [ 29%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"","attachment_ids":[]}] PASSED [ 30%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":" "}] PASSED [ 30%]
|
||||
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":[],"sender_] PASSED [ 30%]
|
||||
student-tests/test_attachments.py::test_at_most_ten_attachments PASSED [ 30%]
|
||||
student-tests/test_attachments.py::test_size_limit_through_the_load_balancer PASSED [ 31%]
|
||||
student-tests/test_attachments.py::test_pixel_limit_before_decoding PASSED [ 31%]
|
||||
student-tests/test_attachments.py::test_exactly_40_megapixels_is_accepted PASSED [ 31%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: first 33 bytes of the fixture] PASSED [ 32%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: truncated] PASSED [ 32%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: corrupt IDAT, valid CRC] PASSED [ 32%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: fewer rows than IHDR] PASSED [ 33%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: flipped byte] PASSED [ 33%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[png: bytes after IEND] PASSED [ 33%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[jpeg: no scan data after SOS] PASSED [ 34%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[jpeg: truncated] PASSED [ 34%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[mime: png bytes declared jpeg] PASSED [ 34%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[mime: jpeg bytes declared png] PASSED [ 35%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[mime: gif declared png] PASSED [ 35%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[mime: html declared png] PASSED [ 35%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[type: text/plain] PASSED [ 35%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[type: octet-stream] PASSED [ 36%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[type: multipart] PASSED [ 36%]
|
||||
student-tests/test_attachments.py::test_bad_content_is_415[type: missing] PASSED [ 36%]
|
||||
student-tests/test_attachments.py::test_empty_body_is_400 PASSED [ 37%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[missing] PASSED [ 37%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=] PASSED [ 37%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=%20%20%20] PASSED [ 38%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=.] PASSED [ 38%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=..] PASSED [ 38%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a%2Fb.png] PASSED [ 39%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a%5Cb.png] PASSED [ 39%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a%00b.png] PASSED [ 39%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=c1%C2%85.png] PASSED [ 40%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=tab%09.png] PASSED [ 40%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=photo%E2%80%AEgnp.exe] PASSED [ 40%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=%FF%FE.png] PASSED [ 40%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a.png&filename=b.png] PASSED [ 41%]
|
||||
student-tests/test_attachments.py::test_bad_filename_is_400[filename=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 41%]
|
||||
student-tests/test_attachments.py::test_unicode_filename_is_kept_and_safely_exposed PASSED [ 41%]
|
||||
student-tests/test_attachments.py::test_variant_parameter PASSED [ 42%]
|
||||
student-tests/test_balancing.py::test_one_session_is_served_by_every_real_replica PASSED [ 42%]
|
||||
student-tests/test_balancing.py::test_write_on_one_replica_is_read_on_the_other PASSED [ 42%]
|
||||
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[0-pg_hba] PASSED [ 43%]
|
||||
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[0-network] PASSED [ 43%]
|
||||
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[1-pg_hba] PASSED [ 43%]
|
||||
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[1-network] PASSED [ 44%]
|
||||
student-tests/test_balancing.py::test_graceful_stop_of_each_replica_loses_no_request[0] PASSED [ 44%]
|
||||
student-tests/test_balancing.py::test_graceful_stop_of_each_replica_loses_no_request[1] PASSED [ 44%]
|
||||
student-tests/test_balancing.py::test_killed_replica_bounded_errors_recovery_and_no_duplicates[0] PASSED [ 45%]
|
||||
student-tests/test_balancing.py::test_killed_replica_bounded_errors_recovery_and_no_duplicates[1] PASSED [ 45%]
|
||||
student-tests/test_balancing.py::test_graceful_shutdown_order_in_logs PASSED [ 45%]
|
||||
student-tests/test_balancing.py::test_full_restart_lb_rediscovers_all_replicas PASSED [ 45%]
|
||||
student-tests/test_balancing.py::test_scale_up_and_down_is_picked_up_without_errors PASSED [ 46%]
|
||||
student-tests/test_balancing.py::test_compose_policy_limits_ports_secrets_images PASSED [ 46%]
|
||||
student-tests/test_balancing.py::test_running_containers_have_limits_and_no_bypass_ports PASSED [ 46%]
|
||||
student-tests/test_balancing.py::test_migrations_ran_once_by_the_migrate_service PASSED [ 47%]
|
||||
student-tests/test_consistency.py::test_interrupted_and_stalled_uploads_leave_nothing PASSED [ 47%]
|
||||
student-tests/test_consistency.py::test_crash_between_s3_put_and_commit_is_cleaned_by_janitor PASSED [ 47%]
|
||||
student-tests/test_consistency.py::test_lost_answer_after_commit_never_deletes_the_object PASSED [ 48%]
|
||||
student-tests/test_consistency.py::test_fresh_pending_upload_is_not_touched_by_janitor PASSED [ 48%]
|
||||
student-tests/test_db.py::test_registration_race_exactly_one_201_and_seven_409 PASSED [ 48%]
|
||||
student-tests/test_db.py::test_create_chat_rolls_back_after_the_chat_row_was_inserted PASSED [ 49%]
|
||||
student-tests/test_db.py::test_migrations_rerun_is_a_noop PASSED [ 49%]
|
||||
student-tests/test_db.py::test_100_messages_from_10_clients_keep_order_and_cursor_walk PASSED [ 49%]
|
||||
student-tests/test_db.py::test_secrets_are_not_stored_in_plain_text PASSED [ 50%]
|
||||
student-tests/test_explain.py::test_late_page_uses_index_range_not_filter PASSED [ 50%]
|
||||
student-tests/test_failures.py::test_valkey_failure[stop] PASSED [ 50%]
|
||||
student-tests/test_failures.py::test_valkey_failure[pause] PASSED [ 50%]
|
||||
student-tests/test_failures.py::test_postgres_failure[stop] PASSED [ 51%]
|
||||
student-tests/test_failures.py::test_postgres_failure[pause] PASSED [ 51%]
|
||||
student-tests/test_failures.py::test_locked_table_gives_bounded_503 PASSED [ 51%]
|
||||
student-tests/test_failures.py::test_logout_during_valkey_outage_is_never_lost PASSED [ 52%]
|
||||
student-tests/test_idempotency.py::test_replay_returns_the_same_201_and_message_from_every_replica PASSED [ 52%]
|
||||
student-tests/test_idempotency.py::test_other_body_with_the_same_key_is_409_and_keeps_the_original PASSED [ 52%]
|
||||
student-tests/test_idempotency.py::test_key_order_and_missing_attachment_ids_are_the_same_body PASSED [ 53%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[] PASSED [ 53%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 53%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[\u043a\u043b\u044e\u0447] PASSED [ 54%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a b] PASSED [ 54%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a/b] PASSED [ 54%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a,b] PASSED [ 55%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a\tb] PASSED [ 55%]
|
||||
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[*] PASSED [ 55%]
|
||||
student-tests/test_idempotency.py::test_repeated_key_header_is_400 PASSED [ 55%]
|
||||
student-tests/test_idempotency.py::test_longest_key_and_every_allowed_character PASSED [ 56%]
|
||||
student-tests/test_idempotency.py::test_scope_is_user_plus_chat_plus_key PASSED [ 56%]
|
||||
student-tests/test_idempotency.py::test_outsider_and_revoked_session_never_see_the_stored_result PASSED [ 56%]
|
||||
student-tests/test_idempotency.py::test_concurrent_same_key_through_different_replicas_creates_exactly_one PASSED [ 57%]
|
||||
student-tests/test_idempotency.py::test_concurrent_same_key_different_bodies_one_wins PASSED [ 57%]
|
||||
student-tests/test_idempotency.py::test_failure_after_the_key_insert_rolls_everything_back PASSED [ 57%]
|
||||
student-tests/test_idempotency.py::test_client_timeout_then_retry_with_the_same_key_gives_the_committed_message PASSED [ 58%]
|
||||
student-tests/test_idempotency.py::test_lock_timeout_is_a_transient_503_that_is_not_recorded PASSED [ 58%]
|
||||
student-tests/test_idempotency.py::test_replay_after_the_serving_replica_is_stopped PASSED [ 58%]
|
||||
student-tests/test_reconcile.py::test_detect_and_safely_fix_faults_on_both_sides PASSED [ 59%]
|
||||
student-tests/test_reconcile.py::test_checksum_mode_finds_same_size_corruption PASSED [ 59%]
|
||||
student-tests/test_reconcile.py::test_safety_valve_refuses_mass_deletion PASSED [ 59%]
|
||||
student-tests/test_reconcile.py::test_store_outage_stops_the_run_without_damage[s3] PASSED [ 60%]
|
||||
student-tests/test_reconcile.py::test_store_outage_stops_the_run_without_damage[postgres] PASSED [ 60%]
|
||||
student-tests/test_reconcile.py::test_live_uploads_are_never_hurt_by_concurrent_apply PASSED [ 60%]
|
||||
student-tests/test_sessions.py::test_short_ttl_expires[valkey] PASSED [ 60%]
|
||||
student-tests/test_sessions.py::test_short_ttl_expires[postgres] PASSED [ 61%]
|
||||
student-tests/test_sessions.py::test_restart_does_not_extend_ttl PASSED [ 61%]
|
||||
student-tests/test_sessions.py::test_postgres_session_store PASSED [ 61%]
|
||||
student-tests/test_storage_failures.py::test_s3_outage_is_503_and_text_keeps_working[stop] PASSED [ 62%]
|
||||
student-tests/test_storage_failures.py::test_s3_outage_is_503_and_text_keeps_working[pause] PASSED [ 62%]
|
||||
student-tests/test_storage_failures.py::test_upload_survives_failover_of_the_serving_replica PASSED [ 62%]
|
||||
student-tests/test_storage_failures.py::test_bucket_is_private_outside_the_api PASSED [ 63%]
|
||||
student-tests/test_storage_failures.py::test_s3_restart_keeps_objects PASSED [ 63%]
|
||||
student-tests/unit/test_images.py::test_public_fixture_is_accepted PASSED [ 63%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[rgba] PASSED [ 64%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[palette] PASSED [ 64%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[1bit] PASSED [ 64%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[gray] PASSED [ 65%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[noise] PASSED [ 65%]
|
||||
student-tests/unit/test_images.py::test_valid_png_kinds[1x1] PASSED [ 65%]
|
||||
student-tests/unit/test_images.py::test_interlaced_png_is_accepted PASSED [ 65%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[first 33 bytes of the fixture] PASSED [ 66%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[truncated (no IEND)] PASSED [ 66%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[truncated in IDAT] PASSED [ 66%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[flipped byte -> CRC error] PASSED [ 67%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[garbage IDAT with valid CRC] PASSED [ 67%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[fewer rows than IHDR] PASSED [ 67%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[bytes after IEND (polyglot)] PASSED [ 68%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[text] PASSED [ 68%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[gif] PASSED [ 68%]
|
||||
student-tests/unit/test_images.py::test_broken_png_is_415[two bytes of a signature] PASSED [ 69%]
|
||||
student-tests/unit/test_images.py::test_pixel_limit_is_checked_from_the_header PASSED [ 69%]
|
||||
student-tests/unit/test_images.py::test_png_verification_is_streaming_and_fast PASSED [ 69%]
|
||||
student-tests/unit/test_images.py::test_jpeg_header_is_parsed_incrementally PASSED [ 70%]
|
||||
student-tests/unit/test_images.py::test_valid_jpeg[base] SKIPPED (dj...) [ 70%]
|
||||
student-tests/unit/test_images.py::test_valid_jpeg[prog] SKIPPED (dj...) [ 70%]
|
||||
student-tests/unit/test_images.py::test_broken_jpeg_is_415[no scan data after SOS-] SKIPPED [ 70%]
|
||||
student-tests/unit/test_images.py::test_broken_jpeg_is_415[truncated-] SKIPPED [ 71%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[photo.png] PASSED [ 71%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[\u0444\u043e\u0442\u043e \u043e\u0442\u043f\u0443\u0441\u043a\u0430.jpg] PASSED [ 71%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 72%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[emoji \U0001f468\u200d\U0001f469\u200d\U0001f467.png] PASSED [ 72%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[ x ] PASSED [ 72%]
|
||||
student-tests/unit/test_images.py::test_good_filenames[..x] PASSED [ 73%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[] PASSED [ 73%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[ ] PASSED [ 73%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[\u3000] PASSED [ 74%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[.] PASSED [ 74%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[..] PASSED [ 74%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[a/b.png] PASSED [ 75%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[a\\b.png] PASSED [ 75%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[a\x00b] PASSED [ 75%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[c1\x85.png] PASSED [ 75%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[tab\t.png] PASSED [ 76%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[del\x7f.png] PASSED [ 76%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[x\u2028y] PASSED [ 76%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[photo\u202egnp.exe] PASSED [ 77%]
|
||||
student-tests/unit/test_images.py::test_bad_filenames[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 77%]
|
||||
student-tests/unit/test_images.py::test_filename_must_be_single_and_present PASSED [ 77%]
|
||||
student-tests/unit/test_images.py::test_query_must_be_valid_utf8 PASSED [ 78%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[Twelve-chars] PASSED [ 78%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 78%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[\u043f\u0430\u0440\u043e\u043b\u044c:\u0441:\u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f\u043c\u0438] PASSED [ 79%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600] PASSED [ 79%]
|
||||
student-tests/unit/test_unit.py::test_valid_passwords[a b c d e f g] PASSED [ 79%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[short-11ch] PASSED [ 80%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 80%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[ ] PASSED [ 80%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[\t\n\u3000\t\n\u3000\t\n\u3000\t\n\u3000\t\n\u3000] PASSED [ 80%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800] PASSED [ 81%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[None] PASSED [ 81%]
|
||||
student-tests/unit/test_unit.py::test_invalid_passwords[123456789012] PASSED [ 81%]
|
||||
student-tests/unit/test_unit.py::test_text_may_contain_nul_but_not_lone_surrogates PASSED [ 82%]
|
||||
student-tests/unit/test_unit.py::test_cursor_roundtrip_and_binding PASSED [ 82%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|253402300800000000|11111111-1111-4111-8111-111111111111] PASSED [ 82%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|9999999999999999999|11111111-1111-4111-8111-111111111111] PASSED [ 83%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|-1|11111111-1111-4111-8111-111111111111] PASSED [ 83%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|1|not-a-uuid] PASSED [ 83%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|1|11111111-1111-4111-8111-11111111111G] PASSED [ 84%]
|
||||
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v2|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|1|11111111-1111-4111-8111-111111111111] PASSED [ 84%]
|
||||
student-tests/unit/test_unit.py::test_time_helpers_are_exact PASSED [ 84%]
|
||||
student-tests/unit/test_unit.py::test_basic_is_parsed_and_password_may_contain_colons PASSED [ 85%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[None] PASSED [ 85%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[] PASSED [ 85%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic] PASSED [ 85%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic \xe9] PASSED [ 86%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic !!!!] PASSED [ 86%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic bm8tY29sb24=] PASSED [ 86%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic //46cHc=] PASSED [ 87%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic OnBhc3N3b3Jk] PASSED [ 87%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic YWxpY2U6] PASSED [ 87%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic 0JDQu9C40YHQsDpwdw==] PASSED [ 88%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 88%]
|
||||
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA] PASSED [ 88%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[None] PASSED [ 89%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[] PASSED [ 89%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer] PASSED [ 89%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer short] PASSED [ 90%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!] PASSED [ 90%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Basic YWxpY2U6cGFzc3dvcmQtMTIz] PASSED [ 90%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Token aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 90%]
|
||||
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer \xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9] PASSED [ 91%]
|
||||
student-tests/unit/test_unit.py::test_bearer_ok PASSED [ 91%]
|
||||
student-tests/unit/test_unit.py::test_argon2id_hash_and_verify PASSED [ 91%]
|
||||
student-tests/unit/test_unit.py::test_s3_settings_are_validated_and_contract_limits_cannot_be_raised PASSED [ 92%]
|
||||
student-tests/unit/test_unit.py::test_settings_read_secret_files_and_contract_names PASSED [ 92%]
|
||||
student-tests/unit/test_unit.py::test_valid_idempotency_keys[a] PASSED [ 92%]
|
||||
student-tests/unit/test_unit.py::test_valid_idempotency_keys[kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk] PASSED [ 93%]
|
||||
student-tests/unit/test_unit.py::test_valid_idempotency_keys[A-Za-z0-9._:-] PASSED [ 93%]
|
||||
student-tests/unit/test_unit.py::test_valid_idempotency_keys[2026-10-16T10:00:00.1] PASSED [ 93%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[None] PASSED [ 94%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[] PASSED [ 94%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk] PASSED [ 94%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[\u043a\u043b\u044e\u0447] PASSED [ 95%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a b] PASSED [ 95%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a/b] PASSED [ 95%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a,b] PASSED [ 95%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a\tb] PASSED [ 96%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a\x00b] PASSED [ 96%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[*] PASSED [ 96%]
|
||||
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[\xe9] PASSED [ 97%]
|
||||
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[{"text":"a","text":"b"}] PASSED [ 97%]
|
||||
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[{"a":{"x":1,"x":2}}] PASSED [ 97%]
|
||||
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[\xff] PASSED [ 98%]
|
||||
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[{"text":"x"} {}] PASSED [ 98%]
|
||||
student-tests/unit/test_unit.py::test_attachment_ids_absent_equals_empty_and_is_validated PASSED [ 98%]
|
||||
student-tests/unit/test_unit.py::test_request_fingerprint_ignores_key_order_and_default_attachments PASSED [ 99%]
|
||||
student-tests/unit/test_unit.py::test_instance_id_defaults_to_hostname_and_is_validated PASSED [ 99%]
|
||||
student-tests/unit/test_unit.py::test_idempotency_ttl_cannot_be_below_24_hours PASSED [ 99%]
|
||||
student-tests/unit/test_unit.py::test_message_write_path_setting PASSED [100%]
|
||||
|
||||
================= 316 passed, 4 skipped in 1269.76s (0:21:09) =================
|
||||
+68
-87
@@ -1,93 +1,74 @@
|
||||
# 2026-10-25T11:06:22Z commit a2d867b
|
||||
## round 1
|
||||
$ python scripts/lbctl.py replicas
|
||||
mtusi-lab4-api-1 X-Instance-Id=05c02ec0a89f running health=healthy pid=33267 started=2026-10-25T11:05:59.978 ip=172.25.0.3,172.26.0.4,172.27.0.2
|
||||
mtusi-lab4-api-2 X-Instance-Id=4ddc189deda2 running health=healthy pid=33344 started=2026-10-25T11:06:00.330 ip=172.25.0.4,172.26.0.5,172.27.0.3
|
||||
$ python tests/resilience.py --mode failover --action-script scripts/stop-one.cmd
|
||||
# make test-failover with scripts/stop-one: which container is really stopped, restore, repeat
|
||||
# 2026-10-25T11:42:11Z, commit f9f5ab9 bench: сценарий прерванного apply на 2000 сирот, понятные подписи итогов
|
||||
|
||||
--- run 1; running API replicas BEFORE:
|
||||
mtusi-lab4-api-1 host=8691c30aa702 running exit=0 pid=33790 started=2026-10-25T11:41:59.187
|
||||
mtusi-lab4-api-2 host=4026e296947c running exit=0 pid=33848 started=2026-10-25T11:41:59.568
|
||||
|
||||
$ make test-failover ACTION_SCRIPT=scripts/stop-one.cmd
|
||||
python tests/resilience.py --mode failover --action-script "scripts/stop-one.cmd" --base-url "http://localhost:8080"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 133, "failed_attempts": 0, "first_recovery_seconds": 6.008}
|
||||
{"observed_instances_before": 2, "successful_writes": 131, "failed_attempts": 0, "first_recovery_seconds": 5.956}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
$ python scripts/lbctl.py replicas (after hook)
|
||||
mtusi-lab4-api-1 X-Instance-Id=05c02ec0a89f exited health=unhealthy pid=0 started=2026-10-25T11:05:59.978 ip=-
|
||||
mtusi-lab4-api-2 X-Instance-Id=4ddc189deda2 running health=healthy pid=33344 started=2026-10-25T11:06:00.330 ip=172.25.0.4,172.26.0.5,172.27.0.3
|
||||
$ sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
|
||||
[exit 0, 16.5 s]
|
||||
|
||||
AFTER (the stopped replica, left stopped by the hook):
|
||||
mtusi-lab4-api-1 host=8691c30aa702 exited exit=0 pid=0 started=2026-10-25T11:41:59.187
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lbctl.py status
|
||||
api2 172.25.0.3 UP mtusi-lab4-api-2 X-Instance-Id=4026e296947c
|
||||
(other slots: MAINT, no container)
|
||||
[exit 0, 0.7 s]
|
||||
|
||||
$ sh scripts/restore-api.sh
|
||||
mtusi-lab4-api-1 Up 6 seconds (healthy)
|
||||
mtusi-lab4-api-2 Up 46 seconds (healthy)
|
||||
2 API replica(s) UP in HAProxy after 0.6 s: ['05c02ec0a89f', '4ddc189deda2']
|
||||
## round 2
|
||||
$ python scripts/lbctl.py replicas
|
||||
mtusi-lab4-api-1 X-Instance-Id=05c02ec0a89f running health=healthy pid=35395 started=2026-10-25T11:06:40.508 ip=172.25.0.3,172.26.0.4,172.27.0.2
|
||||
mtusi-lab4-api-2 X-Instance-Id=4ddc189deda2 running health=healthy pid=33344 started=2026-10-25T11:06:00.330 ip=172.25.0.4,172.26.0.5,172.27.0.3
|
||||
$ python tests/resilience.py --mode failover --action-script scripts/stop-one.cmd
|
||||
mtusi-lab4-api-2 Up 37 seconds (healthy)
|
||||
Container mtusi-lab4-api-2 Running
|
||||
Container mtusi-lab4-api-1 Starting
|
||||
Container mtusi-lab4-api-1 Started
|
||||
Container mtusi-lab4-api-1 Waiting
|
||||
Container mtusi-lab4-api-2 Waiting
|
||||
Container mtusi-lab4-api-1 Healthy
|
||||
Container mtusi-lab4-api-2 Healthy
|
||||
[exit 0, 6.9 s]
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lbctl.py wait-up 2
|
||||
2 API replica(s) UP in HAProxy after 0.6 s: ['4026e296947c', '8691c30aa702']
|
||||
[exit 0, 1.4 s]
|
||||
|
||||
--- run 2; running API replicas BEFORE:
|
||||
mtusi-lab4-api-1 host=8691c30aa702 running exit=0 pid=35544 started=2026-10-25T11:42:30.519
|
||||
mtusi-lab4-api-2 host=4026e296947c running exit=0 pid=33848 started=2026-10-25T11:41:59.568
|
||||
|
||||
$ make test-failover ACTION_SCRIPT=scripts/stop-one.cmd
|
||||
python tests/resilience.py --mode failover --action-script "scripts/stop-one.cmd" --base-url "http://localhost:8080"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 132, "failed_attempts": 0, "first_recovery_seconds": 5.738}
|
||||
{"observed_instances_before": 2, "successful_writes": 132, "failed_attempts": 0, "first_recovery_seconds": 6.291}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
$ python scripts/lbctl.py replicas (after hook)
|
||||
mtusi-lab4-api-1 X-Instance-Id=05c02ec0a89f exited health=unhealthy pid=0 started=2026-10-25T11:06:40.508 ip=-
|
||||
mtusi-lab4-api-2 X-Instance-Id=4ddc189deda2 running health=healthy pid=33344 started=2026-10-25T11:06:00.330 ip=172.25.0.4,172.26.0.5,172.27.0.3
|
||||
$ sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
|
||||
mtusi-lab4-api-1 Up 6 seconds (healthy)
|
||||
mtusi-lab4-api-2 Up About a minute (healthy)
|
||||
2 API replica(s) UP in HAProxy after 0.6 s: ['05c02ec0a89f', '4ddc189deda2']
|
||||
## round 3
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 133, "failed_attempts": 0, "first_recovery_seconds": 5.931}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
$ python scripts/lbctl.py replicas (after hook)
|
||||
mtusi-lab4-api-1 X-Instance-Id=05c02ec0a89f exited health=unhealthy pid=0 started=2026-10-25T11:07:06.512 ip=-
|
||||
mtusi-lab4-api-2 X-Instance-Id=4ddc189deda2 running health=healthy pid=33344 started=2026-10-25T11:06:00.330 ip=172.25.0.4,172.26.0.5,172.27.0.3
|
||||
$ sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
|
||||
mtusi-lab4-api-1 Up 6 seconds (healthy)
|
||||
mtusi-lab4-api-2 Up About a minute (healthy)
|
||||
2 API replica(s) UP in HAProxy after 0.7 s: ['05c02ec0a89f', '4ddc189deda2']
|
||||
## round 4
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 133, "failed_attempts": 0, "first_recovery_seconds": 6.053}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
$ python scripts/lbctl.py replicas (after hook)
|
||||
mtusi-lab4-api-1 X-Instance-Id=05c02ec0a89f exited health=unhealthy pid=0 started=2026-10-25T11:07:44.818 ip=-
|
||||
mtusi-lab4-api-2 X-Instance-Id=4ddc189deda2 running health=healthy pid=33344 started=2026-10-25T11:06:00.330 ip=172.25.0.4,172.26.0.5,172.27.0.3
|
||||
$ sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
|
||||
mtusi-lab4-api-1 Up 6 seconds (healthy)
|
||||
mtusi-lab4-api-2 Up 2 minutes (healthy)
|
||||
2 API replica(s) UP in HAProxy after 0.7 s: ['05c02ec0a89f', '4ddc189deda2']
|
||||
## round 5
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 133, "failed_attempts": 0, "first_recovery_seconds": 5.809}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
$ python scripts/lbctl.py replicas (after hook)
|
||||
mtusi-lab4-api-1 X-Instance-Id=05c02ec0a89f exited health=unhealthy pid=0 started=2026-10-25T11:08:10.900 ip=-
|
||||
mtusi-lab4-api-2 X-Instance-Id=4ddc189deda2 running health=healthy pid=33344 started=2026-10-25T11:06:00.330 ip=172.25.0.4,172.26.0.5,172.27.0.3
|
||||
$ sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
|
||||
mtusi-lab4-api-1 Up 6 seconds (healthy)
|
||||
mtusi-lab4-api-2 Up 2 minutes (healthy)
|
||||
2 API replica(s) UP in HAProxy after 0.6 s: ['05c02ec0a89f', '4ddc189deda2']
|
||||
## round 6
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 133, "failed_attempts": 0, "first_recovery_seconds": 5.952}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
$ python scripts/lbctl.py replicas (after hook)
|
||||
mtusi-lab4-api-1 X-Instance-Id=05c02ec0a89f exited health=unhealthy pid=0 started=2026-10-25T11:08:37.062 ip=-
|
||||
mtusi-lab4-api-2 X-Instance-Id=4ddc189deda2 running health=healthy pid=33344 started=2026-10-25T11:06:00.330 ip=172.25.0.4,172.26.0.5,172.27.0.3
|
||||
$ sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
|
||||
mtusi-lab4-api-1 Up 6 seconds (healthy)
|
||||
mtusi-lab4-api-2 Up 3 minutes (healthy)
|
||||
2 API replica(s) UP in HAProxy after 0.7 s: ['05c02ec0a89f', '4ddc189deda2']
|
||||
## round 7 (one extra GET /health/live first: shifts HAProxy round-robin so the OTHER replica serves the test's first message)
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 133, "failed_attempts": 0, "first_recovery_seconds": 6.146}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
$ python scripts/lbctl.py replicas (after hook)
|
||||
mtusi-lab4-api-1 X-Instance-Id=05c02ec0a89f running health=healthy pid=42280 started=2026-10-25T11:09:03.178 ip=172.25.0.3,172.26.0.4,172.27.0.2
|
||||
mtusi-lab4-api-2 X-Instance-Id=4ddc189deda2 exited health=unhealthy pid=0 started=2026-10-25T11:06:00.330 ip=-
|
||||
$ sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
|
||||
mtusi-lab4-api-1 Up 42 seconds (healthy)
|
||||
[exit 0, 16.4 s]
|
||||
|
||||
AFTER (the stopped replica, left stopped by the hook):
|
||||
mtusi-lab4-api-2 host=4026e296947c exited exit=0 pid=0 started=2026-10-25T11:41:59.568
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lbctl.py status
|
||||
api1 172.25.0.2 UP mtusi-lab4-api-1 X-Instance-Id=8691c30aa702
|
||||
(other slots: MAINT, no container)
|
||||
[exit 0, 0.8 s]
|
||||
|
||||
$ sh scripts/restore-api.sh
|
||||
mtusi-lab4-api-1 Up 32 seconds (healthy)
|
||||
mtusi-lab4-api-2 Up 6 seconds (healthy)
|
||||
2 API replica(s) UP in HAProxy after 0.6 s: ['05c02ec0a89f', '4ddc189deda2']
|
||||
Container mtusi-lab4-api-1 Running
|
||||
Container mtusi-lab4-api-2 Starting
|
||||
Container mtusi-lab4-api-2 Started
|
||||
Container mtusi-lab4-api-1 Waiting
|
||||
Container mtusi-lab4-api-2 Waiting
|
||||
Container mtusi-lab4-api-1 Healthy
|
||||
Container mtusi-lab4-api-2 Healthy
|
||||
[exit 0, 6.9 s]
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lbctl.py wait-up 2
|
||||
2 API replica(s) UP in HAProxy after 0.6 s: ['4026e296947c', '8691c30aa702']
|
||||
[exit 0, 1.5 s]
|
||||
|
||||
Replicas stopped by the public test across runs: ['mtusi-lab4-api-1', 'mtusi-lab4-api-2']
|
||||
|
||||
@@ -1,19 +1,32 @@
|
||||
# 2026-10-25T11:05:12Z commit a2d867b
|
||||
$ docker compose ps (before)
|
||||
mtusi-lab4-api-1 Up 15 minutes (healthy)
|
||||
mtusi-lab4-api-2 Up 15 minutes (healthy)
|
||||
mtusi-lab4-lb-1 Up 21 minutes (healthy)
|
||||
mtusi-lab4-postgres-1 Up 2 minutes (healthy)
|
||||
mtusi-lab4-s3-1 Up 2 minutes (healthy)
|
||||
mtusi-lab4-valkey-1 Up 21 minutes (healthy)
|
||||
$ python tests/resilience.py --mode persistence --action-script scripts/restart.cmd
|
||||
# make test-persistence: restart of LB, all API replicas, PostgreSQL, Valkey, S3
|
||||
# 2026-10-25T11:41:08Z, commit f9f5ab9 bench: сценарий прерванного apply на 2000 сирот, понятные подписи итогов
|
||||
|
||||
Containers BEFORE:
|
||||
mtusi-lab4-api-1 host=8691c30aa702 running exit=0 pid=28760 started=2026-10-25T11:40:06.635
|
||||
mtusi-lab4-api-2 host=4026e296947c running exit=0 pid=28857 started=2026-10-25T11:40:07.085
|
||||
mtusi-lab4-lb-1 host=1282a32916ca running exit=0 pid=29105 started=2026-10-25T11:40:13.103
|
||||
mtusi-lab4-migrate-1 host=62f12280b06e exited exit=0 pid=0 started=2026-10-25T11:39:59.135
|
||||
mtusi-lab4-postgres-1 host=286ea382ba46 running exit=0 pid=28093 started=2026-10-25T11:39:53.269
|
||||
mtusi-lab4-s3-1 host=53564c9a38b4 running exit=0 pid=28181 started=2026-10-25T11:39:53.656
|
||||
mtusi-lab4-s3-init-1 host=ab8ae8b24a67 exited exit=0 pid=0 started=2026-10-25T11:40:01.363
|
||||
mtusi-lab4-valkey-1 host=44817703634f running exit=0 pid=28258 started=2026-10-25T11:39:53.966
|
||||
|
||||
$ make test-persistence ACTION_SCRIPT=scripts/restart.cmd
|
||||
python tests/resilience.py --mode persistence --action-script "scripts/restart.cmd" --base-url "http://localhost: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
|
||||
$ docker compose ps (after: StartedAt of every container)
|
||||
/mtusi-lab4-api-1 started=2026-10-25T11:05:59.978502661Z restarts=0
|
||||
/mtusi-lab4-api-2 started=2026-10-25T11:06:00.330525085Z restarts=0
|
||||
/mtusi-lab4-lb-1 started=2026-10-25T11:06:09.717330457Z restarts=0
|
||||
/mtusi-lab4-postgres-1 started=2026-10-25T11:05:20.208770445Z restarts=0
|
||||
/mtusi-lab4-s3-1 started=2026-10-25T11:05:40.143650484Z restarts=0
|
||||
/mtusi-lab4-valkey-1 started=2026-10-25T11:05:20.150545076Z restarts=0
|
||||
[exit 0, 61.5 s]
|
||||
|
||||
Containers AFTER (new pid/started for lb, api-*, postgres, valkey, s3; volumes kept):
|
||||
mtusi-lab4-api-1 host=8691c30aa702 running exit=0 pid=33790 started=2026-10-25T11:41:59.187
|
||||
mtusi-lab4-api-2 host=4026e296947c running exit=0 pid=33848 started=2026-10-25T11:41:59.568
|
||||
mtusi-lab4-lb-1 host=1282a32916ca running exit=0 pid=34447 started=2026-10-25T11:42:09.092
|
||||
mtusi-lab4-migrate-1 host=62f12280b06e exited exit=0 pid=0 started=2026-10-25T11:42:01.016
|
||||
mtusi-lab4-postgres-1 host=286ea382ba46 running exit=0 pid=32342 started=2026-10-25T11:41:15.594
|
||||
mtusi-lab4-s3-1 host=53564c9a38b4 running exit=0 pid=32960 started=2026-10-25T11:41:35.722
|
||||
mtusi-lab4-s3-init-1 host=ab8ae8b24a67 exited exit=0 pid=0 started=2026-10-25T11:42:03.276
|
||||
mtusi-lab4-valkey-1 host=44817703634f running exit=0 pid=32296 started=2026-10-25T11:41:15.515
|
||||
|
||||
$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lbctl.py wait-up 2
|
||||
2 API replica(s) UP in HAProxy after 0.5 s: ['4026e296947c', '8691c30aa702']
|
||||
[exit 0, 1.2 s]
|
||||
|
||||
Reference in New Issue
Block a user