lab7: BROKER_URL из окружения, Redis operator для регрессии ACL, исправления тестов, no-new-privileges tempo-init; перенос исправлений lab6

This commit is contained in:
2026-11-12 14:19:15 +03:00
parent b5b55fda89
commit 1c453e9f0a
16 changed files with 104 additions and 33 deletions
+12
View File
@@ -25,6 +25,18 @@ def _auth():
def grafana(path, params=None, method='GET', body=None, timeout=30):
"""Запрос к Grafana; 502/503/504 (backend перезапускается) — повтор до ~60 s."""
import urllib.error
for attempt in range(12):
try:
return _grafana(path, params, method, body, timeout)
except urllib.error.HTTPError as e:
if e.code not in (502, 503, 504) or attempt == 11:
raise
time.sleep(5)
def _grafana(path, params=None, method='GET', body=None, timeout=30):
url = GRAFANA + path
if params:
url += ('&' if '?' in url else '?') + urllib.parse.urlencode(params)