From 854e6d6957d33e2875cf43cc1fea3bf61b8358c1 Mon Sep 17 00:00:00 2001 From: Yochai Date: Sun, 9 Nov 2025 15:08:24 +0200 Subject: [PATCH 1/3] In managed streaming, exhausted retries with throttling errors should fall back to queued ingestion --- .../azure/kusto/ingest/managed_streaming_ingest_client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-kusto-ingest/azure/kusto/ingest/managed_streaming_ingest_client.py b/azure-kusto-ingest/azure/kusto/ingest/managed_streaming_ingest_client.py index 942a9faf..53b04a14 100644 --- a/azure-kusto-ingest/azure/kusto/ingest/managed_streaming_ingest_client.py +++ b/azure-kusto-ingest/azure/kusto/ingest/managed_streaming_ingest_client.py @@ -9,7 +9,7 @@ from azure.core.tracing import SpanKind from azure.kusto.data import KustoConnectionStringBuilder -from azure.kusto.data.exceptions import KustoApiError, KustoClosedError +from azure.kusto.data.exceptions import KustoApiError, KustoClosedError, KustoThrottlingError from azure.kusto.data._telemetry import MonitoredActivity from . import BlobDescriptor, FileDescriptor, IngestionProperties, StreamDescriptor @@ -99,6 +99,8 @@ def ingest_from_stream(self, stream_descriptor: Union[StreamDescriptor, IO[AnySt if error.permanent: raise buffered_stream.seek(0, SEEK_SET) + except KustoThrottlingError: + buffered_stream.seek(0, SEEK_SET) return self.queued_client.ingest_from_stream(stream_descriptor, ingestion_properties) @@ -127,6 +129,8 @@ def ingest_from_blob(self, blob_descriptor: BlobDescriptor, ingestion_properties error = ex.get_api_error() if error.permanent: raise + except KustoThrottlingError: + pass return self.queued_client.ingest_from_blob(blob_descriptor, ingestion_properties) From 8d07ce2cdcf9f0393e1b95b1f5e4618cc076fbad Mon Sep 17 00:00:00 2001 From: Yochai Date: Sun, 9 Nov 2025 15:17:08 +0200 Subject: [PATCH 2/3] fix linter issues --- .../azure/kusto/ingest/managed_streaming_ingest_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-kusto-ingest/azure/kusto/ingest/managed_streaming_ingest_client.py b/azure-kusto-ingest/azure/kusto/ingest/managed_streaming_ingest_client.py index 53b04a14..8b978371 100644 --- a/azure-kusto-ingest/azure/kusto/ingest/managed_streaming_ingest_client.py +++ b/azure-kusto-ingest/azure/kusto/ingest/managed_streaming_ingest_client.py @@ -100,7 +100,7 @@ def ingest_from_stream(self, stream_descriptor: Union[StreamDescriptor, IO[AnySt raise buffered_stream.seek(0, SEEK_SET) except KustoThrottlingError: - buffered_stream.seek(0, SEEK_SET) + _ = buffered_stream.seek(0, SEEK_SET) return self.queued_client.ingest_from_stream(stream_descriptor, ingestion_properties) From cd390c57d12b303dc56c92fc0e6248436648b555 Mon Sep 17 00:00:00 2001 From: Yochai Date: Tue, 25 Nov 2025 12:52:03 +0200 Subject: [PATCH 3/3] add Gov SG and Delos cloud DNS support --- .../kusto/data/wellKnownKustoEndpoints.json | 22 +++++++++++++++++++ .../tests/test_well_known_kusto_endpoints.py | 7 +++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/azure-kusto-data/azure/kusto/data/wellKnownKustoEndpoints.json b/azure-kusto-data/azure/kusto/data/wellKnownKustoEndpoints.json index d5c244f3..f3ed1bbe 100644 --- a/azure-kusto-data/azure/kusto/data/wellKnownKustoEndpoints.json +++ b/azure-kusto-data/azure/kusto/data/wellKnownKustoEndpoints.json @@ -104,6 +104,28 @@ "adx.loganalytics.azure.fr", "adx.monitor.azure.fr" ] + }, + "https://login.sovcloud-identity.de": { + "AllowedKustoSuffixes": [ + ".kusto.sovcloud-api.de", + ".kustomfa.sovcloud-api.de" + ], + "AllowedKustoHostnames": [ + "adx.applicationinsights.azure.de", + "adx.loganalytics.azure.de", + "adx.monitor.azure.de" + ] + }, + "https://login.sovcloud-identity.sg": { + "AllowedKustoSuffixes": [ + ".kusto.sovcloud-api.sg", + ".kustomfa.sovcloud-api.sg" + ], + "AllowedKustoHostnames": [ + "adx.applicationinsights.azure.sg", + "adx.loganalytics.azure.sg", + "adx.monitor.azure.sg" + ] } } } diff --git a/azure-kusto-data/tests/test_well_known_kusto_endpoints.py b/azure-kusto-data/tests/test_well_known_kusto_endpoints.py index f8a0a72c..958ffcb2 100644 --- a/azure-kusto-data/tests/test_well_known_kusto_endpoints.py +++ b/azure-kusto-data/tests/test_well_known_kusto_endpoints.py @@ -126,10 +126,9 @@ def test_well_known_kusto_endpoints_national_clouds(): "https://kustofrbwrznltavls.kusto.usgovcloudapi.net,https://login.microsoftonline.us", "https://kusto7j53clqswr4he.kusto.core.eaglex.ic.gov,https://login.microsoftonline.eaglex.ic.gov", "https://rpe2e0422132101fct2.kusto.core.microsoft.scloud,https://login.microsoftonline.microsoft.scloud", - "https://kustozszokb5yrauyq.kusto.chinacloudapi.cn,{0}".format(CHINA_CLOUD_LOGIN), - "https://kustofrbwrznltavls.kusto.usgovcloudapi.net,https://login.microsoftonline.us", - "https://kusto7j53clqswr4he.kusto.core.eaglex.ic.gov,https://login.microsoftonline.eaglex.ic.gov", - "https://rpe2e0422132101fct2.kusto.core.microsoft.scloud,https://login.microsoftonline.microsoft.scloud", + "https://abc.kusto.sovcloud-api.fr,https://login.sovcloud-identity.fr", + "https://efg.kusto.sovcloud-api.de,https://login.sovcloud-identity.de", + "https://hij.kusto.sovcloud-api.sg,https://login.sovcloud-identity.sg" ]: cluster_and_login_endpoint = c.split(",") _validate_endpoint(cluster_and_login_endpoint[0], cluster_and_login_endpoint[1])