ЛР6: наблюдаемость, сквозные traces и исследование sampling

This commit is contained in:
2026-11-20 11:58:34 +03:00
parent 470d9d6f1e
commit 3b0f4ab281
80 changed files with 22966 additions and 50 deletions
+13
View File
@@ -0,0 +1,13 @@
"""Idempotent private bucket bootstrap, executed only with administrative S3 keys."""
from botocore.exceptions import ClientError
from objects import Objects
from postgres import setting
objects = Objects(setting)
try:
objects.client.create_bucket(Bucket=objects.bucket)
except ClientError as exc:
if exc.response['Error']['Code'] not in ('BucketAlreadyOwnedByYou', 'BucketAlreadyExists'):
raise RuntimeError('Bucket bootstrap failed') from None
objects.ready()
print('Private bucket ready; static authenticated identities loaded from local secret config.')