forked from mtusi2026/mtusi2026lab5
feat: add durable versioned attachment pipeline
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"working_files_checked": 101,
|
||||
"reachable_objects_checked": 47,
|
||||
"requested_names_absent": true,
|
||||
"actual_secret_values_absent": true,
|
||||
"public_requirements_unchanged": true,
|
||||
"upstream_push_disabled": true
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"retention_seconds": 300,
|
||||
"failed_real_age_seconds": 301.00391,
|
||||
"seed": {
|
||||
"created_at": "2026-10-17T17:45:40.213510+00:00",
|
||||
"active_id": "a406c829-1654-4e43-aab0-dd6f25df22ad",
|
||||
"failed_id": "d93b3943-9788-4179-81f7-a7e9a4134ca1",
|
||||
"orphan_id": "35f731d5-ab06-4c68-9a58-4b808ad4c1be"
|
||||
},
|
||||
"dry_run": {
|
||||
"scanned": 118,
|
||||
"eligible": 14,
|
||||
"deleted": 0,
|
||||
"protected": 49
|
||||
},
|
||||
"apply": {
|
||||
"scanned": 118,
|
||||
"eligible": 14,
|
||||
"deleted": 14,
|
||||
"protected": 49
|
||||
},
|
||||
"active_protected_then_ready": true,
|
||||
"orphan_deleted": true,
|
||||
"failed_source_expired": true,
|
||||
"published_objects_unchanged": 4
|
||||
}
|
||||
@@ -0,0 +1,341 @@
|
||||
{
|
||||
"initial_instances": [
|
||||
{
|
||||
"id": "8d4298b6ad5314fcdf16aa51d35dc303f907eb108469036411bfce1bff40dd72",
|
||||
"started_at": "2026-10-17T17:48:24.316494638Z",
|
||||
"pid": 61117,
|
||||
"running": true,
|
||||
"image": "sha256:691367499a6453eaf54b56c9782f0c8ee7f88b7e63a41c5e686a191353c7d96a",
|
||||
"memory": 536870912,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {},
|
||||
"instance": "d06f1ce7a2ad48fb85a6e4c959495a6b"
|
||||
},
|
||||
{
|
||||
"id": "a59075a90d19de7f3057ad13490e5fba946c1f714e1f101bb8abaee40dd7201e",
|
||||
"started_at": "2026-10-17T17:45:53.909326888Z",
|
||||
"pid": 45122,
|
||||
"running": true,
|
||||
"image": "sha256:691367499a6453eaf54b56c9782f0c8ee7f88b7e63a41c5e686a191353c7d96a",
|
||||
"memory": 536870912,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {},
|
||||
"instance": "4d81bcd18cd841d58fb480df271130ec"
|
||||
}
|
||||
],
|
||||
"failures": [
|
||||
{
|
||||
"duration_seconds": 5.945994583000356,
|
||||
"workers": 6,
|
||||
"requests": 2092,
|
||||
"successes": 2031,
|
||||
"errors": 61,
|
||||
"successful_rps": 341.5744786930423,
|
||||
"error_fraction": 0.029158699808795412,
|
||||
"first_success_after_action_seconds": 1.9096203330009303,
|
||||
"action_seconds": 1.902683000000252,
|
||||
"p50_ms": 11.905290999493445,
|
||||
"p95_ms": 57.65445899851329,
|
||||
"p99_ms": 78.713124999922,
|
||||
"instances": [
|
||||
"4d81bcd18cd841d58fb480df271130ec",
|
||||
"d06f1ce7a2ad48fb85a6e4c959495a6b"
|
||||
],
|
||||
"tail_instances": [
|
||||
"4d81bcd18cd841d58fb480df271130ec"
|
||||
],
|
||||
"confirmed_writes": 201,
|
||||
"stopped": {
|
||||
"id": "8d4298b6ad5314fcdf16aa51d35dc303f907eb108469036411bfce1bff40dd72",
|
||||
"started_at": "2026-10-17T17:48:24.316494638Z",
|
||||
"pid": 61117,
|
||||
"running": true,
|
||||
"image": "sha256:691367499a6453eaf54b56c9782f0c8ee7f88b7e63a41c5e686a191353c7d96a",
|
||||
"memory": 536870912,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {},
|
||||
"instance": "d06f1ce7a2ad48fb85a6e4c959495a6b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"duration_seconds": 5.482812500000364,
|
||||
"workers": 6,
|
||||
"requests": 1806,
|
||||
"successes": 1691,
|
||||
"errors": 115,
|
||||
"successful_rps": 308.4183528070471,
|
||||
"error_fraction": 0.0636766334440753,
|
||||
"first_success_after_action_seconds": 1.8648894590005511,
|
||||
"action_seconds": 1.440443999999843,
|
||||
"p50_ms": 13.768250000794069,
|
||||
"p95_ms": 50.30191599871614,
|
||||
"p99_ms": 71.77345800118928,
|
||||
"instances": [
|
||||
"4d81bcd18cd841d58fb480df271130ec",
|
||||
"99a8d6532148477f8630cabe3f0c88d8"
|
||||
],
|
||||
"tail_instances": [
|
||||
"99a8d6532148477f8630cabe3f0c88d8"
|
||||
],
|
||||
"confirmed_writes": 165,
|
||||
"stopped": {
|
||||
"id": "a59075a90d19de7f3057ad13490e5fba946c1f714e1f101bb8abaee40dd7201e",
|
||||
"started_at": "2026-10-17T17:45:53.909326888Z",
|
||||
"pid": 45122,
|
||||
"running": true,
|
||||
"image": "sha256:691367499a6453eaf54b56c9782f0c8ee7f88b7e63a41c5e686a191353c7d96a",
|
||||
"memory": 536870912,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {},
|
||||
"instance": "4d81bcd18cd841d58fb480df271130ec"
|
||||
}
|
||||
}
|
||||
],
|
||||
"concurrent_replays": 30,
|
||||
"concurrent_effects": 1,
|
||||
"rolling": {
|
||||
"duration_seconds": 13.661339999998745,
|
||||
"workers": 6,
|
||||
"requests": 5950,
|
||||
"successes": 5645,
|
||||
"errors": 305,
|
||||
"successful_rps": 413.2098315392574,
|
||||
"error_fraction": 0.05126050420168067,
|
||||
"first_success_after_action_seconds": 9.612477874999968,
|
||||
"action_seconds": 9.61113162500078,
|
||||
"p50_ms": 9.479749998718034,
|
||||
"p95_ms": 53.65141699985543,
|
||||
"p99_ms": 78.18379200034542,
|
||||
"instances": [
|
||||
"3e551e0479ef40d4ab399c2c97515ce0",
|
||||
"94c58fccf2e045e196c07dd588a92c1a",
|
||||
"98396ce0e5b4472c970589a37b35f629",
|
||||
"99a8d6532148477f8630cabe3f0c88d8"
|
||||
],
|
||||
"tail_instances": [
|
||||
"3e551e0479ef40d4ab399c2c97515ce0",
|
||||
"94c58fccf2e045e196c07dd588a92c1a"
|
||||
],
|
||||
"confirmed_writes": 563,
|
||||
"replacements": [
|
||||
{
|
||||
"old_container": "8d4298b6ad5314fcdf16aa51d35dc303f907eb108469036411bfce1bff40dd72",
|
||||
"old_instance": "99a8d6532148477f8630cabe3f0c88d8",
|
||||
"live_instances": [
|
||||
"94c58fccf2e045e196c07dd588a92c1a",
|
||||
"98396ce0e5b4472c970589a37b35f629"
|
||||
]
|
||||
},
|
||||
{
|
||||
"old_container": "a59075a90d19de7f3057ad13490e5fba946c1f714e1f101bb8abaee40dd7201e",
|
||||
"old_instance": "98396ce0e5b4472c970589a37b35f629",
|
||||
"live_instances": [
|
||||
"3e551e0479ef40d4ab399c2c97515ce0",
|
||||
"94c58fccf2e045e196c07dd588a92c1a"
|
||||
]
|
||||
}
|
||||
],
|
||||
"confirmed_messages_preserved": true
|
||||
},
|
||||
"persistence": {
|
||||
"before": {
|
||||
"postgres": {
|
||||
"id": "45876dc9476e2b47667d1bde173e786cb20aba45a179caca86a374f732cba70b",
|
||||
"started_at": "2026-10-17T17:38:39.558313298Z",
|
||||
"pid": 7427,
|
||||
"running": true,
|
||||
"image": "sha256:7e32e9833a6fb1c92c32552794cb6ed569d51b445a54907d35fc112ef39684db",
|
||||
"memory": 805306368,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {
|
||||
"5432/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "55437"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"valkey": {
|
||||
"id": "4a11709684b5cdd4f6e4488ae0e11ef42085b4fdeace1e3c7cff88b05d0e9d1a",
|
||||
"started_at": "2026-10-17T17:37:37.056307755Z",
|
||||
"pid": 1093,
|
||||
"running": true,
|
||||
"image": "sha256:d827e7f7552cdee40cc7482dbae9da020f42bc47669af6f71182a4ef76a22773",
|
||||
"memory": 134217728,
|
||||
"nano_cpus": 500000000,
|
||||
"published_ports": {
|
||||
"6379/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "56384"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"s3": {
|
||||
"id": "9ab4050036931ffa30695ee3e29e57a0d767660324585a39fc21e8a8456e8ffc",
|
||||
"started_at": "2026-10-17T17:37:37.243124088Z",
|
||||
"pid": 1260,
|
||||
"running": true,
|
||||
"image": "sha256:94aff3c743f63f1a00f1b8d0ea1553fd31f21ffe622a6e70eecae1026546ec3c",
|
||||
"memory": 805306368,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {
|
||||
"9000/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "59005"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"broker": {
|
||||
"id": "e21054f56ca9160a2587b123cb21624e2685ebc7e252df354add56c704032f7b",
|
||||
"started_at": "2026-10-17T17:46:01.597192669Z",
|
||||
"pid": 46402,
|
||||
"running": true,
|
||||
"image": "sha256:d827e7f7552cdee40cc7482dbae9da020f42bc47669af6f71182a4ef76a22773",
|
||||
"memory": 402653184,
|
||||
"nano_cpus": 500000000,
|
||||
"published_ports": {
|
||||
"6379/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "56385"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lb": {
|
||||
"id": "12688085914dbd56dce6dec01d5161bf371b45cec95a99b5510dc3782715f91a",
|
||||
"started_at": "2026-10-17T17:38:48.530733677Z",
|
||||
"pid": 8643,
|
||||
"running": true,
|
||||
"image": "sha256:ac79fe145f2bb6626ff26b584a2d0a34e791906c01015f2ae037aa3137b683d9",
|
||||
"memory": 134217728,
|
||||
"nano_cpus": 500000000,
|
||||
"published_ports": {
|
||||
"8080/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "8085"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"after": {
|
||||
"postgres": {
|
||||
"id": "45876dc9476e2b47667d1bde173e786cb20aba45a179caca86a374f732cba70b",
|
||||
"started_at": "2026-10-17T17:51:16.499957968Z",
|
||||
"pid": 75615,
|
||||
"running": true,
|
||||
"image": "sha256:7e32e9833a6fb1c92c32552794cb6ed569d51b445a54907d35fc112ef39684db",
|
||||
"memory": 805306368,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {
|
||||
"5432/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "55437"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"valkey": {
|
||||
"id": "4a11709684b5cdd4f6e4488ae0e11ef42085b4fdeace1e3c7cff88b05d0e9d1a",
|
||||
"started_at": "2026-10-17T17:51:16.385997843Z",
|
||||
"pid": 75510,
|
||||
"running": true,
|
||||
"image": "sha256:d827e7f7552cdee40cc7482dbae9da020f42bc47669af6f71182a4ef76a22773",
|
||||
"memory": 134217728,
|
||||
"nano_cpus": 500000000,
|
||||
"published_ports": {
|
||||
"6379/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "56384"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"s3": {
|
||||
"id": "9ab4050036931ffa30695ee3e29e57a0d767660324585a39fc21e8a8456e8ffc",
|
||||
"started_at": "2026-10-17T17:51:16.228970093Z",
|
||||
"pid": 75341,
|
||||
"running": true,
|
||||
"image": "sha256:94aff3c743f63f1a00f1b8d0ea1553fd31f21ffe622a6e70eecae1026546ec3c",
|
||||
"memory": 805306368,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {
|
||||
"9000/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "59005"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"broker": {
|
||||
"id": "e21054f56ca9160a2587b123cb21624e2685ebc7e252df354add56c704032f7b",
|
||||
"started_at": "2026-10-17T17:51:16.531699968Z",
|
||||
"pid": 75682,
|
||||
"running": true,
|
||||
"image": "sha256:d827e7f7552cdee40cc7482dbae9da020f42bc47669af6f71182a4ef76a22773",
|
||||
"memory": 402653184,
|
||||
"nano_cpus": 500000000,
|
||||
"published_ports": {
|
||||
"6379/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "56385"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lb": {
|
||||
"id": "12688085914dbd56dce6dec01d5161bf371b45cec95a99b5510dc3782715f91a",
|
||||
"started_at": "2026-10-17T17:51:16.329691384Z",
|
||||
"pid": 75442,
|
||||
"running": true,
|
||||
"image": "sha256:ac79fe145f2bb6626ff26b584a2d0a34e791906c01015f2ae037aa3137b683d9",
|
||||
"memory": 134217728,
|
||||
"nano_cpus": 500000000,
|
||||
"published_ports": {
|
||||
"8080/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "8085"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"same_token_public_test": true
|
||||
},
|
||||
"final_instances": [
|
||||
{
|
||||
"id": "2dfd89da126d334f744a65b1db2e0a7da97fe437f5480bf8ad8730657deeb7d2",
|
||||
"started_at": "2026-10-17T17:51:16.725000593Z",
|
||||
"pid": 75960,
|
||||
"running": true,
|
||||
"image": "sha256:691367499a6453eaf54b56c9782f0c8ee7f88b7e63a41c5e686a191353c7d96a",
|
||||
"memory": 536870912,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {},
|
||||
"instance": "aa801fbb4c3547bbb6d90db5fd31db59"
|
||||
},
|
||||
{
|
||||
"id": "28997d75263b8c92dcd8afe813478c473ad1eef479ed996dce86916ad245c75e",
|
||||
"started_at": "2026-10-17T17:51:16.571504468Z",
|
||||
"pid": 75797,
|
||||
"running": true,
|
||||
"image": "sha256:691367499a6453eaf54b56c9782f0c8ee7f88b7e63a41c5e686a191353c7d96a",
|
||||
"memory": 536870912,
|
||||
"nano_cpus": 1000000000,
|
||||
"published_ports": {},
|
||||
"instance": "b22ea2f25f6546f88ddac407dd792c07"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
.venv/bin/python scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
.venv/bin/python scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
@@ -0,0 +1,4 @@
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:8085"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 130, "failed_attempts": 2, "first_recovery_seconds": 0.984}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,3 @@
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:8085"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
.venv/bin/python tests/smoke.py --base-url "http://127.0.0.1:8085"
|
||||
PASS: lab5 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,13 @@
|
||||
============================= test session starts ==============================
|
||||
platform darwin -- Python 3.14.7, pytest-9.1.1, pluggy-1.7.0
|
||||
rootdir: <repository>
|
||||
configfile: pyproject.toml
|
||||
testpaths: student-tests
|
||||
plugins: anyio-4.15.1
|
||||
collected 84 items
|
||||
|
||||
student-tests/test_api.py .................................... [ 42%]
|
||||
student-tests/test_cluster.py ............ [ 57%]
|
||||
student-tests/test_pipeline.py .................................... [100%]
|
||||
|
||||
======================== 84 passed, 1 warning in 18.40s ========================
|
||||
Reference in New Issue
Block a user