From 9df430ef70c3bcf6851f66a7e7a0d4fb14518b72 Mon Sep 17 00:00:00 2001 From: jenswehner Date: Fri, 24 Jul 2026 13:30:00 +0000 Subject: [PATCH 1/3] Propagate directory upload errors without progress --- .../azure/ai/ml/_utils/_asset_utils.py | 3 +++ .../internal_utils/unittests/test_asset_utils.py | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py index 56595ba30eda..82e7d30d8801 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py @@ -720,6 +720,9 @@ def upload_directory( future.result() # access result to propagate any exceptions file_path_name = futures_dict[future][0] pbar.update(size_dict.get(file_path_name) or 0) + else: + for future in as_completed(futures_dict): + future.result() @retry( diff --git a/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_asset_utils.py b/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_asset_utils.py index 1146aa49cea9..091977752a7c 100644 --- a/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_asset_utils.py +++ b/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_asset_utils.py @@ -5,6 +5,7 @@ import tempfile from pathlib import Path from typing import Callable, List, Tuple +from unittest.mock import patch import pytest @@ -19,6 +20,7 @@ get_ignore_file, get_object_hash, get_upload_files_from_folder, + upload_directory, ) from azure.ai.ml._utils.utils import convert_windows_path_to_unix from azure.ai.ml.constants._common import AutoDeleteCondition @@ -174,6 +176,19 @@ def basic_file(cls) -> "SymbolLinkTestCase": @pytest.mark.unittest @pytest.mark.core_sdk_test class TestAssetUtils: + def test_upload_directory_propagates_errors_without_progress(self, tmp_path: Path) -> None: + class BlobStorageClient: + def check_blob_exists(self): + pass + + source = tmp_path / "source" + source.mkdir() + (source / "file.txt").write_text("content") + + with patch("azure.ai.ml._utils._asset_utils.upload_file", side_effect=RuntimeError("upload failed")): + with pytest.raises(RuntimeError, match="upload failed"): + upload_directory(BlobStorageClient(), source, "destination", "Uploading", False, IgnoreFile(None)) + def test_amlignore_precedence( self, storage_test_directory: str, gitignore_file_directory: str, no_ignore_file_directory: str ) -> None: From 865323d6c6485989699627df877c03c4a6301eac Mon Sep 17 00:00:00 2001 From: Jens Wehner Date: Mon, 27 Jul 2026 08:47:32 +0200 Subject: [PATCH 2/3] added changelog entry --- sdk/ml/azure-ai-ml/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/ml/azure-ai-ml/CHANGELOG.md b/sdk/ml/azure-ai-ml/CHANGELOG.md index 1b140b337aaf..8e29c9a5edad 100644 --- a/sdk/ml/azure-ai-ml/CHANGELOG.md +++ b/sdk/ml/azure-ai-ml/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added ### Bugs Fixed +- Fixed directory uploads not propagating errors when progress reporting is disabled. - Fixed `MLClient.jobs.create_or_update`, `archive`, and `restore` failing for previously-fetched jobs across all job types by routing metadata-only edits through the RunHistory PATCH endpoint. - Fixed `DeploymentTemplate.creation_context` always being `None` when retrieved via `get()` or `list()`. The created/modified timestamps and identity returned by the service (as `createdTime` / `modifiedTime` / `createdBy`) are now populated on `creation_context`, making `DeploymentTemplate` consistent with `Model` and `Environment`. - Fixed `deployment_templates.list(name=...)` raising `AttributeError: 'str' object has no attribute 'request_timeout'`. In the list response, `requestSettings` / `livenessProbe` / `readinessProbe` arrive as stringified dicts nested under `properties`; these are now parsed before conversion, giving `list()` parity with `models.list()` / `environments.list()`. From 7f795d9c96ce735a1ce169278dd8e12513ace559 Mon Sep 17 00:00:00 2001 From: Jens Date: Fri, 2 Oct 2026 12:41:19 +0200 Subject: [PATCH 3/3] Fix multiple bugs and improve job listing performance Fixed various bugs related to directory uploads, artifact cache validation, job downloads, and log streaming. Improved performance for job listing and error reporting for local job paths. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- sdk/ml/azure-ai-ml/CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sdk/ml/azure-ai-ml/CHANGELOG.md b/sdk/ml/azure-ai-ml/CHANGELOG.md index a127a2f41ecd..469dd1d4e147 100644 --- a/sdk/ml/azure-ai-ml/CHANGELOG.md +++ b/sdk/ml/azure-ai-ml/CHANGELOG.md @@ -7,6 +7,19 @@ ### Bugs Fixed - Fixed directory uploads not propagating errors when progress reporting is disabled. +- Fixed artifact cache path validation, wildcard version handling across supported Python versions, and concurrent downloads for component `additional_includes`. +- Fixed artifact cache reads failing on transient Windows checksum-sharing errors during initial validation. +- Improved the missing Azure CLI error reported when initializing the artifact cache. +- Fixed `MLClient.jobs.download(..., output_name=...)` returning without downloading named data outputs ([#48941](https://github.com/Azure/azure-sdk-for-python/issues/48941)). +- Fixed `MLClient.jobs.stream()` failing for jobs using identity-based or SAS-authenticated datastores. +- Fixed datastore-backed log streaming for output paths ending in a slash and corrected log URL generation for Azure Data Lake Storage Gen2. +- Fixed Azure DevOps artifact tool downloads to validate request URLs and extracted executables before installing an override. + +## 1.35.0 (2026-09-08) + +### Features Added + +### Bugs Fixed - Fixed slow iteration over `MLClient.jobs.list()` (issue [#48415](https://github.com/Azure/azure-sdk-for-python/issues/48415)) caused by `_append_tid_to_studio_url` calling `credential.get_token()` on every job to extract the tenant id from a JWT. The tenant id is now decoded once per `JobOperations` instance and reused for subsequent jobs. - Simplified schedule validation errors so invalid local job paths report the relevant file error instead of errors from every supported job schema. - Fixed internal pipeline `Command` node dropping node-level interactive `services` (SSH, JupyterLab, TensorBoard, VS Code, etc.) during serialization, which prevented interactive endpoints from being created for Singularity jobs. The `services` are now serialized into the pipeline REST request and round-tripped on deserialization, matching the public `Command` node behavior.