fetches test models from azure storage blob#848
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR migrates the sdk_v2 test infrastructure away from cloning the test-data-shared Azure DevOps Git repo (LFS) and instead downloads the shared test model cache from Azure Blob Storage. Across all sdk_v2 languages (C++, C#, JS, Python), model-dependent tests are now gated on a required FOUNDRY_TEST_DATA_DIR environment variable, and the CI pipelines populate that directory via a new azcopy-based template. This unifies how the model cache is provided and removes the per-platform git-lfs bootstrapping that the repo checkout required.
Changes:
- Adds
.pipelines/templates/fetch-test-data-from-blob.yml, which usesAzureCLI@2+azcopy(AZCLI auto-login) to download model data into a destination path, replacingcheckout-steps.ymlusage in v2 build/test stages (and dropping the macOS git-lfs install steps). - Makes
FOUNDRY_TEST_DATA_DIRthe single required source of the model cache: C++GetTestModelCacheDirnow throws if unset (removing the repo-root fallback), Pythonconftest.pyskips when it's unset/missing, and C#Utils.csdrops theappsettings.Test.jsonfallback (and its config package references). - Updates developer docs (
sdk_v2/DEVELOPMENT.md,LOCAL_MODEL_TESTING.md) to describe the new env-var workflow.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.pipelines/templates/fetch-test-data-from-blob.yml |
New template that azcopy-downloads test model data from blob storage |
.pipelines/v2/templates/steps-build-{linux,macos,windows}.yml |
Replace test-data-shared checkout with blob fetch into $(Agent.BuildDirectory)/test-data-shared |
.pipelines/v2/templates/stages-{cs,js,python}.yml |
Replace checkout + macOS git-lfs install with blob fetch in test stages |
sdk_v2/cpp/test/internal_api/test_model_cache.h |
Require FOUNDRY_TEST_DATA_DIR; remove repo-root default fallback and FindRepoRoot |
sdk_v2/cs/test/FoundryLocal.Tests/Utils.cs |
Require env var; remove appsettings-based fallback logic |
sdk_v2/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj |
Remove appsettings.Test.json copy and Microsoft.Extensions.Configuration packages |
sdk_v2/cs/test/FoundryLocal.Tests/appsettings.Test.json |
Deleted (no longer used) |
sdk_v2/cs/test/FoundryLocal.Tests/LOCAL_MODEL_TESTING.md |
Document env-var-based workflow |
sdk_v2/python/test/conftest.py |
Skip model tests unless FOUNDRY_TEST_DATA_DIR is set and exists |
sdk_v2/DEVELOPMENT.md |
Document the model cache requirement for tests |
….com/microsoft/Foundry-Local into prathikrao/fetch-test-data-from-blob
No description provided.