forked from mtusi2026/mtusi2026lab4
ЛР4 на 5: вложения в MinIO, отказоустойчивость, трек 2 (сверка S3 и PostgreSQL)
Уровень 3: - код lab3 перенесён; MinIO (сборка релиза 2025-10-15, по digest) в общем Compose, идемпотентный bootstrap: приватные bucket, отдельный пользователь API с ограниченной политикой - метаданные вложений в PostgreSQL (миграции 0003, 0004), байты в S3; ключ назначает сервер - upload PNG/JPEG: лимиты до чтения/декодирования, MIME по содержимому, проверка целостности, безопасный filename; 201 только после PUT и COMMIT; download потоком через API - attachment_ids в сообщениях (только файлы своего чата, FK в БД) - 503 API больше не повторяется в HAProxy (отказ общей зависимости), S3 не входит в readiness Уровень 4: - 45 тестов вложений: размер, повреждение, подмена MIME, чужой id, файл другого чата, отказы S3/БД - компенсация при сбое COMMIT; слоты загрузки (8 на реплику) против неограниченной памяти - эксперименты: пик RAM при 10-40 одновременных загрузках, оборванная загрузка и сироты; исправлены удержание соединения БД во время загрузки и таймаут отправки в S3 Уровень 5, трек 2: - reconciler: слияние листинга S3 и курсора БД, 7 категорий расхождений, dry-run, grace period, перепроверка перед действием, тормоз --max-deletes, advisory lock; сервис reconciler в Compose - 8 тестов сверки; эксперимент с 70 внедрёнными ошибками на 10 000 объектах (точное обнаружение, безопасное исправление, идемпотентность) и замер стоимости обхода на 1k/10k/50k Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ec540a1a72
commit
0ccaf8e542
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"fixture_bytes": 111817,
|
||||
"fixture_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"upload": {
|
||||
"status": 201,
|
||||
"instance": "e4717834ab4f",
|
||||
"sha256_matches": true
|
||||
},
|
||||
"download_after_stop": {
|
||||
"status": 200,
|
||||
"instance": "aeca84df3cdc",
|
||||
"sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"content_type": "image/png",
|
||||
"seconds_after_stop": 0.09,
|
||||
"different_instance": true,
|
||||
"sha256_matches": true
|
||||
},
|
||||
"outsider": {
|
||||
"metadata_status": 404,
|
||||
"content_status": 404
|
||||
},
|
||||
"direct_s3_anonymous": {
|
||||
"get_object_status": 403,
|
||||
"list_bucket_status": 403
|
||||
},
|
||||
"api_mounts": {
|
||||
"aeca84df3cdc": [
|
||||
{
|
||||
"type": "bind",
|
||||
"destination": "/run/secrets/jwt_secret"
|
||||
},
|
||||
{
|
||||
"type": "bind",
|
||||
"destination": "/run/secrets/postgres_password"
|
||||
},
|
||||
{
|
||||
"type": "bind",
|
||||
"destination": "/run/secrets/s3_access_key_id"
|
||||
},
|
||||
{
|
||||
"type": "bind",
|
||||
"destination": "/run/secrets/s3_secret_access_key"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": "PASS"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
api: image=mtusi-messenger:lab4 replicas=2 published_ports=[] container_name=None limits={cpus: 1, memory: 536870912, pids: 200} secrets=['postgres_password', 'jwt_secret', 's3_access_key_id', 's3_secret_access_key']
|
||||
lb: image=haproxy:3.0.29-alpine@sha256:56b887da77428b7a6621e59e480cdbd330cc805c22d3cedb66ceea76ffdea2c6 replicas=1 published_ports=['127.0.0.1:8080->8080'] container_name=None limits={cpus: 0.5, memory: 134217728, pids: None} secrets=[]
|
||||
migrate: image=mtusi-messenger:lab4 replicas=1 published_ports=[] container_name=None limits={cpus: 0.5, memory: 268435456, pids: None} secrets=['postgres_password']
|
||||
minio: image=coollabsio/minio:RELEASE.2025-10-15T17-29-55Z@sha256:69b55a1c1c5dc285ce04db96689f5b2102317fc77a50680a1874ca6efd1c87f9 replicas=1 published_ports=['127.0.0.1:19000->9000'] container_name=None limits={cpus: 2, memory: 1073741824, pids: None} secrets=['minio_root_user', 'minio_root_password']
|
||||
MINIO_BROWSER=off
|
||||
minio-init: image=coollabsio/minio:RELEASE.2025-10-15T17-29-55Z@sha256:69b55a1c1c5dc285ce04db96689f5b2102317fc77a50680a1874ca6efd1c87f9 replicas=1 published_ports=[] container_name=None limits={cpus: None, memory: None, pids: None} secrets=['minio_root_user', 'minio_root_password', 's3_access_key_id', 's3_secret_access_key']
|
||||
postgres: image=postgres:17.10-alpine@sha256:979c4379dd698aba0b890599a6104e082035f98ef31d9b9291ec22f2b13059ca replicas=1 published_ports=['127.0.0.1:5432->5432'] container_name=None limits={cpus: 1, memory: 536870912, pids: None} secrets=['postgres_password']
|
||||
reconciler: image=mtusi-messenger:lab4 replicas=1 published_ports=[] container_name=None limits={cpus: 0.25, memory: 134217728, pids: None} secrets=['postgres_password', 's3_access_key_id', 's3_secret_access_key']
|
||||
volumes: ['minio_data', 'postgres_data']
|
||||
@@ -0,0 +1,24 @@
|
||||
# make test-failover ACTION_SCRIPT=scripts/stop-one.cmd; then restore-replicas and repeat for the other replica
|
||||
## run 1, before
|
||||
mtusi-lab4-api-1 e4717834ab4f | Up 15 seconds (healthy)
|
||||
mtusi-lab4-api-2 aeca84df3cdc | Up 14 seconds (healthy)
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 82, "failed_attempts": 0, "first_recovery_seconds": 4.716}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
## run 1, after hook
|
||||
mtusi-lab4-api-1 e4717834ab4f | Exited (0) 11 seconds ago
|
||||
mtusi-lab4-api-2 aeca84df3cdc | Up 36 seconds (healthy)
|
||||
## run 2, before
|
||||
mtusi-lab4-api-1 e4717834ab4f | Up 7 seconds (healthy)
|
||||
mtusi-lab4-api-2 aeca84df3cdc | Up 55 seconds (healthy)
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 83, "failed_attempts": 0, "first_recovery_seconds": 5.739}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
## run 2, after hook
|
||||
mtusi-lab4-api-1 e4717834ab4f | Up 30 seconds (healthy)
|
||||
mtusi-lab4-api-2 aeca84df3cdc | Exited (0) 10 seconds ago
|
||||
## restored
|
||||
mtusi-lab4-api-1 e4717834ab4f | Up 48 seconds (healthy)
|
||||
mtusi-lab4-api-2 aeca84df3cdc | Up 8 seconds (healthy)
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"start": {
|
||||
"attachment_rows": 545,
|
||||
"objects": 545
|
||||
},
|
||||
"after_interrupted_upload": {
|
||||
"attachment_rows": 545,
|
||||
"objects": 545
|
||||
},
|
||||
"api_logged_interrupt": true,
|
||||
"after_orphans_injected": {
|
||||
"attachment_rows": 545,
|
||||
"objects": 548
|
||||
},
|
||||
"cleanup_dry_run_grace_default": {
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 3600,
|
||||
"objects_scanned": 548,
|
||||
"ok": 545,
|
||||
"orphans_fresh_kept": 3,
|
||||
"orphans_found": 0,
|
||||
"deleted": 0,
|
||||
"seconds": 0.762
|
||||
},
|
||||
"cleanup_dry_run_grace_0": {
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"objects_scanned": 548,
|
||||
"ok": 545,
|
||||
"orphans_fresh_kept": 0,
|
||||
"orphans_found": 3,
|
||||
"deleted": 0,
|
||||
"seconds": 0.988
|
||||
},
|
||||
"after_dry_runs": {
|
||||
"attachment_rows": 545,
|
||||
"objects": 548
|
||||
},
|
||||
"cleanup_apply_grace_0": {
|
||||
"mode": "apply",
|
||||
"grace_seconds": 0,
|
||||
"objects_scanned": 548,
|
||||
"ok": 545,
|
||||
"orphans_fresh_kept": 0,
|
||||
"orphans_found": 3,
|
||||
"deleted": 3,
|
||||
"seconds": 0.934
|
||||
},
|
||||
"cleanup_apply_again": {
|
||||
"mode": "apply",
|
||||
"grace_seconds": 0,
|
||||
"objects_scanned": 545,
|
||||
"ok": 545,
|
||||
"orphans_fresh_kept": 0,
|
||||
"orphans_found": 0,
|
||||
"deleted": 0,
|
||||
"seconds": 0.968
|
||||
},
|
||||
"end": {
|
||||
"attachment_rows": 545,
|
||||
"objects": 545
|
||||
},
|
||||
"kept_attachment_download": {
|
||||
"status": 200,
|
||||
"sha256_matches": true
|
||||
},
|
||||
"result": "PASS"
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
# make test-persistence ACTION_SCRIPT=scripts/restart.cmd (stops lb, api, postgres, minio; volumes kept)
|
||||
## before
|
||||
mtusi-lab4-api-1 | Up 20 seconds (healthy)
|
||||
mtusi-lab4-api-2 | Up 20 seconds (healthy)
|
||||
mtusi-lab4-lb-1 | Up 2 hours (healthy)
|
||||
mtusi-lab4-migrate-1 | Exited (0) 21 seconds ago
|
||||
mtusi-lab4-minio-1 | Up 2 hours (healthy)
|
||||
mtusi-lab4-minio-init-1 | Exited (0) 27 seconds ago
|
||||
mtusi-lab4-postgres-1 | Up 3 hours (healthy)
|
||||
mtusi-lab4-reconciler-1 | Up 19 seconds
|
||||
/mtusi-lab4-postgres-1 StartedAt=2026-11-12T10:59:08.23975453Z
|
||||
/mtusi-lab4-minio-1 StartedAt=2026-11-12T11:01:27.455198717Z
|
||||
## test
|
||||
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
|
||||
## after
|
||||
mtusi-lab4-api-1 | Up 14 seconds (healthy)
|
||||
mtusi-lab4-api-2 | Up 14 seconds (healthy)
|
||||
mtusi-lab4-lb-1 | Up 6 seconds (healthy)
|
||||
mtusi-lab4-migrate-1 | Exited (0) 15 seconds ago
|
||||
mtusi-lab4-minio-1 | Up 32 seconds (healthy)
|
||||
mtusi-lab4-minio-init-1 | Exited (0) 22 seconds ago
|
||||
mtusi-lab4-postgres-1 | Up 31 seconds (healthy)
|
||||
mtusi-lab4-reconciler-1 | Up About a minute
|
||||
/mtusi-lab4-postgres-1 StartedAt=2026-11-12T13:29:39.704778557Z
|
||||
/mtusi-lab4-minio-1 StartedAt=2026-11-12T13:29:38.729925744Z
|
||||
volume mtusi-lab4_minio_data
|
||||
volume mtusi-lab4_postgres_data
|
||||
@@ -0,0 +1,107 @@
|
||||
============================= test session starts =============================
|
||||
platform win32 -- Python 3.14.3, pytest-9.1.1, pluggy-1.7.0 -- D:\диск С\Документы\unic\VP\lab4\mtusi2026lab4\.venv\Scripts\python.exe
|
||||
rootdir: D:\диск С\Документы\unic\VP\lab4\mtusi2026lab4
|
||||
configfile: pytest.ini
|
||||
testpaths: student-tests
|
||||
plugins: anyio-4.15.1
|
||||
collecting ... collected 97 items
|
||||
|
||||
student-tests/test_attachments_api.py::test_upload_png_and_download_by_other_member PASSED [ 1%]
|
||||
student-tests/test_attachments_api.py::test_upload_jpeg_with_unicode_filename PASSED [ 2%]
|
||||
student-tests/test_attachments_api.py::test_message_with_attachments_keeps_order_and_is_readable PASSED [ 3%]
|
||||
student-tests/test_attachments_api.py::test_missing_attachment_ids_equals_empty_list_for_idempotency PASSED [ 4%]
|
||||
student-tests/test_attachments_api.py::test_too_large_file_is_rejected_before_reading PASSED [ 5%]
|
||||
student-tests/test_attachments_api.py::test_too_large_stream_without_content_length PASSED [ 6%]
|
||||
student-tests/test_attachments_api.py::test_exactly_max_bytes_is_accepted PASSED [ 7%]
|
||||
student-tests/test_attachments_api.py::test_pixel_limit_checked_from_header PASSED [ 8%]
|
||||
student-tests/test_attachments_api.py::test_corrupted_image_is_415[truncated-png] PASSED [ 9%]
|
||||
student-tests/test_attachments_api.py::test_corrupted_image_is_415[png-bad-crc] PASSED [ 10%]
|
||||
student-tests/test_attachments_api.py::test_corrupted_image_is_415[truncated-jpeg] PASSED [ 11%]
|
||||
student-tests/test_attachments_api.py::test_corrupted_image_is_415[png-signature-only] PASSED [ 12%]
|
||||
student-tests/test_attachments_api.py::test_corrupted_image_is_415[text] PASSED [ 13%]
|
||||
student-tests/test_attachments_api.py::test_mime_spoofing_is_415[png-as-jpeg] PASSED [ 14%]
|
||||
student-tests/test_attachments_api.py::test_mime_spoofing_is_415[jpeg-as-png] PASSED [ 15%]
|
||||
student-tests/test_attachments_api.py::test_mime_spoofing_is_415[png-as-text] PASSED [ 16%]
|
||||
student-tests/test_attachments_api.py::test_mime_spoofing_is_415[png-as-gif] PASSED [ 17%]
|
||||
student-tests/test_attachments_api.py::test_mime_spoofing_is_415[gif-as-png] PASSED [ 18%]
|
||||
student-tests/test_attachments_api.py::test_empty_body_is_400 PASSED [ 19%]
|
||||
student-tests/test_attachments_api.py::test_dangerous_filename_is_400[a/b.png] PASSED [ 20%]
|
||||
student-tests/test_attachments_api.py::test_dangerous_filename_is_400[..\\evil.png] PASSED [ 21%]
|
||||
student-tests/test_attachments_api.py::test_dangerous_filename_is_400[a\x00b.png] PASSED [ 22%]
|
||||
student-tests/test_attachments_api.py::test_dangerous_filename_is_400[line\nbreak.png] PASSED [ 23%]
|
||||
student-tests/test_attachments_api.py::test_dangerous_filename_is_400[tab\t.png] PASSED [ 24%]
|
||||
student-tests/test_attachments_api.py::test_dangerous_filename_is_400[ ] PASSED [ 25%]
|
||||
student-tests/test_attachments_api.py::test_dangerous_filename_is_400[..] PASSED [ 26%]
|
||||
student-tests/test_attachments_api.py::test_dangerous_filename_is_400[xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] PASSED [ 27%]
|
||||
student-tests/test_attachments_api.py::test_missing_filename_is_400 PASSED [ 28%]
|
||||
student-tests/test_attachments_api.py::test_outsider_cannot_upload_or_read PASSED [ 29%]
|
||||
student-tests/test_attachments_api.py::test_unknown_and_unauthenticated PASSED [ 30%]
|
||||
student-tests/test_attachments_api.py::test_missing_variant_is_404_and_bad_variant_is_400 PASSED [ 31%]
|
||||
student-tests/test_attachments_api.py::test_foreign_attachment_id_in_message_is_404 PASSED [ 32%]
|
||||
student-tests/test_attachments_api.py::test_database_rejects_link_to_attachment_of_other_chat PASSED [ 34%]
|
||||
student-tests/test_attachments_api.py::test_invalid_message_attachments_are_400[11-ids] PASSED [ 35%]
|
||||
student-tests/test_attachments_api.py::test_invalid_message_attachments_are_400[blank-text] PASSED [ 36%]
|
||||
student-tests/test_attachments_api.py::test_invalid_message_attachments_are_400[empty-without-attachments] PASSED [ 37%]
|
||||
student-tests/test_attachments_api.py::test_invalid_message_attachments_are_400[bad-uuid] PASSED [ 38%]
|
||||
student-tests/test_attachments_api.py::test_duplicate_attachment_ids_are_400 PASSED [ 39%]
|
||||
student-tests/test_attachments_api.py::test_storage_down_on_upload_is_503_without_metadata PASSED [ 40%]
|
||||
student-tests/test_attachments_api.py::test_storage_down_on_download_is_503 PASSED [ 41%]
|
||||
student-tests/test_attachments_api.py::test_commit_failure_after_put_deletes_object PASSED [ 42%]
|
||||
student-tests/test_attachments_api.py::test_orphan_left_by_failed_compensation_is_removed_only_after_grace PASSED [ 43%]
|
||||
student-tests/test_attachments_api.py::test_upload_slots_exhausted_is_503 PASSED [ 44%]
|
||||
student-tests/test_attachments_api.py::test_bucket_is_private_outside_api PASSED [ 45%]
|
||||
student-tests/test_attachments_api.py::test_api_credentials_cannot_administer_storage PASSED [ 46%]
|
||||
student-tests/test_auth_api.py::test_login_returns_session PASSED [ 47%]
|
||||
student-tests/test_auth_api.py::test_jwt_payload_contains_sub_exp_jti PASSED [ 48%]
|
||||
student-tests/test_auth_api.py::test_wrong_password_and_unknown_user_give_same_401 PASSED [ 49%]
|
||||
student-tests/test_auth_api.py::test_malformed_basic_returns_401 PASSED [ 50%]
|
||||
student-tests/test_auth_api.py::test_login_with_body_returns_400_and_creates_no_session PASSED [ 51%]
|
||||
student-tests/test_auth_api.py::test_password_with_colon_and_unicode PASSED [ 52%]
|
||||
student-tests/test_auth_api.py::test_protected_endpoint_requires_bearer PASSED [ 53%]
|
||||
student-tests/test_auth_api.py::test_x_user_id_does_not_override_token PASSED [ 54%]
|
||||
student-tests/test_auth_api.py::test_forged_token_is_rejected PASSED [ 55%]
|
||||
student-tests/test_auth_api.py::test_logout_revokes_only_current_token PASSED [ 56%]
|
||||
student-tests/test_auth_api.py::test_session_expires PASSED [ 57%]
|
||||
student-tests/test_chats_api.py::test_unknown_member_returns_400_and_nothing_is_saved PASSED [ 58%]
|
||||
student-tests/test_chats_api.py::test_created_chat_is_stored_with_members PASSED [ 59%]
|
||||
student-tests/test_chats_api.py::test_foreign_chat_returns_404 PASSED [ 60%]
|
||||
student-tests/test_chats_api.py::test_member_sees_chat PASSED [ 61%]
|
||||
student-tests/test_chats_api.py::test_creator_must_be_member PASSED [ 62%]
|
||||
student-tests/test_chats_api.py::test_duplicate_members_return_400 PASSED [ 63%]
|
||||
student-tests/test_idempotency_api.py::test_missing_or_invalid_key_returns_400 PASSED [ 64%]
|
||||
student-tests/test_idempotency_api.py::test_valid_key_alphabet_and_max_length PASSED [ 65%]
|
||||
student-tests/test_idempotency_api.py::test_replay_returns_same_message_without_duplicate PASSED [ 67%]
|
||||
student-tests/test_idempotency_api.py::test_json_key_order_and_whitespace_do_not_matter PASSED [ 68%]
|
||||
student-tests/test_idempotency_api.py::test_same_key_with_other_body_returns_409 PASSED [ 69%]
|
||||
student-tests/test_idempotency_api.py::test_key_scope_is_user_and_chat PASSED [ 70%]
|
||||
student-tests/test_idempotency_api.py::test_replay_still_checks_session_and_membership PASSED [ 71%]
|
||||
student-tests/test_idempotency_api.py::test_failed_request_does_not_consume_key PASSED [ 72%]
|
||||
student-tests/test_idempotency_api.py::test_expired_key_is_reusable PASSED [ 73%]
|
||||
student-tests/test_idempotency_api.py::test_concurrent_requests_with_one_key_create_one_message PASSED [ 74%]
|
||||
student-tests/test_idempotency_api.py::test_concurrent_different_bodies_one_key_only_one_wins PASSED [ 75%]
|
||||
student-tests/test_idempotency_api.py::test_instance_id_header_is_present_and_stable PASSED [ 76%]
|
||||
student-tests/test_idempotency_api.py::test_ready_returns_503_while_draining PASSED [ 77%]
|
||||
student-tests/test_messages_api.py::test_empty_message_returns_400 PASSED [ 78%]
|
||||
student-tests/test_messages_api.py::test_sender_is_taken_from_token PASSED [ 79%]
|
||||
student-tests/test_messages_api.py::test_pagination_over_several_pages PASSED [ 80%]
|
||||
student-tests/test_messages_api.py::test_cursor_from_another_chat_returns_400 PASSED [ 81%]
|
||||
student-tests/test_messages_api.py::test_invalid_limit_returns_400 PASSED [ 82%]
|
||||
student-tests/test_reconcile.py::test_detects_both_sides_and_fixes_only_safe_cases PASSED [ 83%]
|
||||
student-tests/test_reconcile.py::test_message_cannot_use_attachment_removed_by_reconcile PASSED [ 84%]
|
||||
student-tests/test_reconcile.py::test_old_orphans_deleted_and_used_objects_kept PASSED [ 85%]
|
||||
student-tests/test_reconcile.py::test_apply_refuses_mass_delete PASSED [ 86%]
|
||||
student-tests/test_reconcile.py::test_recheck_keeps_object_whose_metadata_appeared_after_listing PASSED [ 87%]
|
||||
student-tests/test_reconcile.py::test_recheck_keeps_row_that_got_referenced PASSED [ 88%]
|
||||
student-tests/test_reconcile.py::test_second_run_is_refused_while_first_holds_lock PASSED [ 89%]
|
||||
student-tests/test_reconcile.py::test_unordered_stream_aborts PASSED [ 90%]
|
||||
student-tests/test_users_api.py::test_invalid_json_returns_400 PASSED [ 91%]
|
||||
student-tests/test_users_api.py::test_extra_field_and_wrong_type_return_400 PASSED [ 92%]
|
||||
student-tests/test_users_api.py::test_duplicate_username_returns_409 PASSED [ 93%]
|
||||
student-tests/test_users_api.py::test_unicode_display_name_is_kept PASSED [ 94%]
|
||||
student-tests/test_users_api.py::test_password_is_required_and_length_checked PASSED [ 95%]
|
||||
student-tests/test_users_api.py::test_password_is_hashed_and_never_returned PASSED [ 96%]
|
||||
student-tests/test_users_api.py::test_me_returns_current_user PASSED [ 97%]
|
||||
student-tests/test_users_api.py::test_x_user_id_no_longer_authenticates PASSED [ 98%]
|
||||
student-tests/test_users_api.py::test_every_response_has_request_id PASSED [100%]
|
||||
|
||||
======================= 97 passed in 170.00s (0:02:50) ========================
|
||||
@@ -0,0 +1,396 @@
|
||||
{
|
||||
"object_size_bytes": 1024,
|
||||
"reconciler_limits": "0.25 CPU, 128 MiB",
|
||||
"runs": [
|
||||
{
|
||||
"objects": 1000,
|
||||
"seed_seconds": 23.4,
|
||||
"rows_plan": "Sort (cost=92.33..94.83 rows=1000 width=47)",
|
||||
"s3_list_requests": 1,
|
||||
"shallow": [
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 1000,
|
||||
"rows_scanned": 1000,
|
||||
"ok": 1000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 1.524,
|
||||
"total": 1.524
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 87.7
|
||||
},
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 1000,
|
||||
"rows_scanned": 1000,
|
||||
"ok": 1000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 1.215,
|
||||
"total": 1.215
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 87.6
|
||||
},
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 1000,
|
||||
"rows_scanned": 1000,
|
||||
"ok": 1000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 1.27,
|
||||
"total": 1.27
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 87.1
|
||||
}
|
||||
],
|
||||
"deep": [
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": true,
|
||||
"objects_scanned": 1000,
|
||||
"rows_scanned": 1000,
|
||||
"ok": 1000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 10.076,
|
||||
"total": 10.076
|
||||
},
|
||||
"bytes_read": 1024000,
|
||||
"peak_rss_mib": 87.6
|
||||
}
|
||||
],
|
||||
"shallow_median_seconds": 1.27,
|
||||
"shallow_objects_per_second": 787,
|
||||
"shallow_peak_rss_mib": 87.7,
|
||||
"shallow_all_ok": true,
|
||||
"deep_median_seconds": 10.076,
|
||||
"deep_objects_per_second": 99,
|
||||
"deep_peak_rss_mib": 87.6,
|
||||
"deep_all_ok": true
|
||||
},
|
||||
{
|
||||
"objects": 10000,
|
||||
"seed_seconds": 93.8,
|
||||
"rows_plan": "Index Only Scan using attachments_object_key_key on attachments (cost=0.29..685.28 rows=9999 width=47)",
|
||||
"s3_list_requests": 10,
|
||||
"shallow": [
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 10000,
|
||||
"rows_scanned": 10000,
|
||||
"ok": 10000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 6.315,
|
||||
"total": 6.315
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 88.9
|
||||
},
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 10000,
|
||||
"rows_scanned": 10000,
|
||||
"ok": 10000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 6.387,
|
||||
"total": 6.387
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.5
|
||||
},
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 10000,
|
||||
"rows_scanned": 10000,
|
||||
"ok": 10000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 7.298,
|
||||
"total": 7.298
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.1
|
||||
}
|
||||
],
|
||||
"deep": [
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": true,
|
||||
"objects_scanned": 10000,
|
||||
"rows_scanned": 10000,
|
||||
"ok": 10000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 89.196,
|
||||
"total": 89.196
|
||||
},
|
||||
"bytes_read": 10240000,
|
||||
"peak_rss_mib": 88.9
|
||||
}
|
||||
],
|
||||
"shallow_median_seconds": 6.387,
|
||||
"shallow_objects_per_second": 1566,
|
||||
"shallow_peak_rss_mib": 89.5,
|
||||
"shallow_all_ok": true,
|
||||
"deep_median_seconds": 89.196,
|
||||
"deep_objects_per_second": 112,
|
||||
"deep_peak_rss_mib": 88.9,
|
||||
"deep_all_ok": true
|
||||
},
|
||||
{
|
||||
"objects": 50000,
|
||||
"seed_seconds": 481.7,
|
||||
"rows_plan": "Index Only Scan using attachments_object_key_key on attachments (cost=0.41..3341.41 rows=49995 width=47)",
|
||||
"s3_list_requests": 50,
|
||||
"shallow": [
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 50000,
|
||||
"rows_scanned": 50000,
|
||||
"ok": 50000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 35.798,
|
||||
"total": 35.798
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.0
|
||||
},
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 50000,
|
||||
"rows_scanned": 50000,
|
||||
"ok": 50000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 34.315,
|
||||
"total": 34.316
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.1
|
||||
},
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 50000,
|
||||
"rows_scanned": 50000,
|
||||
"ok": 50000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 33.576,
|
||||
"total": 33.576
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.3
|
||||
}
|
||||
],
|
||||
"deep": [
|
||||
{
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 0,
|
||||
"verify_checksums": true,
|
||||
"objects_scanned": 50000,
|
||||
"rows_scanned": 50000,
|
||||
"ok": 50000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 487.616,
|
||||
"total": 487.616
|
||||
},
|
||||
"bytes_read": 51200000,
|
||||
"peak_rss_mib": 88.8
|
||||
}
|
||||
],
|
||||
"shallow_median_seconds": 34.315,
|
||||
"shallow_objects_per_second": 1457,
|
||||
"shallow_peak_rss_mib": 89.3,
|
||||
"shallow_all_ok": true,
|
||||
"deep_median_seconds": 487.616,
|
||||
"deep_objects_per_second": 103,
|
||||
"deep_peak_rss_mib": 88.8,
|
||||
"deep_all_ok": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
{
|
||||
"objects": 10000,
|
||||
"grace_seconds": 180,
|
||||
"seed_seconds": 115.1,
|
||||
"baseline": {
|
||||
"objects": 10000,
|
||||
"rows": 10000,
|
||||
"referenced_rows": 5000
|
||||
},
|
||||
"baseline_reconcile": {
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 180,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 10000,
|
||||
"rows_scanned": 10000,
|
||||
"ok": 10000,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 0,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 0,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 7.061,
|
||||
"total": 7.061
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 88.8
|
||||
},
|
||||
"injected": {
|
||||
"orphan_object": 20,
|
||||
"missing_object": 10,
|
||||
"missing_object_referenced": 10,
|
||||
"size_mismatch": 10,
|
||||
"checksum_mismatch": 10,
|
||||
"orphan_object_fresh": 10,
|
||||
"missing_object_fresh": 10
|
||||
},
|
||||
"after_injection": {
|
||||
"objects": 10000,
|
||||
"rows": 10000,
|
||||
"referenced_rows": 5000
|
||||
},
|
||||
"dry_run_shallow": {
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 180,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 10000,
|
||||
"rows_scanned": 10000,
|
||||
"ok": 9960,
|
||||
"issues": {
|
||||
"orphan_object": 20,
|
||||
"orphan_object_fresh": 10,
|
||||
"missing_object": 10,
|
||||
"missing_object_referenced": 10,
|
||||
"missing_object_fresh": 10,
|
||||
"size_mismatch": 10,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 7.299,
|
||||
"total": 7.299
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.6
|
||||
},
|
||||
"state_unchanged_after_dry_run": true,
|
||||
"apply_with_brake": {
|
||||
"mode": "apply",
|
||||
"grace_seconds": 180,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 10000,
|
||||
"rows_scanned": 10000,
|
||||
"ok": 9960,
|
||||
"issues": {
|
||||
"orphan_object": 20,
|
||||
"orphan_object_fresh": 10,
|
||||
"missing_object": 10,
|
||||
"missing_object_referenced": 10,
|
||||
"missing_object_fresh": 10,
|
||||
"size_mismatch": 10,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 7.39,
|
||||
"total": 7.39
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.1,
|
||||
"aborted": "к удалению 30 > --max-deletes 10: ничего не изменено"
|
||||
},
|
||||
"state_unchanged_after_brake": true,
|
||||
"apply": {
|
||||
"mode": "apply",
|
||||
"grace_seconds": 180,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 10000,
|
||||
"rows_scanned": 10000,
|
||||
"ok": 9960,
|
||||
"issues": {
|
||||
"orphan_object": 20,
|
||||
"orphan_object_fresh": 10,
|
||||
"missing_object": 10,
|
||||
"missing_object_referenced": 10,
|
||||
"missing_object_fresh": 10,
|
||||
"size_mismatch": 10,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 20,
|
||||
"rows_deleted": 10,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 6.581,
|
||||
"total": 7.297
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.0
|
||||
},
|
||||
"after_apply": {
|
||||
"objects": 9980,
|
||||
"rows": 9990,
|
||||
"referenced_rows": 5000
|
||||
},
|
||||
"apply_again": {
|
||||
"mode": "apply",
|
||||
"grace_seconds": 180,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 9980,
|
||||
"rows_scanned": 9990,
|
||||
"ok": 9960,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 10,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 10,
|
||||
"missing_object_fresh": 10,
|
||||
"size_mismatch": 10,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 7.485,
|
||||
"total": 7.486
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.4
|
||||
},
|
||||
"fresh_still_fresh_at_apply": true,
|
||||
"dry_run_deep": {
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 180,
|
||||
"verify_checksums": true,
|
||||
"objects_scanned": 9980,
|
||||
"rows_scanned": 9990,
|
||||
"ok": 9950,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 10,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 10,
|
||||
"missing_object_fresh": 10,
|
||||
"size_mismatch": 10,
|
||||
"checksum_mismatch": 10
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 93.089,
|
||||
"total": 93.09
|
||||
},
|
||||
"bytes_read": 10199040,
|
||||
"peak_rss_mib": 88.8
|
||||
},
|
||||
"detection_exact": {
|
||||
"orphan_object": true,
|
||||
"missing_object": true,
|
||||
"missing_object_referenced": true,
|
||||
"size_mismatch": true,
|
||||
"checksum_mismatch": true,
|
||||
"orphan_object_fresh": true,
|
||||
"missing_object_fresh": true
|
||||
},
|
||||
"safety": {
|
||||
"referenced_rows_kept": true,
|
||||
"deleted_objects_are_exactly_orphans": true,
|
||||
"fresh_objects_kept": true,
|
||||
"rows_deleted_exactly_missing_free": true
|
||||
},
|
||||
"after_grace_apply": {
|
||||
"mode": "apply",
|
||||
"grace_seconds": 180,
|
||||
"verify_checksums": false,
|
||||
"objects_scanned": 9980,
|
||||
"rows_scanned": 9990,
|
||||
"ok": 9960,
|
||||
"issues": {
|
||||
"orphan_object": 10,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 10,
|
||||
"missing_object_referenced": 10,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 10,
|
||||
"checksum_mismatch": 0
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 10,
|
||||
"rows_deleted": 10,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 6.671,
|
||||
"total": 7.272
|
||||
},
|
||||
"bytes_read": 0,
|
||||
"peak_rss_mib": 89.1
|
||||
},
|
||||
"final_dry_run": {
|
||||
"mode": "dry-run",
|
||||
"grace_seconds": 180,
|
||||
"verify_checksums": true,
|
||||
"objects_scanned": 9970,
|
||||
"rows_scanned": 9980,
|
||||
"ok": 9950,
|
||||
"issues": {
|
||||
"orphan_object": 0,
|
||||
"orphan_object_fresh": 0,
|
||||
"missing_object": 0,
|
||||
"missing_object_referenced": 10,
|
||||
"missing_object_fresh": 0,
|
||||
"size_mismatch": 10,
|
||||
"checksum_mismatch": 10
|
||||
},
|
||||
"actions": {
|
||||
"objects_deleted": 0,
|
||||
"rows_deleted": 0,
|
||||
"skipped_on_recheck": 0
|
||||
},
|
||||
"seconds": {
|
||||
"scan": 95.407,
|
||||
"total": 95.407
|
||||
},
|
||||
"bytes_read": 10199040,
|
||||
"peak_rss_mib": 89.2
|
||||
},
|
||||
"final": {
|
||||
"objects": 9970,
|
||||
"rows": 9980,
|
||||
"referenced_rows": 5000
|
||||
},
|
||||
"result": "PASS"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"before": {
|
||||
"upload_status": 201
|
||||
},
|
||||
"minio_stopped": {
|
||||
"ready_status": 200,
|
||||
"message_status": 201,
|
||||
"metadata_status": 200,
|
||||
"upload": {
|
||||
"status": 503,
|
||||
"seconds": 1.06,
|
||||
"error": "unavailable"
|
||||
},
|
||||
"download": {
|
||||
"status": 503,
|
||||
"seconds": 1.08,
|
||||
"error": "unavailable"
|
||||
}
|
||||
},
|
||||
"after_start": {
|
||||
"upload_status": 201,
|
||||
"recovery_seconds": 1.2,
|
||||
"download_status": 200
|
||||
},
|
||||
"result": "PASS"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
$ python scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
exit=0
|
||||
$ python tests/smoke.py --base-url http://localhost:8080
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit=0
|
||||
@@ -0,0 +1,329 @@
|
||||
{
|
||||
"file_bytes": 10393871,
|
||||
"api_limits": "1 CPU, 512M per replica, 2 replicas",
|
||||
"method": "peak RSS (VmHWM) of the API process, reset after warm-up; growth = peak after - RSS before",
|
||||
"runs": [
|
||||
{
|
||||
"concurrency": 1,
|
||||
"statuses": {
|
||||
"201": 1
|
||||
},
|
||||
"wall_seconds": 0.49,
|
||||
"latency_201_seconds": {
|
||||
"p50": 0.49,
|
||||
"max": 0.49
|
||||
},
|
||||
"replicas": {
|
||||
"fd29b4d34164": {
|
||||
"uploads_201": 1,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.0,
|
||||
"rss_now_mib": 107.0
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 127.1,
|
||||
"rss_now_mib": 107.4
|
||||
},
|
||||
"rss_peak_growth_mib": 20.1
|
||||
},
|
||||
"43dcfb7f57f5": {
|
||||
"uploads_201": 0,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.7,
|
||||
"rss_now_mib": 107.7
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 107.7,
|
||||
"rss_now_mib": 107.7
|
||||
},
|
||||
"rss_peak_growth_mib": 0.0
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 127.1,
|
||||
"max_rss_peak_growth_mib": 20.1,
|
||||
"upload_slots_per_replica": 8
|
||||
},
|
||||
{
|
||||
"concurrency": 10,
|
||||
"statuses": {
|
||||
"201": 10
|
||||
},
|
||||
"wall_seconds": 2.72,
|
||||
"latency_201_seconds": {
|
||||
"p50": 2.66,
|
||||
"max": 2.71
|
||||
},
|
||||
"replicas": {
|
||||
"fd29b4d34164": {
|
||||
"uploads_201": 5,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.4,
|
||||
"rss_now_mib": 107.4
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 201.9,
|
||||
"rss_now_mib": 125.2
|
||||
},
|
||||
"rss_peak_growth_mib": 94.5
|
||||
},
|
||||
"43dcfb7f57f5": {
|
||||
"uploads_201": 5,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.7,
|
||||
"rss_now_mib": 107.7
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 169.2,
|
||||
"rss_now_mib": 108.6
|
||||
},
|
||||
"rss_peak_growth_mib": 61.5
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 201.9,
|
||||
"max_rss_peak_growth_mib": 94.5,
|
||||
"upload_slots_per_replica": 8
|
||||
},
|
||||
{
|
||||
"concurrency": 20,
|
||||
"statuses": {
|
||||
"201": 19,
|
||||
"503": 1
|
||||
},
|
||||
"wall_seconds": 4.48,
|
||||
"latency_201_seconds": {
|
||||
"p50": 4.08,
|
||||
"max": 4.47
|
||||
},
|
||||
"replicas": {
|
||||
"fd29b4d34164": {
|
||||
"uploads_201": 9,
|
||||
"before": {
|
||||
"rss_peak_mib": 125.2,
|
||||
"rss_now_mib": 125.2
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 227.3,
|
||||
"rss_now_mib": 116.7
|
||||
},
|
||||
"rss_peak_growth_mib": 102.1
|
||||
},
|
||||
"43dcfb7f57f5": {
|
||||
"uploads_201": 10,
|
||||
"before": {
|
||||
"rss_peak_mib": 108.6,
|
||||
"rss_now_mib": 108.6
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 221.5,
|
||||
"rss_now_mib": 114.1
|
||||
},
|
||||
"rss_peak_growth_mib": 112.9
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 227.3,
|
||||
"max_rss_peak_growth_mib": 112.9,
|
||||
"upload_slots_per_replica": 8
|
||||
},
|
||||
{
|
||||
"concurrency": 40,
|
||||
"statuses": {
|
||||
"503": 24,
|
||||
"201": 16
|
||||
},
|
||||
"wall_seconds": 6.7,
|
||||
"latency_201_seconds": {
|
||||
"p50": 6.58,
|
||||
"max": 6.68
|
||||
},
|
||||
"replicas": {
|
||||
"fd29b4d34164": {
|
||||
"uploads_201": 8,
|
||||
"before": {
|
||||
"rss_peak_mib": 116.7,
|
||||
"rss_now_mib": 116.7
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 241.6,
|
||||
"rss_now_mib": 123.3
|
||||
},
|
||||
"rss_peak_growth_mib": 124.9
|
||||
},
|
||||
"43dcfb7f57f5": {
|
||||
"uploads_201": 8,
|
||||
"before": {
|
||||
"rss_peak_mib": 114.1,
|
||||
"rss_now_mib": 114.1
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 258.9,
|
||||
"rss_now_mib": 137.2
|
||||
},
|
||||
"rss_peak_growth_mib": 144.8
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 258.9,
|
||||
"max_rss_peak_growth_mib": 144.8,
|
||||
"upload_slots_per_replica": 8
|
||||
},
|
||||
{
|
||||
"concurrency": 1,
|
||||
"statuses": {
|
||||
"201": 1
|
||||
},
|
||||
"wall_seconds": 0.51,
|
||||
"latency_201_seconds": {
|
||||
"p50": 0.51,
|
||||
"max": 0.51
|
||||
},
|
||||
"replicas": {
|
||||
"f9df3bf3edcf": {
|
||||
"uploads_201": 1,
|
||||
"before": {
|
||||
"rss_peak_mib": 106.9,
|
||||
"rss_now_mib": 106.9
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 127.9,
|
||||
"rss_now_mib": 108.1
|
||||
},
|
||||
"rss_peak_growth_mib": 21.0
|
||||
},
|
||||
"efd46bda36cc": {
|
||||
"uploads_201": 0,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.3,
|
||||
"rss_now_mib": 107.3
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 107.3,
|
||||
"rss_now_mib": 107.3
|
||||
},
|
||||
"rss_peak_growth_mib": 0.0
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 127.9,
|
||||
"max_rss_peak_growth_mib": 21.0,
|
||||
"upload_slots_per_replica": 64
|
||||
},
|
||||
{
|
||||
"concurrency": 10,
|
||||
"statuses": {
|
||||
"201": 10
|
||||
},
|
||||
"wall_seconds": 2.99,
|
||||
"latency_201_seconds": {
|
||||
"p50": 2.96,
|
||||
"max": 2.98
|
||||
},
|
||||
"replicas": {
|
||||
"f9df3bf3edcf": {
|
||||
"uploads_201": 5,
|
||||
"before": {
|
||||
"rss_peak_mib": 108.1,
|
||||
"rss_now_mib": 108.1
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 187.5,
|
||||
"rss_now_mib": 108.3
|
||||
},
|
||||
"rss_peak_growth_mib": 79.4
|
||||
},
|
||||
"efd46bda36cc": {
|
||||
"uploads_201": 5,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.3,
|
||||
"rss_now_mib": 107.3
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 171.6,
|
||||
"rss_now_mib": 112.4
|
||||
},
|
||||
"rss_peak_growth_mib": 64.3
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 187.5,
|
||||
"max_rss_peak_growth_mib": 79.4,
|
||||
"upload_slots_per_replica": 64
|
||||
},
|
||||
{
|
||||
"concurrency": 20,
|
||||
"statuses": {
|
||||
"201": 20
|
||||
},
|
||||
"wall_seconds": 4.9,
|
||||
"latency_201_seconds": {
|
||||
"p50": 4.74,
|
||||
"max": 4.89
|
||||
},
|
||||
"replicas": {
|
||||
"f9df3bf3edcf": {
|
||||
"uploads_201": 10,
|
||||
"before": {
|
||||
"rss_peak_mib": 108.3,
|
||||
"rss_now_mib": 108.3
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 274.8,
|
||||
"rss_now_mib": 196.9
|
||||
},
|
||||
"rss_peak_growth_mib": 166.5
|
||||
},
|
||||
"efd46bda36cc": {
|
||||
"uploads_201": 10,
|
||||
"before": {
|
||||
"rss_peak_mib": 112.4,
|
||||
"rss_now_mib": 112.4
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 258.3,
|
||||
"rss_now_mib": 114.2
|
||||
},
|
||||
"rss_peak_growth_mib": 145.9
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 274.8,
|
||||
"max_rss_peak_growth_mib": 166.5,
|
||||
"upload_slots_per_replica": 64
|
||||
},
|
||||
{
|
||||
"concurrency": 40,
|
||||
"statuses": {
|
||||
"201": 40
|
||||
},
|
||||
"wall_seconds": 10.49,
|
||||
"latency_201_seconds": {
|
||||
"p50": 10.06,
|
||||
"max": 10.47
|
||||
},
|
||||
"replicas": {
|
||||
"f9df3bf3edcf": {
|
||||
"uploads_201": 20,
|
||||
"before": {
|
||||
"rss_peak_mib": 196.9,
|
||||
"rss_now_mib": 196.9
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 400.1,
|
||||
"rss_now_mib": 216.1
|
||||
},
|
||||
"rss_peak_growth_mib": 203.2
|
||||
},
|
||||
"efd46bda36cc": {
|
||||
"uploads_201": 20,
|
||||
"before": {
|
||||
"rss_peak_mib": 114.2,
|
||||
"rss_now_mib": 114.2
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 422.3,
|
||||
"rss_now_mib": 193.2
|
||||
},
|
||||
"rss_peak_growth_mib": 308.1
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 422.3,
|
||||
"max_rss_peak_growth_mib": 308.1,
|
||||
"upload_slots_per_replica": 64
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,329 @@
|
||||
{
|
||||
"file_bytes": 10393739,
|
||||
"api_limits": "1 CPU, 512M per replica, 2 replicas",
|
||||
"method": "peak RSS (VmHWM) of the API process, reset after warm-up; growth = peak after - RSS before",
|
||||
"runs": [
|
||||
{
|
||||
"concurrency": 1,
|
||||
"statuses": {
|
||||
"201": 1
|
||||
},
|
||||
"wall_seconds": 0.51,
|
||||
"latency_201_seconds": {
|
||||
"p50": 0.5,
|
||||
"max": 0.5
|
||||
},
|
||||
"replicas": {
|
||||
"968e3b02a6f8": {
|
||||
"uploads_201": 1,
|
||||
"before": {
|
||||
"rss_peak_mib": 106.8,
|
||||
"rss_now_mib": 106.8
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 127.7,
|
||||
"rss_now_mib": 107.9
|
||||
},
|
||||
"rss_peak_growth_mib": 20.9
|
||||
},
|
||||
"f0da4f198ba9": {
|
||||
"uploads_201": 0,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.1,
|
||||
"rss_now_mib": 107.1
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 107.1,
|
||||
"rss_now_mib": 107.1
|
||||
},
|
||||
"rss_peak_growth_mib": 0.0
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 127.7,
|
||||
"max_rss_peak_growth_mib": 20.9,
|
||||
"upload_slots_per_replica": 8
|
||||
},
|
||||
{
|
||||
"concurrency": 10,
|
||||
"statuses": {
|
||||
"201": 10
|
||||
},
|
||||
"wall_seconds": 2.82,
|
||||
"latency_201_seconds": {
|
||||
"p50": 2.71,
|
||||
"max": 2.81
|
||||
},
|
||||
"replicas": {
|
||||
"968e3b02a6f8": {
|
||||
"uploads_201": 5,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.9,
|
||||
"rss_now_mib": 107.9
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 188.3,
|
||||
"rss_now_mib": 107.9
|
||||
},
|
||||
"rss_peak_growth_mib": 80.4
|
||||
},
|
||||
"f0da4f198ba9": {
|
||||
"uploads_201": 5,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.1,
|
||||
"rss_now_mib": 107.1
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 167.8,
|
||||
"rss_now_mib": 108.3
|
||||
},
|
||||
"rss_peak_growth_mib": 60.7
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 188.3,
|
||||
"max_rss_peak_growth_mib": 80.4,
|
||||
"upload_slots_per_replica": 8
|
||||
},
|
||||
{
|
||||
"concurrency": 20,
|
||||
"statuses": {
|
||||
"503": 4,
|
||||
"201": 16
|
||||
},
|
||||
"wall_seconds": 4.49,
|
||||
"latency_201_seconds": {
|
||||
"p50": 4.33,
|
||||
"max": 4.48
|
||||
},
|
||||
"replicas": {
|
||||
"968e3b02a6f8": {
|
||||
"uploads_201": 8,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.9,
|
||||
"rss_now_mib": 107.9
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 227.3,
|
||||
"rss_now_mib": 110.5
|
||||
},
|
||||
"rss_peak_growth_mib": 119.4
|
||||
},
|
||||
"f0da4f198ba9": {
|
||||
"uploads_201": 8,
|
||||
"before": {
|
||||
"rss_peak_mib": 108.3,
|
||||
"rss_now_mib": 108.3
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 241.4,
|
||||
"rss_now_mib": 111.3
|
||||
},
|
||||
"rss_peak_growth_mib": 133.1
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 241.4,
|
||||
"max_rss_peak_growth_mib": 133.1,
|
||||
"upload_slots_per_replica": 8
|
||||
},
|
||||
{
|
||||
"concurrency": 40,
|
||||
"statuses": {
|
||||
"503": 24,
|
||||
"201": 16
|
||||
},
|
||||
"wall_seconds": 7.03,
|
||||
"latency_201_seconds": {
|
||||
"p50": 6.92,
|
||||
"max": 7.01
|
||||
},
|
||||
"replicas": {
|
||||
"968e3b02a6f8": {
|
||||
"uploads_201": 8,
|
||||
"before": {
|
||||
"rss_peak_mib": 110.5,
|
||||
"rss_now_mib": 110.5
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 230.3,
|
||||
"rss_now_mib": 120.3
|
||||
},
|
||||
"rss_peak_growth_mib": 119.8
|
||||
},
|
||||
"f0da4f198ba9": {
|
||||
"uploads_201": 8,
|
||||
"before": {
|
||||
"rss_peak_mib": 111.3,
|
||||
"rss_now_mib": 111.3
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 241.7,
|
||||
"rss_now_mib": 123.9
|
||||
},
|
||||
"rss_peak_growth_mib": 130.4
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 241.7,
|
||||
"max_rss_peak_growth_mib": 130.4,
|
||||
"upload_slots_per_replica": 8
|
||||
},
|
||||
{
|
||||
"concurrency": 1,
|
||||
"statuses": {
|
||||
"201": 1
|
||||
},
|
||||
"wall_seconds": 0.44,
|
||||
"latency_201_seconds": {
|
||||
"p50": 0.44,
|
||||
"max": 0.44
|
||||
},
|
||||
"replicas": {
|
||||
"c66fca7855ac": {
|
||||
"uploads_201": 1,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.2,
|
||||
"rss_now_mib": 107.2
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 126.9,
|
||||
"rss_now_mib": 107.1
|
||||
},
|
||||
"rss_peak_growth_mib": 19.7
|
||||
},
|
||||
"0758884d110a": {
|
||||
"uploads_201": 0,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.0,
|
||||
"rss_now_mib": 107.0
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 107.0,
|
||||
"rss_now_mib": 107.0
|
||||
},
|
||||
"rss_peak_growth_mib": 0.0
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 126.9,
|
||||
"max_rss_peak_growth_mib": 19.7,
|
||||
"upload_slots_per_replica": 64
|
||||
},
|
||||
{
|
||||
"concurrency": 10,
|
||||
"statuses": {
|
||||
"201": 10
|
||||
},
|
||||
"wall_seconds": 2.79,
|
||||
"latency_201_seconds": {
|
||||
"p50": 2.72,
|
||||
"max": 2.79
|
||||
},
|
||||
"replicas": {
|
||||
"c66fca7855ac": {
|
||||
"uploads_201": 5,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.1,
|
||||
"rss_now_mib": 107.1
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 186.4,
|
||||
"rss_now_mib": 108.5
|
||||
},
|
||||
"rss_peak_growth_mib": 79.3
|
||||
},
|
||||
"0758884d110a": {
|
||||
"uploads_201": 5,
|
||||
"before": {
|
||||
"rss_peak_mib": 107.0,
|
||||
"rss_now_mib": 107.0
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 168.6,
|
||||
"rss_now_mib": 108.0
|
||||
},
|
||||
"rss_peak_growth_mib": 61.6
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 186.4,
|
||||
"max_rss_peak_growth_mib": 79.3,
|
||||
"upload_slots_per_replica": 64
|
||||
},
|
||||
{
|
||||
"concurrency": 20,
|
||||
"statuses": {
|
||||
"201": 20
|
||||
},
|
||||
"wall_seconds": 4.85,
|
||||
"latency_201_seconds": {
|
||||
"p50": 4.73,
|
||||
"max": 4.84
|
||||
},
|
||||
"replicas": {
|
||||
"c66fca7855ac": {
|
||||
"uploads_201": 10,
|
||||
"before": {
|
||||
"rss_peak_mib": 108.5,
|
||||
"rss_now_mib": 108.5
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 249.6,
|
||||
"rss_now_mib": 139.7
|
||||
},
|
||||
"rss_peak_growth_mib": 141.1
|
||||
},
|
||||
"0758884d110a": {
|
||||
"uploads_201": 10,
|
||||
"before": {
|
||||
"rss_peak_mib": 108.0,
|
||||
"rss_now_mib": 108.0
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 242.8,
|
||||
"rss_now_mib": 110.0
|
||||
},
|
||||
"rss_peak_growth_mib": 134.8
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 249.6,
|
||||
"max_rss_peak_growth_mib": 141.1,
|
||||
"upload_slots_per_replica": 64
|
||||
},
|
||||
{
|
||||
"concurrency": 40,
|
||||
"statuses": {
|
||||
"201": 40
|
||||
},
|
||||
"wall_seconds": 10.07,
|
||||
"latency_201_seconds": {
|
||||
"p50": 9.64,
|
||||
"max": 10.05
|
||||
},
|
||||
"replicas": {
|
||||
"c66fca7855ac": {
|
||||
"uploads_201": 20,
|
||||
"before": {
|
||||
"rss_peak_mib": 139.7,
|
||||
"rss_now_mib": 139.7
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 436.9,
|
||||
"rss_now_mib": 245.9
|
||||
},
|
||||
"rss_peak_growth_mib": 297.2
|
||||
},
|
||||
"0758884d110a": {
|
||||
"uploads_201": 20,
|
||||
"before": {
|
||||
"rss_peak_mib": 110.0,
|
||||
"rss_now_mib": 110.0
|
||||
},
|
||||
"after": {
|
||||
"rss_peak_mib": 404.7,
|
||||
"rss_now_mib": 210.4
|
||||
},
|
||||
"rss_peak_growth_mib": 294.7
|
||||
}
|
||||
},
|
||||
"max_rss_peak_mib": 436.9,
|
||||
"max_rss_peak_growth_mib": 297.2,
|
||||
"upload_slots_per_replica": 64
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user