From 79ce79d007a26b022f459ee231378878a5b559f5 Mon Sep 17 00:00:00 2001 From: Oleg Geller Date: Sun, 23 Jun 2024 20:28:43 +0300 Subject: [PATCH 1/2] fix iam import in arcadia --- ydb/iam/auth.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index 5fd179d2..39d883eb 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -21,8 +21,13 @@ from ydb.public.api.client.yc_public.iam import iam_token_service_pb2_grpc from ydb.public.api.client.yc_public.iam import iam_token_service_pb2 except ImportError: - iam_token_service_pb2_grpc = None - iam_token_service_pb2 = None + try: + # This attempt is to enable the IAM auth inside the YDB repository on GitHub + from contrib.ydb.public.api.client.yc_public.iam import iam_token_service_pb2_grpc + from contrib.ydb.public.api.client.yc_public.iam import iam_token_service_pb2 + except ImportError: + iam_token_service_pb2_grpc = None + iam_token_service_pb2 = None try: import requests From 4539bda05034b6e00ac87db3c7ad3053e8d54b50 Mon Sep 17 00:00:00 2001 From: Oleg Geller Date: Sun, 23 Jun 2024 20:31:39 +0300 Subject: [PATCH 2/2] fix comment --- ydb/iam/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/iam/auth.py b/ydb/iam/auth.py index 39d883eb..c4096c09 100644 --- a/ydb/iam/auth.py +++ b/ydb/iam/auth.py @@ -22,7 +22,7 @@ from ydb.public.api.client.yc_public.iam import iam_token_service_pb2 except ImportError: try: - # This attempt is to enable the IAM auth inside the YDB repository on GitHub + # This attempt is to enable the IAM auth inside the YDB repository on Arcadia from contrib.ydb.public.api.client.yc_public.iam import iam_token_service_pb2_grpc from contrib.ydb.public.api.client.yc_public.iam import iam_token_service_pb2 except ImportError: