Command: ./scripts/check-docker.sh; project: lab3-check-a31f544685 Docker: 29.0.1 aarch64 CPUs=10 RAM=8217448448 Local .env and secrets are ready; values are not printed #1 [internal] load local bake definitions #1 reading from stdin 1.05kB done #1 DONE 0.0s #2 [migrate internal] load build definition from Dockerfile #2 transferring dockerfile: 733B done #2 DONE 0.0s #3 [api internal] load metadata for docker.io/library/python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 #3 DONE 0.0s #4 [api internal] load .dockerignore #4 transferring context: 167B done #4 DONE 0.0s #5 [migrate internal] load build context #5 transferring context: 809B done #5 DONE 0.0s #6 [migrate 1/8] FROM docker.io/library/python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 #6 resolve docker.io/library/python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 done #6 DONE 0.0s #7 [migrate 2/8] WORKDIR /app #7 CACHED #8 [migrate 3/8] COPY requirements.txt . #8 CACHED #9 [migrate 4/8] RUN python -m pip install --no-cache-dir -r requirements.txt && python -m pip check #9 CACHED #10 [migrate 6/8] COPY src/ ./src/ #10 CACHED #11 [migrate 7/8] COPY migrations/ ./migrations/ #11 CACHED #12 [migrate 5/8] RUN groupadd --gid 10001 app && useradd --uid 10001 --gid app --no-create-home app #12 CACHED #13 [migrate 8/8] COPY research/ ./research/ #13 CACHED #14 [api] exporting to image #14 exporting layers done #14 exporting manifest sha256:06163e45d3676c7cf4f7a1c7bfe108ed3b98559ebb485c7a09d1e87e6f418d17 done #14 exporting config sha256:3fed7460e9510eef7b2928f8d600d06d5d65329f74d820beac13809476b11398 done #14 exporting attestation manifest sha256:352319cde788733f2f237a2a78204630c542e7ca906cff14c902046e8c1d2e5b 0.0s done #14 exporting manifest list sha256:848e0c76f1678f35dd1b483e7c54552466999551ba7e77c0062bf346671e2902 done #14 naming to docker.io/library/mtusi-messenger:lab3 done #14 unpacking to docker.io/library/mtusi-messenger:lab3 done #14 DONE 0.1s #15 [migrate] exporting to image #15 exporting layers done #15 exporting manifest sha256:a59568d34e2c5e8b4d23308342601fdaf8c07e78ec3065878679a067c082e952 done #15 exporting config sha256:b67b805ba1b7dd90f0a3e8444455488fe8c7f4118f14d671501dd63e85b59c97 done #15 exporting attestation manifest sha256:b1853c07ddac46c4b398b475052f334aa2753c2fe971e0e4fb2517b0e3e13656 0.0s done #15 exporting manifest list sha256:eff1abdd662eb60e2741e6ce6b8f364467d2817dafeef9754518247124a780eb done #15 naming to docker.io/library/mtusi-messenger:lab3 done #15 unpacking to docker.io/library/mtusi-messenger:lab3 done #15 DONE 0.1s #16 [api] resolving provenance for metadata file #16 DONE 0.0s #17 [migrate] resolving provenance for metadata file #17 DONE 0.0s mtusi-messenger:lab3 Built mtusi-messenger:lab3 Built Network lab3-check-a31f544685_default Creating Network lab3-check-a31f544685_default Created Volume lab3-check-a31f544685_postgres_data Creating Volume lab3-check-a31f544685_postgres_data Created Volume lab3-check-a31f544685_valkey_data Creating Volume lab3-check-a31f544685_valkey_data Created Container lab3-check-a31f544685-valkey-1 Creating Container lab3-check-a31f544685-postgres-1 Creating Container lab3-check-a31f544685-valkey-1 Created Container lab3-check-a31f544685-postgres-1 Created Container lab3-check-a31f544685-migrate-1 Creating Container lab3-check-a31f544685-migrate-1 Created Container lab3-check-a31f544685-api-2 Creating Container lab3-check-a31f544685-api-1 Creating Container lab3-check-a31f544685-api-1 Created Container lab3-check-a31f544685-api-2 Created Container lab3-check-a31f544685-lb-1 Creating Container lab3-check-a31f544685-lb-1 Created Container lab3-check-a31f544685-valkey-1 Starting Container lab3-check-a31f544685-postgres-1 Starting Container lab3-check-a31f544685-valkey-1 Started Container lab3-check-a31f544685-postgres-1 Started Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-migrate-1 Starting Container lab3-check-a31f544685-migrate-1 Started Container lab3-check-a31f544685-migrate-1 Waiting Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-valkey-1 Waiting Container lab3-check-a31f544685-valkey-1 Healthy Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-migrate-1 Exited Container lab3-check-a31f544685-api-2 Starting Container lab3-check-a31f544685-api-2 Started Container lab3-check-a31f544685-api-1 Starting Container lab3-check-a31f544685-api-1 Started Container lab3-check-a31f544685-api-2 Waiting Container lab3-check-a31f544685-api-1 Waiting Container lab3-check-a31f544685-api-2 Healthy Container lab3-check-a31f544685-api-1 Healthy Container lab3-check-a31f544685-lb-1 Starting Container lab3-check-a31f544685-lb-1 Started API ready through LB: 7f6a80b69e32, f973eaec4d52 PASS: 2 real API containers, CPU/RAM limits, API non-root and no public ports; only LB published Проверяем сервер: http://127.0.0.1:58474 /Users/vanek/Desktop/VNPlabs/VNPlab3/mtusi2026lab3/.venv/bin/python scripts/check_contract.py PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. /Users/vanek/Desktop/VNPlabs/VNPlab3/mtusi2026lab3/.venv/bin/python tests/smoke.py --base-url "http://127.0.0.1:58474" PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. test_chat_access (test_api.ApiTests.test_chat_access) ... ok test_chat_pagination_and_cursor_owner (test_api.ApiTests.test_chat_pagination_and_cursor_owner) ... ok test_cursor_cannot_be_used_for_another_chat_or_changed (test_api.ApiTests.test_cursor_cannot_be_used_for_another_chat_or_changed) ... ok test_default_page_size (test_api.ApiTests.test_default_page_size) ... ok test_duplicate_username (test_api.ApiTests.test_duplicate_username) ... ok test_framework_errors_and_request_ids (test_api.ApiTests.test_framework_errors_and_request_ids) ... ok test_identification_and_authentication_order (test_api.ApiTests.test_identification_and_authentication_order) ... ok test_invalid_chat_members (test_api.ApiTests.test_invalid_chat_members) ... ok test_invalid_chat_title (test_api.ApiTests.test_invalid_chat_title) ... ok test_invalid_limits_and_cursors (test_api.ApiTests.test_invalid_limits_and_cursors) ... ok test_invalid_message_fields (test_api.ApiTests.test_invalid_message_fields) ... ok test_invalid_user_fields (test_api.ApiTests.test_invalid_user_fields) ... ok test_malformed_json_and_encoding (test_api.ApiTests.test_malformed_json_and_encoding) ... ok test_message_pagination_and_changing_limit (test_api.ApiTests.test_message_pagination_and_changing_limit) ... ok test_unicode_and_text_preservation (test_api.ApiTests.test_unicode_and_text_preservation) ... ok test_wrong_content_type (test_api.ApiTests.test_wrong_content_type) ... ok test_simultaneous_registration_of_one_username (test_concurrency.ConcurrencyTests.test_simultaneous_registration_of_one_username) ... ok test_ten_clients_send_one_hundred_messages (test_concurrency.ConcurrencyTests.test_ten_clients_send_one_hundred_messages) ... ok test_conflict_and_semantic_json_replay (test_idempotency.IdempotencyTests.test_conflict_and_semantic_json_replay) ... ok test_key_format_and_missing_key (test_idempotency.IdempotencyTests.test_key_format_and_missing_key) ... ok test_parallel_replay_across_replicas (test_idempotency.IdempotencyTests.test_parallel_replay_across_replicas) ... ok test_replay_rechecks_session_and_access (test_idempotency.IdempotencyTests.test_replay_rechecks_session_and_access) ... ok test_scope_is_user_and_chat (test_idempotency.IdempotencyTests.test_scope_is_user_and_chat) ... ok test_logout_revokes_only_one_session (test_sessions.SessionTests.test_logout_revokes_only_one_session) ... ok test_password_validation (test_sessions.SessionTests.test_password_validation) ... ok test_sql_like_message_is_plain_text (test_sessions.SessionTests.test_sql_like_message_is_plain_text) ... ok test_unicode_password_with_colon_and_private_response (test_sessions.SessionTests.test_unicode_password_with_colon_and_private_response) ... ok test_wrong_password_and_basic_only_for_login (test_sessions.SessionTests.test_wrong_password_and_basic_only_for_login) ... ok ---------------------------------------------------------------------- Ran 28 tests in 6.783s OK PASS: 10 clients sent 100 messages; history contains exactly 100 unique messages. Container lab3-check-a31f544685-postgres-1 Running Container lab3-check-a31f544685-postgres-1 Running PASS: migrations only in one-shot service; repeated execution preserves data /Users/vanek/Desktop/VNPlabs/VNPlab3/mtusi2026lab3/.venv/bin/python tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:58474" Executing explicit persistence hook; hook output suppressed to avoid leaking secrets. PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence. PASS: both API, LB, PostgreSQL, Valkey actually restarted; session and confirmed data preserved PASS: SIGTERM with unfinished request: {"instance": "7f6a80b69e32", "unfinished_request": true, "shutdown_seconds": 5.393, "new_connections_refused_seconds": 0.167, "exit_code": 0, "oom_killed": false} Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-migrate-1 Starting Container lab3-check-a31f544685-migrate-1 Started Container lab3-check-a31f544685-valkey-1 Waiting Container lab3-check-a31f544685-migrate-1 Waiting Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-valkey-1 Healthy Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-migrate-1 Exited Container lab3-check-a31f544685-api-1 Starting Container lab3-check-a31f544685-api-1 Started API ready through LB: 7f6a80b69e32, f973eaec4d52 Container lab3-check-a31f544685-valkey-1 Stopping Container lab3-check-a31f544685-valkey-1 Stopped PASS: valkey outage: API live=200, ready=503, LB ready=503 Container lab3-check-a31f544685-valkey-1 Starting Container lab3-check-a31f544685-valkey-1 Started API ready through LB: 7f6a80b69e32, f973eaec4d52 Container lab3-check-a31f544685-postgres-1 Stopping Container lab3-check-a31f544685-postgres-1 Stopped PASS: postgres outage: API live=200, ready=503, LB ready=503 Container lab3-check-a31f544685-postgres-1 Starting Container lab3-check-a31f544685-postgres-1 Started API ready through LB: 7f6a80b69e32, f973eaec4d52 /Users/vanek/Desktop/VNPlabs/VNPlab3/mtusi2026lab3/.venv/bin/python tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:58474" Executing explicit failover hook; hook output suppressed to avoid leaking secrets. {"observed_instances_before": 2, "successful_writes": 113, "failed_attempts": 1, "first_recovery_seconds": 2.452} PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-migrate-1 Starting Container lab3-check-a31f544685-migrate-1 Started Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-valkey-1 Waiting Container lab3-check-a31f544685-migrate-1 Waiting Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-valkey-1 Healthy Container lab3-check-a31f544685-migrate-1 Exited Container lab3-check-a31f544685-api-1 Starting Container lab3-check-a31f544685-api-1 Started API ready through LB: 7f6a80b69e32, f973eaec4d52 Stopped API: 7f6a80b69e32 container=7f6a80b69e3297a4de72e756a6c9d867a108930c1ca0e57922b3821c26fd03e6 {"label": "stop 7f6a80b69e32", "duration_seconds": 16.009, "successful_requests": 1576, "successful_writes": 788, "errors": 4, "successful_rps": 98.44, "first_success_after_action_seconds": {"POST": 0.014, "GET": 0.007}, "maximum_success_gap_seconds": {"POST": 1.957, "GET": 2.004}, "action_start_seconds": 1.003, "action_end_seconds": 1.666, "p50_ms": 7.813, "p95_ms": 16.393, "confirmed_data_preserved": true, "duplicate_messages": 0, "instances": ["7f6a80b69e32", "f973eaec4d52"]} Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-migrate-1 Starting Container lab3-check-a31f544685-migrate-1 Started Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-valkey-1 Waiting Container lab3-check-a31f544685-migrate-1 Waiting Container lab3-check-a31f544685-valkey-1 Healthy Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-migrate-1 Exited Container lab3-check-a31f544685-api-1 Starting Container lab3-check-a31f544685-api-1 Started API ready through LB: 7f6a80b69e32, f973eaec4d52 Stopped API: f973eaec4d52 container=f973eaec4d5290eb73cd96949877ccb8df1213523fce0ec05c6b40c1136bb31b {"label": "stop f973eaec4d52", "duration_seconds": 16.015, "successful_requests": 1574, "successful_writes": 786, "errors": 4, "successful_rps": 98.28, "first_success_after_action_seconds": {"POST": 0.002, "GET": 0.008}, "maximum_success_gap_seconds": {"POST": 2.006, "GET": 2.006}, "action_start_seconds": 1.005, "action_end_seconds": 1.713, "p50_ms": 7.98, "p95_ms": 17.217, "confirmed_data_preserved": true, "duplicate_messages": 0, "instances": ["7f6a80b69e32", "f973eaec4d52"]} Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-migrate-1 Starting Container lab3-check-a31f544685-migrate-1 Started Container lab3-check-a31f544685-postgres-1 Waiting Container lab3-check-a31f544685-valkey-1 Waiting Container lab3-check-a31f544685-migrate-1 Waiting Container lab3-check-a31f544685-valkey-1 Healthy Container lab3-check-a31f544685-postgres-1 Healthy Container lab3-check-a31f544685-migrate-1 Exited Container lab3-check-a31f544685-api-2 Starting Container lab3-check-a31f544685-api-2 Started API ready through LB: 7f6a80b69e32, f973eaec4d52 Local .env and secrets are ready; values are not printed #1 [internal] load local bake definitions #1 reading from stdin 1.03kB done #1 DONE 0.0s #2 [internal] load build definition from Dockerfile #2 transferring dockerfile: 733B done #2 DONE 0.0s #3 [internal] load metadata for docker.io/library/python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 #3 DONE 0.0s #4 [internal] load .dockerignore #4 transferring context: 167B done #4 DONE 0.0s #5 [internal] load build context #5 transferring context: 809B done #5 DONE 0.0s #6 [1/8] FROM docker.io/library/python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 #6 resolve docker.io/library/python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 0.0s done #6 DONE 0.0s #7 [4/8] RUN python -m pip install --no-cache-dir -r requirements.txt && python -m pip check #7 CACHED #8 [3/8] COPY requirements.txt . #8 CACHED #9 [5/8] RUN groupadd --gid 10001 app && useradd --uid 10001 --gid app --no-create-home app #9 CACHED #10 [6/8] COPY src/ ./src/ #10 CACHED #11 [2/8] WORKDIR /app #11 CACHED #12 [7/8] COPY migrations/ ./migrations/ #12 CACHED #13 [8/8] COPY research/ ./research/ #13 CACHED #14 exporting to image #14 exporting layers done #14 exporting manifest sha256:06163e45d3676c7cf4f7a1c7bfe108ed3b98559ebb485c7a09d1e87e6f418d17 done #14 exporting config sha256:3fed7460e9510eef7b2928f8d600d06d5d65329f74d820beac13809476b11398 done #14 exporting attestation manifest sha256:3a88ce0975ddcbab53c3ecb185da08ef114e818e9db952983e997cd47add67bf done #14 exporting manifest list sha256:433a8a3293202a92f092574052b474e8373c0d58649cbcf1c7ebc1af17933d3c done #14 naming to docker.io/library/mtusi-messenger:lab3 done #14 unpacking to docker.io/library/mtusi-messenger:lab3 done #14 DONE 0.1s #15 resolving provenance for metadata file #15 DONE 0.0s mtusi-messenger:lab3 Built Local .env and secrets are ready; values are not printed Container lab3-check-a31f544685-postgres-1 Running #1 [internal] load local bake definitions #1 reading from stdin 576B done #1 DONE 0.0s #2 [internal] load build definition from Dockerfile #2 transferring dockerfile: 733B done #2 DONE 0.0s #3 [internal] load metadata for docker.io/library/python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 #3 DONE 0.0s #4 [internal] load .dockerignore #4 transferring context: 167B done #4 DONE 0.0s #5 [internal] load build context #5 transferring context: 809B done #5 DONE 0.0s #6 [1/8] FROM docker.io/library/python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 #6 resolve docker.io/library/python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 done #6 DONE 0.0s #7 [3/8] COPY requirements.txt . #7 CACHED #8 [4/8] RUN python -m pip install --no-cache-dir -r requirements.txt && python -m pip check #8 CACHED #9 [5/8] RUN groupadd --gid 10001 app && useradd --uid 10001 --gid app --no-create-home app #9 CACHED #10 [6/8] COPY src/ ./src/ #10 CACHED #11 [7/8] COPY migrations/ ./migrations/ #11 CACHED #12 [2/8] WORKDIR /app #12 CACHED #13 [8/8] COPY research/ ./research/ #13 CACHED #14 exporting to image #14 exporting layers done #14 exporting manifest sha256:a59568d34e2c5e8b4d23308342601fdaf8c07e78ec3065878679a067c082e952 done #14 exporting config sha256:b67b805ba1b7dd90f0a3e8444455488fe8c7f4118f14d671501dd63e85b59c97 done #14 exporting attestation manifest sha256:25ff7934ca5161da9b6c345af61b6a10b452580e4d349b35939d32feb66664ea done #14 exporting manifest list sha256:3e102cd9a2c1e81e95aed4a0d4de1ac94352370595fced350257813f7a07bef8 done #14 naming to docker.io/library/mtusi-messenger:lab3 done #14 unpacking to docker.io/library/mtusi-messenger:lab3 done #14 DONE 0.0s #15 resolving provenance for metadata file #15 DONE 0.0s Migrations: already applied API ready through LB: 7f6a80b69e32, f973eaec4d52 Replacing API: 7f6a80b69e32 Container lab3-check-a31f544685-api-2 Running Container lab3-check-a31f544685-api-3 Creating Container lab3-check-a31f544685-api-3 Created Container lab3-check-a31f544685-api-3 Starting Container lab3-check-a31f544685-api-3 Started API ready through LB: ca9c7a52da66, f973eaec4d52 Replacing API: f973eaec4d52 Container lab3-check-a31f544685-api-3 Running Container lab3-check-a31f544685-api-4 Creating Container lab3-check-a31f544685-api-4 Created Container lab3-check-a31f544685-api-4 Starting Container lab3-check-a31f544685-api-4 Started API ready through LB: 244bf0b910eb, ca9c7a52da66 PASS: all API containers replaced sequentially; stores and LB kept running {"label": "sequential API replacement", "duration_seconds": 23.774, "successful_requests": 2131, "successful_writes": 1063, "errors": 11, "successful_rps": 89.64, "first_success_after_action_seconds": {"POST": 0.018, "GET": 0.004}, "maximum_success_gap_seconds": {"POST": 1.059, "GET": 2.034}, "action_start_seconds": 1.005, "action_end_seconds": 19.63, "p50_ms": 7.723, "p95_ms": 13.565, "confirmed_data_preserved": true, "duplicate_messages": 0, "instances": ["244bf0b910eb", "7f6a80b69e32", "ca9c7a52da66", "f973eaec4d52"]} PASS: all lab3 grade-4 checks completed Container lab3-check-a31f544685-lb-1 Stopping Container lab3-check-a31f544685-lb-1 Stopped Container lab3-check-a31f544685-lb-1 Removing Container lab3-check-a31f544685-lb-1 Removed Container lab3-check-a31f544685-api-3 Stopping Container lab3-check-a31f544685-api-4 Stopping Container lab3-check-a31f544685-api-4 Stopped Container lab3-check-a31f544685-api-4 Removing Container lab3-check-a31f544685-api-4 Removed Container lab3-check-a31f544685-api-3 Stopped Container lab3-check-a31f544685-api-3 Removing Container lab3-check-a31f544685-api-3 Removed Container lab3-check-a31f544685-migrate-1 Stopping Container lab3-check-a31f544685-valkey-1 Stopping Container lab3-check-a31f544685-migrate-1 Stopped Container lab3-check-a31f544685-migrate-1 Removing Container lab3-check-a31f544685-migrate-1 Removed Container lab3-check-a31f544685-postgres-1 Stopping Container lab3-check-a31f544685-valkey-1 Stopped Container lab3-check-a31f544685-valkey-1 Removing Container lab3-check-a31f544685-valkey-1 Removed Container lab3-check-a31f544685-postgres-1 Stopped Container lab3-check-a31f544685-postgres-1 Removing Container lab3-check-a31f544685-postgres-1 Removed Volume lab3-check-a31f544685_valkey_data Removing Network lab3-check-a31f544685_default Removing Volume lab3-check-a31f544685_postgres_data Removing Volume lab3-check-a31f544685_valkey_data Removed Volume lab3-check-a31f544685_postgres_data Removed Network lab3-check-a31f544685_default Removed Removed only temporary test containers and volumes: lab3-check-a31f544685