fix: update env and PR template

This commit is contained in:
TAskMAster339
2026-10-10 22:35:17 +03:00
parent 715f6c4175
commit 18b3627ec8
22 changed files with 450 additions and 77 deletions
+5 -4
View File
@@ -1,6 +1,6 @@
import json
from rolling_update import COMPOSE, ROOT, command
from rolling_update import COMPOSE, ROOT, command, configured_replicas
def main():
@@ -29,7 +29,8 @@ def main():
if service == "haproxy":
assert "highload-lab3_data" not in networks
if service == "api":
assert not info["mounts"], "API must not mount persistent state"
assert all(not mount["RW"] and mount["Type"] == "bind"
for mount in info["mounts"]), "API mounts must be read-only configuration"
records.append(
{
"service": service,
@@ -40,14 +41,14 @@ def main():
"public_ports": info["ports"],
}
)
assert len([row for row in records if row["service"] == "api"]) == 2
assert len([row for row in records if row["service"] == "api"]) == configured_replicas()
ROOT.joinpath(".memory/grade4").mkdir(parents=True, exist_ok=True)
ROOT.joinpath(".memory/grade4/resources.json").write_text(
json.dumps(records, indent=2) + "\n"
)
print(json.dumps(records, indent=2))
print(
"PASS: effective CPU/RAM limits, two API replicas, private storage/API, isolated frontend"
"PASS: effective CPU/RAM limits, configured API replicas, private storage/API, isolated frontend"
)