Repository navigation
Live testing for fabric - #3686
Open
Chidozie Ononiwu (chidozieononiwu) wants to merge 3 commits into
Open
Chidozie Ononiwu (chidozieononiwu) wants to merge 3 commits into
Chidozie Ononiwu (chidozieononiwu) wants to merge 3 commits into
Conversation
Chidozie Ononiwu (chidozieononiwu)
requested review from
a team
as code owners
September 15, 2026 22:49
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Member
Author
|
/azp run mcp - pullrequest - live |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate findings affect cleanup compatibility, live-test execution, build discovery, and test compilation.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds provider-owned PowerShell provisioning and cleanup for Fabric live tests, with CI integration and OneLake lifecycle testing.
Changes:
- Adds custom resource lifecycle scripts and output publication.
- Integrates custom providers into build metadata and live-test pipelines.
- Adds OneLake tests and configurable server executable resolution.
Review findings:
- Moderate (2 votes): Validate that provisioning and cleanup scripts exist as a pair.
- Nit (2 votes): Regenerate generated help files for the updated resource scripts.
- Critical (1 vote): Fix PowerShell version incompatibility in
Remove-TestResources.ps1. - Nit (1 vote): Document
-TestResourcesDirectoryin generated cleanup help. - Moderate (2 votes): Generate live test settings for custom-provider pipeline tasks.
- Moderate (1 vote): Make build metadata discovery recursive.
- Moderate (3 votes): Normalize the OneLake listing suffix before comparison.
- Critical (1 vote): Address nullable
GetString()handling in the OneLake test.
File summaries
| File | Summary |
|---|---|
tools/Fabric.Mcp.Tools.OneLake/tests/test-resources.ps1 |
Provisions Fabric workspace and lakehouse resources. |
tools/Fabric.Mcp.Tools.OneLake/tests/remove-test-resources.ps1 |
Cleans up Fabric workspace resources. |
tools/Fabric.Mcp.Tools.OneLake/tests/Fabric.Mcp.Tools.OneLake.Tests/OneLakeCommandTests.cs |
Adds the OneLake lifecycle live test. |
tools/Fabric.Mcp.Tools.OneLake/tests/Fabric.Mcp.Tools.OneLake.Tests/Fabric.Mcp.Tools.OneLake.Tests.csproj |
Enables live tests. |
tools/Fabric.Mcp.Tools.OneLake/tests/Fabric.Mcp.Tools.OneLake.Tests/assets.json |
Adds recorded-test metadata. |
eng/tools/VallyEvaluator/src/Models/BuildInfoModels.cs |
Models resource-provider metadata. |
eng/scripts/New-BuildInfo.ps1 |
Detects resource provisioning models. |
eng/README.md |
Documents provider metadata. |
eng/pipelines/templates/jobs/live-test.yml |
Adds custom provisioning, testing, and cleanup tasks. |
eng/common/TestResources/TestResources-Helpers.ps1 |
Publishes custom resource outputs. |
eng/common/TestResources/setup-environments.yml |
Adds conditional environment setup. |
eng/common/TestResources/Remove-TestResources.ps1 |
Discovers custom cleanup scripts. |
eng/common/TestResources/remove-test-resources.yml |
Adds conditional cleanup execution. |
eng/common/TestResources/README.md |
Documents provider-owned resources. |
eng/common/TestResources/New-TestResources.ps1 |
Discovers and invokes custom provisioners. |
eng/common/TestResources/deploy-test-resources.yml |
Adds conditional deployment behavior. |
eng/common/TestResources/build-test-resource-config.yml |
Adds configurable pipeline conditions. |
core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/LiveServerFixture.cs |
Supports custom server executables. |
core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/Helpers/McpTestUtilities.cs |
Generalizes executable path resolution. |
Review details
Suppressed comments (2)
eng/common/TestResources/Remove-TestResources.ps1:355
- The committed generated help file
eng/common/TestResources/Remove-TestResources.ps1.mdstill documents only the service-directory/resource-group forms and omits-TestResourcesDirectory, even though this new parameter is the entry point for custom cleanup. Regenerate the help file so the command documentation matches the new contract.
.PARAMETER TestResourcesDirectory
The directory in which to discover a provider-owned remove-test-resources.ps1
script or Azure test resource templates.
eng/scripts/New-BuildInfo.ps1:336
- The matrix generator only probes these filenames at the tests directory root, while
New-TestResources.ps1discovers custom scripts recursively. A provider lifecycle placed in a nested test-resources subdirectory will be runnable by the provisioner but gets notestResourceProvider, so the live-test matrix silently omits it. Use the same recursive discovery here.
$hasCustomProvisioner = Test-Path "$rootedTestResourcesPath/test-resources.ps1"
$hasCustomCleanup = Test-Path "$rootedTestResourcesPath/remove-test-resources.ps1"
- Files reviewed: 19/19 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Write-Verbose "Overriding test resources search directory to '$root'" | ||
| } | ||
|
|
||
| $customRemovalScripts = @($root ? (Get-ChildItem -Path $root -Filter "remove-$ResourceType-resources.ps1" -Recurse) : @()) |
| var xmlResponse = result.AssertProperty("xmlResponse").GetString(); | ||
| Assert.False(string.IsNullOrWhiteSpace(xmlResponse)); | ||
|
|
||
| var document = XDocument.Parse(xmlResponse); |
Comment on lines
+182
to
+185
| $customProvisioningScripts = @(Get-ChildItem -Path $root -Filter "$ResourceType-resources.ps1" -Recurse) | ||
| if ($templateFiles -and $customProvisioningScripts) { | ||
| throw "Test resource directory '$root' contains both an ARM/Bicep template and a custom provisioner. Use only one provisioning model per directory." | ||
| } |
Comment on lines
+73
to
+76
| ./eng/common/TestResources/New-TestResources.ps1 ` | ||
| -TestResourcesDirectory '$(Build.SourcesDirectory)/$(TestResourcesPath)' ` | ||
| -CI ` | ||
| -Force | Out-Null |
Comment on lines
+53
to
+54
| itemFound = document.Descendants().Any(element => | ||
| element.Name.LocalName == "Name" && element.Value == expectedItemName); |
Comment on lines
+773
to
+778
| Creates live test resources using a provider-owned PowerShell script or deploys | ||
| test-resources.json or test-resources.bicep files to a new Azure resource group. | ||
|
|
||
| This script searches the directory specified in $ServiceDirectory recursively | ||
| for files named test-resources.json or test-resources.bicep. All found test-resources.json | ||
| and test-resources.bicep files will be deployed to the test resource group. | ||
| for a test-resources.ps1 script or files named test-resources.json or | ||
| test-resources.bicep. A directory must use only one provisioning model. |
14 of 21 tasks
Chidozie Ononiwu (chidozieononiwu)
force-pushed
the
LiveTestingForFabric
branch
from
September 24, 2026 03:35
32d5306 to
0f6dfeb
Compare
Amos Hersch (AmosHersch)
added a commit
that referenced
this pull request
Oct 11, 2026
* feat(fabric): add read-only core get-item tool ## Summary Add core_get-item to retrieve generic Fabric item metadata using known workspace and item IDs. Include input validation, typed results, safe retry guidance, registration, tests, documentation, prompts, and a changelog entry. ## Prompting Intent The contributor requested one focused Fabric MCP tool, aligned with existing repository patterns, with no item data or definition access and no authentication changes. Preserve the existing creation and catalog-search behavior, address review findings, and submit a draft PR with incomplete validation explicitly identified. ## Linked Sources - Fabric Get Item API: https://learn.microsoft.com/rest/api/fabric/core/items/get-item - Contribution guide: https://github.com/microsoft/mcp/blob/main/CONTRIBUTING.md - Command options guide: https://github.com/microsoft/mcp/blob/main/docs/option-conversion.md - Recorded test guide: https://github.com/microsoft/mcp/blob/main/docs/recorded-tests.md - Description evaluator: https://github.com/microsoft/mcp/blob/main/eng/tools/ToolDescriptionEvaluator/Quickstart.md - Fabric test infrastructure: #3686 ## Rationale Keep string service inputs consistent with existing Core operations while validating and normalizing UUIDs before authentication. Use a dedicated metadata projection so definitions and workload-specific fields cannot leak into the result. Factor HTTP sending only to let the new read inspect status and Retry-After while preserving existing create/search handling. Use source-generated JSON and the shared MCP loader rather than another schema or execution path. Keep backend bodies out of errors and validate the registered tool with offline HTTP and credential substitutes. All 118 Core tests, owning-project formatting, the Fabric host build, XML documentation compilation, and spelling passed. Native validation and bounded manual live reads also passed before the documentation-only follow-up. Description scoring and the required Fabric integration coverage remain pending maintainer coordination. Co-authored-by: Copilot <[email protected]> * fix(ci): keep tool catalog stderr out of JSON ## Summary Stop merging native stderr into the JSON consumed by the tool-selection prompt validator. Add four Pester regression tests for stdout parsing, visible stderr diagnostics, and rejection of invalid or contaminated stdout. ## Prompting Intent The contributor asked to fix the failed Analyze check in PR #3701 and update the existing PR. Keep the change limited to the validator and regression coverage, preserve strict prompt validation, and do not change the Fabric tool or suppress validation errors. ## Linked Sources - PR: #3701 - Failing Analyze check: https://github.com/microsoft/mcp/runs/105130046877 - Validator: https://github.com/microsoft/mcp/blob/3acf0c58036a14e9be308898153053fc98a33019/eng/scripts/Test-ToolSelectionPrompts.ps1 ## Rationale Fabric correctly writes its tool catalog to stdout and startup diagnostics to stderr. The validator's merged capture made valid JSON unparseable. Removing the redirection preserves diagnostics and existing exit handling while parsing only stdout. The regression tests execute the actual capture and parse statements rather than a duplicate implementation. All four Pester tests passed. Build-Local.ps1 -ServerName Fabric.Mcp.Server -VerifyNpx passed in a non-interactive process. The full Fabric prompt validator passed with 49 tools, one server tested, zero skips, and zero violations. The negative check still rejected prompts for tools outside the Fabric catalog. Spelling and whitespace checks passed. Co-authored-by: Copilot <[email protected]> * feat(fabric): add read-only core_get-workspace tool Co-authored-by: Copilot App <[email protected]> * feat(fabric): add read-only core_list-workspaces tool Co-authored-by: Copilot App <[email protected]> * feat(fabric): add read-only core_list-items tool Add paginated workspace and folder inventory with typed metadata, safe continuation encoding, and sanitized failures. Cover the command, service, MCP pipeline, and local discovery without live Fabric requests. Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_create-workspace with capacity support Create Fabric workspaces in one synchronous request with optional capacity and domain assignment, typed metadata, guarded inputs, sanitized errors, and offline coverage. Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_update-workspace tool Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_update-item tool Add validated metadata-only item updates with omitted and empty description semantics, source-generated output, and offline command/service/MCP coverage. Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_delete-item with explicit hard-delete opt-in Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_delete-workspace tool Co-authored-by: Copilot App <[email protected]> * Add submit-only Fabric workspace capacity assignment Co-authored-by: Copilot App <[email protected]> * Format assignment registration coverage Co-authored-by: Copilot App <[email protected]> * fix(fabric): preserve create and catalog search HTTP errors Preserve response status in EnsureSuccessAsync and add operation-local HTTP guidance without changing shared error handling, result shapes, or retries. Cover service and command regressions, update old status-loss assertions, and add a Fabric bug-fix changelog entry. Co-authored-by: Copilot App <[email protected]> * fix(fabric): sanitize errors and validate creation and paging Sanitize Create Item and Catalog Search public errors without changing status mappings or success contracts. Validate workspace UUIDs with the compatible alias, reject mixed catalog continuation criteria, document verified requirements, and correct Update Item error punctuation. Cover serialized Debug/Release errors and command/service validation. Co-authored-by: Copilot App <[email protected]> * fix(fabric): honor workspace contracts and deletion safety Make workspace type optional across get, list, create, and update; retain configured HTTP transports while disabling automatic redirects; preserve confirmed delete responses during late cancellation and improve upstream 400 guidance. Correct all 23 invalid prompt interaction cells without changing 37 prompts, and add regression coverage and documentation. Co-authored-by: Copilot App <[email protected]> * fix(fabric): share sanitized errors and retain missing-option guidance Report only registered required option names for Create Item validation failures while keeping parser details private. Centralize null exception results in an AOT-safe Fabric command base and consolidate five identical throttling exceptions without changing operation-specific errors, retry contracts, or deletion modes. Co-authored-by: Copilot App <[email protected]> * fix(fabric): sanitize shared Core parser errors Sanitize structured parser failures after the framework handler while preserving required-option guidance and command-specific overrides. Cover real Boolean binding, unknown options, required-name allowlisting, and blank workspace-name parser failures without changing services or legacy creation behavior. Co-authored-by: Copilot App <[email protected]> * test(fabric): centralize Core catalog expectations Keep one independent expected catalog for exact command and MCP discovery, read-only membership, singleton registration, and schema consistency. Preserve operation-specific tests while removing unrelated catalog copies and fragile host totals. Cover missing, extra, duplicate, and misclassified entries in both catalog modes and document the one-entry workflow for future tools. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Amos Hersch <[email protected]>
msalaman
added a commit
that referenced
this pull request
Oct 12, 2026
* Fix advisor remediation deserialization for double version (#3880) * Update export tool discovery description for Azure Terraform tools (#3737) * fix(azureterraform): clarify export tool discovery Make export intent visible in namespace and individual tool descriptions while preserving local command generation. Cover discovery, routing, provider forwarding, installation help, and HTTP restrictions with regression tests. Disambiguate tools that competed for the same prompts by keying each description on its distinguishing selection signal. The aztfexport resource tool leads with the full Azure resource ID shape and states it exports only that resource, while the resourcegroup tool keys on a named resource group. The azurerm and azapi documentation tools state that they read reference documentation rather than querying live Azure resources, and identify their inputs by the azurerm_ prefix and the ARM namespace format respectively. The conftest workspace and plan tools distinguish a folder of Terraform .tf source files from an already generated tfplan.json. Validated with the tool description evaluator against the azureterraform prompts, which improved top-choice selection from 70.0% to 93.3%, with all prompts remaining above the 0.40 confidence bar. Add a checked-in Vally specification covering the prompts reported in the issue plus the tool pairs that compete for similar prompts. The conftest prompts in e2eTestPrompts.md are marked context-required and are therefore skipped by generated specifications, so the checked-in specification is the only Vally coverage for them. Pin the disambiguating phrases with unit tests so that rewording a description cannot silently regress tool selection. Addresses #3553 Co-authored-by: Copilot App <[email protected]> * Clarify AzAPI docs API version wording Replace the ambiguous 'optionally for a specific API version' phrase with an explicit statement that the tool returns the latest stable API version schema unless a specific API version is requested. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: Copilot App <[email protected]> * feat(fabric): add read-only core_get-item tool (#3701) * feat(fabric): add read-only core get-item tool ## Summary Add core_get-item to retrieve generic Fabric item metadata using known workspace and item IDs. Include input validation, typed results, safe retry guidance, registration, tests, documentation, prompts, and a changelog entry. ## Prompting Intent The contributor requested one focused Fabric MCP tool, aligned with existing repository patterns, with no item data or definition access and no authentication changes. Preserve the existing creation and catalog-search behavior, address review findings, and submit a draft PR with incomplete validation explicitly identified. ## Linked Sources - Fabric Get Item API: https://learn.microsoft.com/rest/api/fabric/core/items/get-item - Contribution guide: https://github.com/microsoft/mcp/blob/main/CONTRIBUTING.md - Command options guide: https://github.com/microsoft/mcp/blob/main/docs/option-conversion.md - Recorded test guide: https://github.com/microsoft/mcp/blob/main/docs/recorded-tests.md - Description evaluator: https://github.com/microsoft/mcp/blob/main/eng/tools/ToolDescriptionEvaluator/Quickstart.md - Fabric test infrastructure: #3686 ## Rationale Keep string service inputs consistent with existing Core operations while validating and normalizing UUIDs before authentication. Use a dedicated metadata projection so definitions and workload-specific fields cannot leak into the result. Factor HTTP sending only to let the new read inspect status and Retry-After while preserving existing create/search handling. Use source-generated JSON and the shared MCP loader rather than another schema or execution path. Keep backend bodies out of errors and validate the registered tool with offline HTTP and credential substitutes. All 118 Core tests, owning-project formatting, the Fabric host build, XML documentation compilation, and spelling passed. Native validation and bounded manual live reads also passed before the documentation-only follow-up. Description scoring and the required Fabric integration coverage remain pending maintainer coordination. Co-authored-by: Copilot <[email protected]> * fix(ci): keep tool catalog stderr out of JSON ## Summary Stop merging native stderr into the JSON consumed by the tool-selection prompt validator. Add four Pester regression tests for stdout parsing, visible stderr diagnostics, and rejection of invalid or contaminated stdout. ## Prompting Intent The contributor asked to fix the failed Analyze check in PR #3701 and update the existing PR. Keep the change limited to the validator and regression coverage, preserve strict prompt validation, and do not change the Fabric tool or suppress validation errors. ## Linked Sources - PR: #3701 - Failing Analyze check: https://github.com/microsoft/mcp/runs/105130046877 - Validator: https://github.com/microsoft/mcp/blob/3acf0c58036a14e9be308898153053fc98a33019/eng/scripts/Test-ToolSelectionPrompts.ps1 ## Rationale Fabric correctly writes its tool catalog to stdout and startup diagnostics to stderr. The validator's merged capture made valid JSON unparseable. Removing the redirection preserves diagnostics and existing exit handling while parsing only stdout. The regression tests execute the actual capture and parse statements rather than a duplicate implementation. All four Pester tests passed. Build-Local.ps1 -ServerName Fabric.Mcp.Server -VerifyNpx passed in a non-interactive process. The full Fabric prompt validator passed with 49 tools, one server tested, zero skips, and zero violations. The negative check still rejected prompts for tools outside the Fabric catalog. Spelling and whitespace checks passed. Co-authored-by: Copilot <[email protected]> * feat(fabric): add read-only core_get-workspace tool Co-authored-by: Copilot App <[email protected]> * feat(fabric): add read-only core_list-workspaces tool Co-authored-by: Copilot App <[email protected]> * feat(fabric): add read-only core_list-items tool Add paginated workspace and folder inventory with typed metadata, safe continuation encoding, and sanitized failures. Cover the command, service, MCP pipeline, and local discovery without live Fabric requests. Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_create-workspace with capacity support Create Fabric workspaces in one synchronous request with optional capacity and domain assignment, typed metadata, guarded inputs, sanitized errors, and offline coverage. Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_update-workspace tool Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_update-item tool Add validated metadata-only item updates with omitted and empty description semantics, source-generated output, and offline command/service/MCP coverage. Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_delete-item with explicit hard-delete opt-in Co-authored-by: Copilot App <[email protected]> * feat(fabric): add core_delete-workspace tool Co-authored-by: Copilot App <[email protected]> * Add submit-only Fabric workspace capacity assignment Co-authored-by: Copilot App <[email protected]> * Format assignment registration coverage Co-authored-by: Copilot App <[email protected]> * fix(fabric): preserve create and catalog search HTTP errors Preserve response status in EnsureSuccessAsync and add operation-local HTTP guidance without changing shared error handling, result shapes, or retries. Cover service and command regressions, update old status-loss assertions, and add a Fabric bug-fix changelog entry. Co-authored-by: Copilot App <[email protected]> * fix(fabric): sanitize errors and validate creation and paging Sanitize Create Item and Catalog Search public errors without changing status mappings or success contracts. Validate workspace UUIDs with the compatible alias, reject mixed catalog continuation criteria, document verified requirements, and correct Update Item error punctuation. Cover serialized Debug/Release errors and command/service validation. Co-authored-by: Copilot App <[email protected]> * fix(fabric): honor workspace contracts and deletion safety Make workspace type optional across get, list, create, and update; retain configured HTTP transports while disabling automatic redirects; preserve confirmed delete responses during late cancellation and improve upstream 400 guidance. Correct all 23 invalid prompt interaction cells without changing 37 prompts, and add regression coverage and documentation. Co-authored-by: Copilot App <[email protected]> * fix(fabric): share sanitized errors and retain missing-option guidance Report only registered required option names for Create Item validation failures while keeping parser details private. Centralize null exception results in an AOT-safe Fabric command base and consolidate five identical throttling exceptions without changing operation-specific errors, retry contracts, or deletion modes. Co-authored-by: Copilot App <[email protected]> * fix(fabric): sanitize shared Core parser errors Sanitize structured parser failures after the framework handler while preserving required-option guidance and command-specific overrides. Cover real Boolean binding, unknown options, required-name allowlisting, and blank workspace-name parser failures without changing services or legacy creation behavior. Co-authored-by: Copilot App <[email protected]> * test(fabric): centralize Core catalog expectations Keep one independent expected catalog for exact command and MCP discovery, read-only membership, singleton registration, and schema consistency. Preserve operation-specific tests while removing unrelated catalog copies and fragile host totals. Cover missing, extra, duplicate, and misclassified entries in both catalog modes and document the one-entry workflow for future tools. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Amos Hersch <[email protected]> * Add Fabric LRO tracking and bounded Create Item polling (#3892) Add Fabric operation-state and operation-result tools, shared hybrid LRO handling, and optional bounded Create Item polling. Keep a 120-second default with a server-enforced 600-second maximum, resumable receipts, and no automatic resubmission of the initiating mutation. Integrate the merged Get Item tooling and centralized catalog coverage. Co-authored-by: Copilot App <[email protected]> * Update Fabric REST API specifications and item definition documentation (#3914) * Refresh Fabric static resources with a reusable updater Refresh pinned REST API specifications and item-definition articles, preserve source bytes and attribution, and add a guarded two-step manual refresh with focused regression coverage. Co-authored-by: Copilot App <[email protected]> * Remove generated Fabric resource metadata Keep source revisions in refresh results and required attribution in the existing Docs README. Stop embedding license and source manifests without changing API specifications or article content. Co-authored-by: Copilot App <[email protected]> * Limit Fabric refresh PR to updated resources Remove repository maintenance tooling and restore baseline attributes and tests. Exclude the legacy Ontology article while preserving all remaining resource blobs. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: Copilot App <[email protected]> * Add URL validation for all ArmClient uses and add DNS->IP address resolution SSRF protections. (#3884) * Add URL validation for all ArmClient uses and add DNS->IP address resolution SSRF protections. Introduce IEndpointValidator for improved unit testing and parallel test execution. Update documentation accordingly. And a bunch of follow up squashed commits below... Fix Fabric test compilation errors Remove added difficulty around ServiceStartCommand testing. Slight tinkering to HttpClientFactoryConfigurator. Fix using sorting in NamespaceUpdateCommandTests.cs Fix Speech live test regression caused by #3282. Stabilize LoopbackHttpServer on macOS. Application of IP address vs DefaultProxy is now calculated per-request due to dynamic nature of DefaultProxy, PACs, etc. Also other PR feedback. More doc updates for using a proxy vs not and IP address filtering applied. Remove NoSsrfClientName and disable auto-redirect for _all_ HttpClient instances of DI. Enable NO_PROXY to hit the IP address filtering logic just like if a system/PAC proxy allows for bypassing a destination. Clarify known limitation around a system-level dynamic proxies that change bypassing answers mid-request. Fix networking unit tests by adding explicit proxy in DI. CI builds were picking up proxy setting from the host machine which prevented code paths related to our IP address filtering tests. * Fix spelling error in FabricCoreSetupTests comment (rquests -> requests) --------- Co-authored-by: Vinay Gera <[email protected]> * Sync skill references from GitHub-Copilot-for-Azure (#3901) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Sync eng/common directory with azure-sdk-tools for PR 17165 (#3919) * Remove only the DevOps release work item update functionality --------- Co-authored-by: Jigyasa Chopra <[email protected]> Co-authored-by: Yun Liu <[email protected]> Co-authored-by: Copilot App <[email protected]> Co-authored-by: Hasan Abo-Shally <[email protected]> Co-authored-by: Amos Hersch <[email protected]> Co-authored-by: Amos Hersch <[email protected]> Co-authored-by: Steven Vukelich <[email protected]> Co-authored-by: Vinay Gera <[email protected]> Co-authored-by: ghcp4a-bot[bot] <288718659+ghcp4a-bot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: azure-sdk-automation[bot] <191533747+azure-sdk-automation[bot]@users.noreply.github.com>
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.
This pull request introduces support for provider-owned PowerShell scripts as an alternative to ARM/Bicep templates for creating and cleaning up live test resources. It refactors the test resource provisioning and removal scripts to discover and invoke these custom scripts, enforces that only one provisioning model is used per directory, and documents the new conventions. Additionally, it improves modularity and robustness in the test infrastructure and makes minor improvements to test utility code.
Test Resource Provisioning and Cleanup Enhancements:
eng/common/TestResources/New-TestResources.ps1,eng/common/TestResources/Remove-TestResources.ps1,eng/common/TestResources/README.md: Added support for provider-owned PowerShell scripts (<resource-type>-resources.ps1for creation,remove-<resource-type>-resources.ps1for cleanup) as an alternative to ARM/Bicep templates. The scripts now detect and invoke these custom scripts, enforce mutual exclusivity with template-based provisioning, and handle environment variable publishing. Documentation was updated to describe the new workflow and requirements for custom provisioners. [1] [2] [3] [4] [5] [6]eng/common/TestResources/TestResources-Helpers.ps1: Added thePublishCustomTestResourceOutputsfunction to validate and publish environment variables (including secrets) from custom provisioners, with error handling for output structure and duplicate variables.Script Robustness and Modularity:
eng/common/TestResources/New-TestResources.ps1,eng/common/TestResources/Remove-TestResources.ps1: Deferred importing Az PowerShell modules and sourcing helper scripts until after checking for custom provisioners, reducing unnecessary dependencies and improving compatibility with non-Azure resource providers. [1] [2]eng/common/TestResources/New-TestResources.ps1,eng/common/TestResources/Remove-TestResources.ps1: Added new parameters and improved directory resolution logic to allow specifying a custom test resources directory, supporting more flexible test setups. [1] [2]Documentation and Configuration:
eng/common/TestResources/README.md: Expanded documentation to explain provider-owned resource scripts, their required inputs/outputs, and their integration with the test infrastructure.eng/README.md: Added atestResourceProviderproperty to the configuration for clarity on resource provisioning methods.Minor Improvements and Test Utility Updates:
core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/Helpers/McpTestUtilities.cs,core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/LiveServerFixture.cs: Refactored test utility methods to generalize executable path resolution and allow specifying custom executable names and paths for improved test flexibility. [1] [2] [3]eng/common/TestResources/build-test-resource-config.yml: Added aConditionparameter for improved pipeline configurability.