forked from mtusi2026/mtusi2026lab3
ЛР 3: финальная проверка и исправление лимита памяти API
This commit is contained in:
+14
-2
@@ -491,10 +491,13 @@ exit "$code"
|
||||
stage("go-build", ["go", "build", "./..."], required=False)
|
||||
stage("go-vet", ["go", "vet", "./..."], required=False)
|
||||
stage("teacher-smoke", ["make", "test", "BASE_URL=" + env["BASE_URL"], "PYTHON=" + Path(sys.executable).name], required=False)
|
||||
auth = [sys.executable, "student-tests/auth_contract.py", "--base-url", env["AUTH_TEST_BASE_URL"], "--ttl", "3600"]
|
||||
auth = [sys.executable, "student-tests/auth_contract.py", "--ttl", "3600"]
|
||||
if redis_port is not None:
|
||||
auth.extend(("--session-store", "redis"))
|
||||
stage("auth-normal", auth, required=False)
|
||||
# Normal contract traffic follows the same public LB path as users.
|
||||
# Only the later dependency/TTL diagnostics need direct API access.
|
||||
stage("auth-normal", auth + ["--base-url", env["BASE_URL"]], required=False)
|
||||
auth.extend(("--base-url", env["AUTH_TEST_BASE_URL"]))
|
||||
stage("business", [sys.executable, "student-tests/lab2/run.py", "--suite", "business-boundaries", "--suite", "business-cursors", "--suite", "read-after-write", "--output", str(output / "business.json")], required=False)
|
||||
stage("sql-plan-10000", [sys.executable, "student-tests/lab2/run.py", "--suite", "sql-plan", "--output", str(output / "sql-plan.json")], timeout=180, required=False)
|
||||
if measure:
|
||||
@@ -531,6 +534,15 @@ exit "$code"
|
||||
except (OSError, subprocess.SubprocessError, CheckFailure) as error:
|
||||
summary["failure"] = str(error) if isinstance(error, CheckFailure) else type(error).__name__
|
||||
finally:
|
||||
# Retain startup/migration diagnostics before deleting the fixture.
|
||||
# A failed one-shot migrator otherwise disappears with its cause.
|
||||
try:
|
||||
logs = command(base + ["logs", "--no-color", "--tail", "200",
|
||||
"migrate", "postgres", "api", "lb"], env=env, timeout=30)
|
||||
logs = logs.replace(database, "<test-database-url>").replace(password, "<test-password>")
|
||||
(output / "service-logs.log").write_text(logs)
|
||||
except (OSError, subprocess.SubprocessError, CheckFailure) as error:
|
||||
(output / "service-logs.log").write_text("Diagnostics unavailable: " + type(error).__name__ + "\n")
|
||||
# Only this newly generated project's own resources may be removed.
|
||||
try:
|
||||
stage("cleanup", base + ["down", "--volumes", "--remove-orphans", "--timeout", "20"], 90)
|
||||
|
||||
Reference in New Issue
Block a user