Реализовать lab4: вложения S3/MinIO, уровень 4 и трек 2 reconciler.

Метаданные в PostgreSQL, байты в приватном bucket; sync upload 201 ready;
компенсация orphan и cmd/reconcile с dry-run/apply и grace period.
This commit is contained in:
Mlvn
2026-11-12 18:08:47 +03:00
parent ec540a1a72
commit 7cbb75c897
43 changed files with 6075 additions and 36 deletions
+22 -2
View File
@@ -4,10 +4,10 @@ CA_FILE ?=
ACTION_SCRIPT ?=
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
.PHONY: help check validate test load test-persistence test-failover
.PHONY: help check validate test load test-persistence test-failover up down student-test private-bucket concurrent reconcile-demo
help:
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
@echo "check: offline structure; validate: full OpenAPI; test: smoke; up/down: compose stand"
check:
$(PYTHON) scripts/check_contract.py
@@ -28,3 +28,23 @@ test-persistence:
test-failover:
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2)
$(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
up:
bash scripts/up.sh
down:
docker compose --env-file .env down
student-test:
DATABASE_URL=postgres://messenger:messenger@127.0.0.1:5432/messenger?sslmode=disable \
REDIS_URL=redis://127.0.0.1:6379/0 \
go test ./student-tests/ -count=1 -v
private-bucket:
bash scripts/check-private-bucket.sh
concurrent:
bash scripts/concurrent-uploads.sh
reconcile-demo:
bash scripts/reconcile-demo.sh