[azure-ai-ml] Validate artifact cache paths and handle concurrent downloads - #49185
Merged
ayushhgarg-work merged 4 commits intoSep 25, 2026
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ayushhgarg-work
requested review from
Justin Firsching (JustinFirsching),
Klein Hu (NonStatic2014),
Amit Chauhan (achauhan-scc),
Arun (arunsu),
Jayesh Tanna (jayesh-tanna),
kingernupur,
Nikolay Rovinskiy (nick863),
Ayush Mishra (novaturient95),
Razvan Tanase (rtanase),
Riti Sharma (sharma-riti) and
Vivek Ramaswamy (vivram)
as code owners
September 25, 2026 05:20
|
Azure Pipelines: Successfully started running 1 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Constructor-time CLI validation and cross-process publication races remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Improves Azure AI ML artifact-cache validation, publication reliability, and test coverage.
Changes:
- Validates cache path components and wildcard versions.
- Adds staged publication and concurrent-writer retry handling.
- Adds comprehensive artifact-cache fixtures, tests, and changelog entry.
| File | Description |
|---|---|
azure/ai/ml/_utils/_artifact_utils.py |
Implements validation and safer cache publication. |
tests/utils/unittests/test_artifact_cache.py |
Tests validation, failures, and concurrency. |
tests/test_utilities/artifact_fixtures.py |
Adds isolated artifact-cache fixtures. |
tests/test_utilities/utils.py |
Isolates existing artifact mocks from disk cache. |
CHANGELOG.md |
Documents the fixes. |
6 tasks
Wait for incomplete cache publications before cleanup, validate the Azure CLI before caching the singleton, and check encoded cache filenames on newer Python versions. Add regression coverage and the coordinated platform-aware tool fixture. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The initial cache validation can still expose transient checksum-sharing errors instead of retrying.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Resolved since last review (2)
Include the first cache validation in the existing bounded retry path while preserving non-resolving lookups, fast cache hits, containment checks, and error propagation. Add first-read sharing-error and persistence regressions plus cache-hit and non-resolving behavior coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amit Chauhan (achauhan-scc)
approved these changes
Sep 25, 2026
ayushhgarg-work
enabled auto-merge (squash)
September 25, 2026 07:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Improve Azure DevOps artifact caching used by component
additional_includes.Artifact-tool HTTP request validation is addressed separately in #49186. This PR does not include that fallback change or a package release/version bump. The two branches were checked for conflict-free integration. No public API signatures are changed; unsafe cache inputs are intentionally rejected.
Validation
Review/CI follow-up at
225f7a17391d37511b81579aa89d5f470b3b7dc0, preserving the existing upstream merge:The original cache fix was also tested on Windows and native Linux. These local results do not imply that the latest PR CI is green; the new Python 3.13/3.14 CI results remain required. No live Azure service or real credentials were used.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines