Repository navigation
Add Advisor service retirement insights - #3891
Open
rashika1809 wants to merge 1 commit into
Open
rashika1809 wants to merge 1 commit into
rashika1809 wants to merge 1 commit into
Conversation
Add tenant-wide ARG-backed burndown insights for subscriptions and service groups, including typed KPI mapping, documentation, routing metadata, and comprehensive tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rashika1809
requested review from
Larry Osterman (LarryOsterman),
Alan Zimmer (alzimmermsft),
Connie Yau (conniey),
msalaman,
Sai Koumudi Kaluvakolanu (saikoumudi),
Sandeep Sen (sandeep-sen) and
Steven Vukelich (vukelich)
and
a balanced review from Copilot
October 8, 2026 14:08
Contributor
|
Thank you for your contribution rashika1809! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Tenant selection can silently query the wrong tenant, and required recorded-test and description-evaluation evidence remains missing.
5 open findings
What changed in this PR
Adds an Azure Advisor command for querying service-retirement burndown insights across subscriptions, service groups, and fleet scope.
Changes:
- Adds the command, Resource Graph query, response model, and registration.
- Adds unit tests, documentation, prompts, routing, and changelog entry.
- Includes AOT serialization metadata.
| File | Description |
|---|---|
ServiceRetirementInsightsServiceTests.cs |
Tests query construction and response parsing. |
ServiceRetirementInsightsCommandTests.cs |
Tests command validation and execution. |
IAdvisorService.cs |
Adds the insights service contract. |
AdvisorService.cs |
Queries and maps Resource Graph insights. |
ServiceRetirementInsightsOptions.cs |
Defines scope and result-limit options. |
ServiceRetirementInsight.cs |
Defines the response model. |
ServiceRetirementInsightsCommand.cs |
Implements the MCP command. |
AdvisorJsonContext.cs |
Registers AOT serialization types. |
AdvisorSetup.cs |
Registers the new command. |
consolidated-tools.json |
Adds consolidated routing. |
README.md |
Documents Advisor retirement scenarios. |
e2eTestPrompts.md |
Adds routing prompts. |
azmcp-commands.md |
Documents command syntax. |
rashika-advisor-service-retirement-insights.yml |
Adds the feature changelog entry. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
| ArgumentOutOfRangeException.ThrowIfLessThan(top, 1); | ||
| ArgumentOutOfRangeException.ThrowIfGreaterThan(top, 100); | ||
|
|
||
| var tenantResource = await GetTenantResourceAsync(cancellationToken); |
Comment on lines
+17
to
+18
| public class ServiceRetirementInsightsCommandTests | ||
| : CommandUnitTestsBase<ServiceRetirementInsightsCommand, IAdvisorService> |
| [--sub-category <sub-category>] \ | ||
| [--retirement-date <eq|lt|le|gt|ge>:<yyyy-MM-dd>] \ | ||
| [--top <1-100>] \ | ||
| [--top <1-100>] |
Comment on lines
+136
to
+139
| | advisor_serviceretirement_insights | Summarize Day 1 exposure, current exposure, and highest-risk retirements for subscription <subscription> | none | | ||
| | advisor_serviceretirement_insights | Summarize Day 1 exposure, current exposure, and highest-risk retirements for service group <service-group> | none | | ||
| | advisor_serviceretirement_insights | Flag retirements that represent more than half of the current impacted resources remaining for subscription <subscription> | none | | ||
| | advisor_serviceretirement_insights | Flag retirements that represent more than half of the current impacted resources remaining for service group <service-group> | none | |
| Id = "938192ed-a9e5-4edf-b00d-cdec358e7b39", | ||
| Name = "insights", | ||
| Title = "Get Service Retirement Insights", | ||
| Description = "Get Azure service-retirement burndown insight at subscription or service-group aggregation levels. " + |
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.


What does this PR do?
Adds the
advisor_serviceretirement_insightscommand for querying Azure Advisor service-retirement burndown insights at subscription, service-group, or fleet scope.The command queries
microsoft.advisor/insightsthrough Azure Resource Graph, maps the nested insight properties into an AOT-safe response model, and returns Day 1 versus current impacted-resource counts. It supports natural-language scenarios for exposure changes, backlog ranking, sub-50-percent burndown, and completed burndown.This PR also adds command registration, consolidated-tool routing, command documentation, end-to-end prompts, a changelog entry, and comprehensive command/query/model tests.
GitHub issue number?
N/A
Validation
dotnet build tools\Azure.Mcp.Tools.Advisor\src\Azure.Mcp.Tools.Advisor.csproj --disable-build-servers— passed with 0 warnings and 0 errorsadvisor_serviceretirement_insightsgit diff --check— passedUpdate-AzCommandsMetadata.ps1— completed successfullyBuild-Local.ps1 -VerifyNpx— compilation and packaging completed; final shared npx-cache cleanup was blocked by a WindowsEPERMlock ondpapi.nodeAOAI_ENDPOINTis not configured in this environment; Vally independently validated tool routing for the new promptPre-merge Checklist
Process-PackageReadMe.ps1 -Command validate-allAOAI_ENDPOINTis unavailable; Vally routing evaluation passedconsolidated-tools.jsonservers/Azure.Mcp.Server/docs/azmcp-commands.mdUpdate-AzCommandsMetadata.ps1servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdInvoking Livetests
Copilot submitted PRs are not trustworthy by default. Users with
writeaccess 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.