Cleanup repo to follow best practices - #3291
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
This PR standardizes long-running ARM operation handling by switching to WaitUntil.Started + BaseAzureService.WaitForLroCompletionAsync, and normalizes test project naming/namespace conventions to use *.Tests instead of *.UnitTests / *.LiveTests.
Changes:
- Updated multiple Azure resource operations (Resilience Management, Azure Backup) to start LROs and then explicitly await completion via
WaitForLroCompletionAsync. - Renamed/realigned test project namespaces and
InternalsVisibleTotargets from*.UnitTests/*.LiveTeststo*.Tests, and updated solution references accordingly. - Introduced new
*.Testscsproj files for internal tooling test projects (ToolMetadataExporter, ToolDescriptionEvaluator).
Invoking Livetests
Copilot submitted PRs are not trustworthy by default. Users with write access to the repo need to validate the contents of this PR before leaving a comment with the text /azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.
Reviewed changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/ResilienceManagementService.cs | Uses WaitUntil.Started + WaitForLroCompletionAsync for ARM LROs when creating usage plans/enrollments. |
| tools/Azure.Mcp.Tools.IoTHub/tests/Azure.Mcp.Tools.IoTHub.Tests/IoTHubCommandTests.cs | Renames test namespace from LiveTests to Tests. |
| tools/Azure.Mcp.Tools.IoTHub/tests/Azure.Mcp.Tools.IoTHub.Tests/assets.json | Updates recorded-test assets tag naming to match *.Tests. |
| tools/Azure.Mcp.Tools.IoTHub/src/AssemblyInfo.cs | Updates InternalsVisibleTo to the new Azure.Mcp.Tools.IoTHub.Tests assembly name. |
| tools/Azure.Mcp.Tools.Insights/tests/Azure.Mcp.Tools.Insights.Tests/Services/SamplingServiceTests.cs | Renames test namespace from UnitTests to Tests. |
| tools/Azure.Mcp.Tools.Insights/tests/Azure.Mcp.Tools.Insights.Tests/Services/PropertyAggregatorTests.cs | Renames test namespace from UnitTests to Tests. |
| tools/Azure.Mcp.Tools.Insights/tests/Azure.Mcp.Tools.Insights.Tests/Services/AggregationFilterTests.cs | Renames test namespace from UnitTests to Tests. |
| tools/Azure.Mcp.Tools.Insights/tests/Azure.Mcp.Tools.Insights.Tests/InsightsGetCommandTests.cs | Adds localized warning suppression and renames namespace to Tests. |
| tools/Azure.Mcp.Tools.Insights/tests/Azure.Mcp.Tools.Insights.Tests/Azure.Mcp.Tools.Insights.Tests.csproj | Removes project-wide MCP9005 suppression in favor of localized suppression in tests. |
| tools/Azure.Mcp.Tools.Insights/src/AssemblyInfo.cs | Consolidates InternalsVisibleTo entries to the new *.Tests assembly name. |
| tools/Azure.Mcp.Tools.AzureBackup/tests/Azure.Mcp.Tools.AzureBackup.Tests/AzureBackupCommandTests.cs | Updates doc comment cref (but currently introduces an unresolved cref issue). |
| tools/Azure.Mcp.Tools.AzureBackup/src/Services/RsvBackupOperations.cs | Switches RSV operations to WaitUntil.Started + WaitForLroCompletionAsync. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Services/DppBackupOperations.cs | Switches DPP operations to WaitUntil.Started + WaitForLroCompletionAsync. |
| servers/Azure.Mcp.Server/Azure.Mcp.Server.slnx | Updates solution reference to Insights test project path/name (*.Tests). |
| Microsoft.Mcp.slnx | Updates solution references to *.Tests for multiple tool/test projects. |
| eng/tools/Tools.sln | Renames ToolMetadataExporter test project entry to ToolMetadataExporter.Tests. |
| eng/tools/ToolMetadataExporter/tests/ToolMetadataExporter.Tests/ToolMetadataExporter.Tests.csproj | Adds new test csproj (but missing HasUnitTests/HasLiveTests metadata). |
| eng/tools/ToolMetadataExporter/tests/ToolMetadataExporter.Tests/ToolAnalyzerTests.cs | Renames namespace to ToolMetadataExporter.Tests. |
| eng/tools/ToolMetadataExporter/tests/ToolMetadataExporter.Tests/Services/AzureMcpKustoDatastoreTests.cs | Renames namespace to ToolMetadataExporter.Tests.Services. |
| eng/tools/ToolMetadataExporter/tests/ToolMetadataExporter.Tests/Services/AzmcpProgramTests.cs | Renames namespace to ToolMetadataExporter.Tests.Services. |
| eng/tools/ToolMetadataExporter/tests/ToolMetadataExporter.Tests/Models/RunInformationTests.cs | Renames namespace to ToolMetadataExporter.Tests.Models. |
| eng/tools/ToolMetadataExporter/src/AssemblyInfo.cs | Updates InternalsVisibleTo to the new ToolMetadataExporter.Tests assembly name. |
| eng/tools/ToolDescriptionEvaluator/ToolDescriptionEvaluator.sln | Renames ToolDescriptionEvaluator test project to *.Tests. |
| eng/tools/ToolDescriptionEvaluator/tests/ToolDescriptionEvaluator.Tests/VectorDBTests.cs | Renames namespace to ToolDescriptionEvaluator.Tests. |
| eng/tools/ToolDescriptionEvaluator/tests/ToolDescriptionEvaluator.Tests/ToolDescriptionEvaluator.Tests.csproj | Adds new ToolDescriptionEvaluator *.Tests csproj with HasUnitTests/HasLiveTests metadata. |
| eng/tools/ToolDescriptionEvaluator/tests/ToolDescriptionEvaluator.Tests/InMemoryVectorStoreCollectionTests.cs | Renames namespace to ToolDescriptionEvaluator.Tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
e8aa497
into
microsoft:main
What does this PR do?
Clean-up to follow coding best practices:
BaseAzureService.WaitForLroCompletionAsyncto handle polling long-running operations until completion.*.Testsfor test projects, not*.UnitTestsor*.LiveTests.GitHub issue number?
[Link to the GitHub issue this PR addresses]Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline