feat(lab4): MinIO S3 private bucket, streaming image validation, attachment endpoints, Grade 5 Track 2 reconciler
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"timestamp_utc": "2026-11-16T23:52:48Z",
|
||||
"base_url": "http://localhost:8080",
|
||||
"checks": {
|
||||
"negative_validation": {
|
||||
"status": "PASS",
|
||||
"oversized_10mib_status": 413,
|
||||
"pixel_bomb_49mp_status": 413,
|
||||
"corrupted_png_status": 415,
|
||||
"corrupted_jpg_status": 415,
|
||||
"mime_spoof_status": 415,
|
||||
"bad_filename_status": 400,
|
||||
"outsider_and_cross_chat_status": 404
|
||||
},
|
||||
"cross_replica_failover_download": {
|
||||
"status": "PASS",
|
||||
"uploaded_by": "4f15587f6c21",
|
||||
"downloaded_from_after_stop": "0238360ce86c",
|
||||
"sha256_verified": true,
|
||||
"api_temp_files_remaining": 0,
|
||||
"object_key_internal": "attachments/d5a638fc-2400-4fab-9492-f1d36911298c/2ed2b132-7f96-4db7-80e8-9b68e0e2fdf7"
|
||||
},
|
||||
"private_bucket_and_iam": {
|
||||
"status": "PASS",
|
||||
"s3_exposed_host_ports": 0,
|
||||
"minio_console_disabled": true,
|
||||
"api_uses_scoped_credentials": "messenger_api_key",
|
||||
"direct_unauth_s3_get": "403 Forbidden",
|
||||
"s3_init_idempotent_rerun": 0
|
||||
},
|
||||
"s3_outage_handling": {
|
||||
"status": "PASS",
|
||||
"ready_during_s3_outage": 503,
|
||||
"upload_during_s3_outage": 503,
|
||||
"download_during_s3_outage": 503
|
||||
},
|
||||
"concurrent_streaming_memory": {
|
||||
"status": "PASS",
|
||||
"concurrent_uploads": 12,
|
||||
"file_size_bytes": 4621523,
|
||||
"file_size_mib": 4.41,
|
||||
"total_payload_mib": 52.89,
|
||||
"elapsed_seconds": 3.251,
|
||||
"api_memory_baseline": {
|
||||
"lab4-api-1": "43.64MiB / 256MiB",
|
||||
"lab4-api-2": "51.44MiB / 256MiB"
|
||||
},
|
||||
"stats_during_concurrent_upload": {
|
||||
"lab4-api-1": {
|
||||
"mem": "56.23MiB / 256MiB",
|
||||
"cpu": "0.79%"
|
||||
},
|
||||
"lab4-api-2": {
|
||||
"mem": "52.38MiB / 256MiB",
|
||||
"cpu": "0.82%"
|
||||
},
|
||||
"lab4-lb-1": {
|
||||
"mem": "14.69MiB / 128MiB",
|
||||
"cpu": "0.23%"
|
||||
},
|
||||
"lab4-redis-1": {
|
||||
"mem": "3.734MiB / 256MiB",
|
||||
"cpu": "0.35%"
|
||||
},
|
||||
"lab4-s3-1": {
|
||||
"mem": "95.27MiB / 512MiB",
|
||||
"cpu": "0.41%"
|
||||
},
|
||||
"lab4-postgres-1": {
|
||||
"mem": "51.04MiB / 512MiB",
|
||||
"cpu": "0.11%"
|
||||
}
|
||||
},
|
||||
"api_temp_files_after": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 4,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 15.0,
|
||||
"elapsed_seconds": 15.008,
|
||||
"concurrency": 4,
|
||||
"successful_requests": 10001,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 666.386,
|
||||
"successful_latency_ms": {
|
||||
"p50": 4.893,
|
||||
"p95": 10.807,
|
||||
"p99": 20.305
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"timestamp_utc": "2026-11-16T23:53:59Z",
|
||||
"healthy_attachments_verified": 25,
|
||||
"injected_faults": {
|
||||
"aged_orphan_s3_objects": 3,
|
||||
"fresh_orphan_s3_inside_grace": 1,
|
||||
"missing_s3_ready_referenced": 1,
|
||||
"missing_s3_pending_stale": 1
|
||||
},
|
||||
"dry_run_report": {
|
||||
"dry_run": true,
|
||||
"grace_period_seconds": 5,
|
||||
"lock_acquired": true,
|
||||
"s3_objects_scanned": 79,
|
||||
"db_rows_scanned": 78,
|
||||
"orphan_s3_found": [
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/orphan_4fd8f77f-64b1-470c-b973-1c1255a86352",
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/orphan_de20049e-1906-4519-a652-ee54e9e13101",
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/orphan_fe71cc09-110e-406f-96a0-b3ca52491453"
|
||||
],
|
||||
"orphan_s3_deleted": [],
|
||||
"orphan_s3_skipped_grace": [
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/fresh_af92437e-8430-4d64-b5b3-b90a6e92eb39"
|
||||
],
|
||||
"missing_s3_found": [
|
||||
"a4d2ad97-ab03-4c84-b657-392221d850d6",
|
||||
"f8aa5170-f723-448d-9fac-880bc06e4da0"
|
||||
],
|
||||
"missing_s3_marked_failed": [],
|
||||
"missing_s3_deleted": [],
|
||||
"missing_s3_skipped_grace": [],
|
||||
"healthy_preserved": 75,
|
||||
"s3_list_calls": 1,
|
||||
"s3_remove_calls": 0,
|
||||
"db_queries": 2,
|
||||
"duration_ms": 18.395
|
||||
},
|
||||
"apply_report": {
|
||||
"dry_run": false,
|
||||
"grace_period_seconds": 5,
|
||||
"lock_acquired": true,
|
||||
"s3_objects_scanned": 79,
|
||||
"db_rows_scanned": 78,
|
||||
"orphan_s3_found": [
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/orphan_4fd8f77f-64b1-470c-b973-1c1255a86352",
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/orphan_de20049e-1906-4519-a652-ee54e9e13101",
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/orphan_fe71cc09-110e-406f-96a0-b3ca52491453"
|
||||
],
|
||||
"orphan_s3_deleted": [
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/orphan_4fd8f77f-64b1-470c-b973-1c1255a86352",
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/orphan_de20049e-1906-4519-a652-ee54e9e13101",
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/orphan_fe71cc09-110e-406f-96a0-b3ca52491453"
|
||||
],
|
||||
"orphan_s3_skipped_grace": [
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/fresh_af92437e-8430-4d64-b5b3-b90a6e92eb39"
|
||||
],
|
||||
"missing_s3_found": [
|
||||
"a4d2ad97-ab03-4c84-b657-392221d850d6",
|
||||
"f8aa5170-f723-448d-9fac-880bc06e4da0"
|
||||
],
|
||||
"missing_s3_marked_failed": [
|
||||
"a4d2ad97-ab03-4c84-b657-392221d850d6"
|
||||
],
|
||||
"missing_s3_deleted": [
|
||||
"f8aa5170-f723-448d-9fac-880bc06e4da0"
|
||||
],
|
||||
"missing_s3_skipped_grace": [],
|
||||
"healthy_preserved": 75,
|
||||
"s3_list_calls": 1,
|
||||
"s3_remove_calls": 3,
|
||||
"db_queries": 4,
|
||||
"duration_ms": 27.038
|
||||
},
|
||||
"idempotent_rerun_report": {
|
||||
"dry_run": false,
|
||||
"grace_period_seconds": 5,
|
||||
"lock_acquired": true,
|
||||
"s3_objects_scanned": 76,
|
||||
"db_rows_scanned": 77,
|
||||
"orphan_s3_found": [],
|
||||
"orphan_s3_deleted": [],
|
||||
"orphan_s3_skipped_grace": [
|
||||
"attachments/c0ab7718-6287-4ab8-81b9-0d89b3ab0b06/fresh_af92437e-8430-4d64-b5b3-b90a6e92eb39"
|
||||
],
|
||||
"missing_s3_found": [],
|
||||
"missing_s3_marked_failed": [],
|
||||
"missing_s3_deleted": [],
|
||||
"missing_s3_skipped_grace": [],
|
||||
"healthy_preserved": 75,
|
||||
"s3_list_calls": 1,
|
||||
"s3_remove_calls": 0,
|
||||
"db_queries": 2,
|
||||
"duration_ms": 19.697
|
||||
},
|
||||
"status": "PASS"
|
||||
}
|
||||
Reference in New Issue
Block a user