9.0 KiB
9.0 KiB
Проверки отказов
- Команда:
make failure_checks - Дата: 2026-10-31, 16:05:22–16:44:08 UTC; код выхода 0
- Commit:
399da05(веткаfeat/pipeline-reliability), рабочее дерево без правок кода (на момент прогона добавлены только файлыevidence/) - Стенд: проект
mtusi-lab5-failuresсо своими PostgreSQL, Valkey, S3, RabbitMQ, уборщиком, relay, worker и четырьмя API; рабочий стендmtusi-lab5на время прогона остановлен (хост свободен); стенд отказов и его volumes удалены в конце - Итог: 141 passed, 224 deselected, pytest 2302,16 с (38:22); вся команда 38:45; журнал PostgreSQL стенда без признаков аварии (
crash markers 0). «too many clients» 40 и «administrator command» 192 — следы самих проверок (заполнение слотов, остановки PostgreSQL) - С прогона на
e2a6427(140 проверок) усиленtest_hung_worker_lease_fencing, прежний его поток сталtest_hung_worker_thawed_after_ready. Тесты в этом прогоне не правились, временных красных нет - Параметры: уборщик — grace 20 с, интервал 1 с, плановая сверка выключена; worker — 4 попытки, пауза 4–16 с, срок 10 с, запас аренды 2 с, рендер 8 с / 3 с CPU, graceful 2 с; relay — опрос 0,2 с, повторная публикация через 5 с
- Вывод сокращён: убраны лог сборки и шаги compose, адреса API временные, строки
PASSEDсвёрнуты в список имён
[failure_checks] project=mtusi-lab5-failures (working stand: mtusi-lab5)
[failure_checks] start cleaner: grace 20 s, interval 1 s, reconcile interval 0 s (0 — off)
[failure_checks] start worker: attempts 4, retry 4–16 s, job timeout 10 s, lease margin 2 s, render 8 s / 3 s CPU, graceful 2 s
[failure_checks] start relay: poll 0.2 s, republish after 5 s
[failure_checks] pytest -m fault
=============== 141 passed, 224 deselected in 2302.16s (0:38:22) ===============
[failure_checks] postgres log: 578 lines, crash markers 0; "too many clients" 40, "administrator command" 192
[failure_checks] results: {'fault': 0, 'postgres': 0}
make failure_checks 219,83s user 85,52s system 13% cpu 38:45,66 total
Прошедшие проверки по порядку
test_expired_token test_use_does_not_extend_session test_token_while_database_stopped test_members_failure_rolls_back_chat
test_database_stopped_and_back test_pool_exhausted test_connection_limit_reached test_pool_keeps_connections
test_readiness_without_database test_readiness_without_cache test_readiness_without_object_storage[stop] test_readiness_without_object_storage[pause]
test_flush_cache test_valkey_stopped test_valkey_paused test_valkey_back
test_message_failure_keeps_key_free test_database_outage_keeps_key_free test_key_free_after_ttl
test_upload_with_object_storage_stopped test_rejected_uploads_leave_nothing test_metadata_insert_failure test_interrupted_body
test_queued_failure_compensated test_killed_between_put_and_ready test_queued_commit_outcome_unknown test_upload_outlives_grace
test_cleaner_failure_after_object_delete test_cleaner_survives_outages test_object_storage_stopped test_environment_does_not_change_limits test_object_storage_paused
test_upload_slots_busy test_rejections_before_queue test_upload_waits_for_slot test_slot_released_after_failures test_slow_body test_upload_after_idle_s3
test_queued_while_worker_stopped test_processing_visible test_redelivery_of_ready_is_noop test_durable_state_at_202 test_transient_error_retried
test_job_message_matches_schema test_queue_durable test_malformed_message_dropped test_unknown_job_acked
test_worker_killed_during_processing test_duplicate_during_processing test_original_published_unchanged test_staging_corrupted test_staging_missing
test_max_pixels_fit_worker_memory test_ready_failure_retried test_queued_between_attempts test_attempts_exhausted test_database_outage_during_processing
test_undecodable_becomes_failed test_worker_down_api_serves test_concurrency_bounded test_api_killed_after_202
test_broker_restart_keeps_job test_broker_kill_keeps_confirmed test_defense_scenario
test_upload_with_broker_stopped test_upload_with_broker_paused test_queue_deleted test_broker_recreated test_start_without_broker test_worker_survives_broker_restart
test_content_before_ready test_message_with_queued_attachment test_attachment_failed_after_message test_replay_after_attachment_failed
test_readiness_without_broker_and_worker[stop] test_readiness_without_broker_and_worker[pause]
test_worker_stop_during_processing test_worker_stop_during_render test_cleaner_keeps_current_work
test_reconcile_finds_and_fixes test_reconcile_keeps_fresh_used_and_unknown test_reconcile_restored_original test_reconcile_change_limit
test_reconcile_keeps_referenced_objects test_reconcile_limit_keeps_cleanup test_reconcile_foreign_key_untouched test_reconcile_object_storage_stopped
test_reconcile_interrupted_by_database test_reconcile_under_load test_scheduled_reconcile test_reconcile_head_strategy_same_findings
test_reconcile_deep_checksum test_reconcile_restore_needs_same_bytes test_reconcile_rate_limit test_reconcile_limit_stops_rechecks
test_reconcile_row_with_other_id_key test_reconcile_fresh_overwrite_untouched test_reconcile_variant_objects test_reconcile_orphan_variant test_reconcile_keeps_current_work
test_relay_killed_before_publish test_relay_killed_after_confirm test_relay_survives_broker_outage test_relay_survives_database_outage test_two_relays
test_relay_respects_next_attempt test_lost_message_republished test_no_copies_while_queue_has_messages test_published_backlog_limit test_broker_memory_alarm
test_crash_after_objects_before_commit test_crash_after_commit_before_ack test_retry_backoff_with_jitter test_retry_waits_outside_worker
test_limit_pixels test_limit_oversized_staging test_limit_cpu_scan_bomb test_limit_memory test_limit_render_timeout test_render_killed
test_hung_worker_lease_fencing test_hung_worker_thawed_after_ready test_long_attempt_keeps_lease test_last_attempt_lost
test_replay_registry_dry_run test_replay_returns_work test_replay_ready_refused test_replay_in_progress_refused test_replay_without_source_refused test_replay_new_budget test_replay_by_code
test_prefetch_bounded test_missing_variant test_cancelled_upload_of_previous_version
test_staging_removed_after_ready test_staging_retention test_staging_keeps_current_work test_staging_cleanup_survives_outage test_staging_foreign_key_kept
test_reconcile_orphan_staging test_defense_faults
Красные прогоны задачи 10.9: тесты ловят нарушение
Сняты до commit на рабочем дереве (design change pipeline-reliability, «Уточнения apply», п. 14): каждая регрессия применена, откачена, хэши src совпали со снимком до них, в commit не вошла. Строка «фиксация без номера попытки» снята перед 399da05 (замечание W2), остальные — перед e2a6427.
| Регрессия | Какой тест красный | Причина в выводе |
|---|---|---|
отметка published_at до подтверждения |
test_relay_killed_after_confirm |
published_at есть после KILL до подтверждения |
| claim при живой аренде | test_duplicate_during_processing |
нет записи busy |
| фиксация без номера попытки | test_hung_worker_lease_fencing (усиленный: первая попытка размораживается при живой второй; прежний вид теста здесь зелёный, итог решал state) |
нет записи superseded с attempt 1 за 30 с |
| ack до фиксации | test_crash_after_objects_before_commit (усиленный) |
messages_unacknowledged 0 |
| claim без проверки завершённого | test_crash_after_commit_before_ack |
нет записи finished за 30 с |
| replay без проверки состояния | test_replay_ready_refused |
код 0 вместо 3 |
| очистка без условия статуса | test_staging_keeps_current_work |
объект staging незавершённого вложения удалён |
FOR UPDATE в очистке |
test_staging_cleanup_survives_outage (усиленный) |
сообщение ждало 4,79 с при границе 1 с |
| рендер в процессе worker | test_limit_cpu_scan_bomb |
retry_exhausted вместо invalid_image |
| фиксированная пауза | test_retry_backoff_with_jitter |
две паузы равны 4,0 |