Skip to content

Remove App Lens microsoft.web/sites kind gate and support all site kinds#2596

Merged
msalaman merged 7 commits into
mainfrom
copilot/remove-kind-restriction-app-lens
May 20, 2026
Merged

Remove App Lens microsoft.web/sites kind gate and support all site kinds#2596
msalaman merged 7 commits into
mainfrom
copilot/remove-kind-restriction-app-lens

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

App Lens in MCP was still carrying a legacy restriction that only allowed select microsoft.web/sites kinds (app, linux, functionapp). This PR removes that gate so App Lens accepts all microsoft.web/sites resources, matching current backend support.

  • Service logic update

    • Simplified AppLensService.IsResourceTypeSupported to evaluate support by resource type only.
    • microsoft.web/sites now returns supported regardless of kind.
    • Updated internal call site(s) to use the new method signature.
    • Further simplified the method to use SupportedResourceTypes() as the single source of truth for supported resource types.
  • Unit test updates

    • Updated ResourceDiagnoseCommandTests.IsResourceTypeSupported_ReturnsCorrectResult to validate type-only behavior.
    • Kept coverage for supported/unsupported resource types and case-insensitive matching.
internal static bool IsResourceTypeSupported(string resourceType)
{
    return SupportedResourceTypes().Contains(resourceType, StringComparer.OrdinalIgnoreCase);
}

[!WARNING]

Copilot AI and others added 3 commits May 6, 2026 16:23
Agent-Logs-Url: https://github.com/microsoft/mcp/sessions/274dcc6a-c7ea-4e2d-a43e-6ed2c6e2f60f

Co-authored-by: tmeschter <10506730+tmeschter@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/mcp/sessions/274dcc6a-c7ea-4e2d-a43e-6ed2c6e2f60f

Co-authored-by: tmeschter <10506730+tmeschter@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/mcp/sessions/274dcc6a-c7ea-4e2d-a43e-6ed2c6e2f60f

Co-authored-by: tmeschter <10506730+tmeschter@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove microsoft.web/sites kind restriction in App Lens Remove App Lens microsoft.web/sites kind gate and support all site kinds May 6, 2026
Copilot AI requested a review from tmeschter May 6, 2026 16:27
@tmeschter
Copy link
Copy Markdown
Member

@copilot Since the updated method now just checks the resourceType against a known set of items, can you simplify the code?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 6, 2026

@copilot Since the updated method now just checks the resourceType against a known set of items, can you simplify the code?

Updated in c58f4b3. I simplified the method to a single case-insensitive membership check against SupportedResourceTypes(), so the supported type list is defined in one place.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 1k9vsblobprodcus379.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • 1s1vsblobprodcus386.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • 37bvsblobprodcus311.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • 37cvsblobprodcus359.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • 4vyvsblobprodcus361.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • 4zjvsblobprodcus390.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • 51yvsblobprodcus36.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • 7tjvsblobprodcus341.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • bcnvsblobprodcus378.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • d0svsblobprodcus381.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • frdvsblobprodcus327.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • josvsblobprodcus372.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • lylvsblobprodcus31.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • mfjvsblobprodcus373.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • ofvvsblobprodcus315.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • pc2vsblobprodcus360.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • pdfvsblobprodcus380.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • s8mvsblobprodcus38.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • u6ovsblobprodcus377.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • ukkvsblobprodcus352.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)
  • yttvsblobprodcus357.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build /home/REDACTED/work/mcp/mcp/tools/Azure.Mcp.Tools.AppLens/src/Azure.Mcp.Tools.AppLens.csproj (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@tmeschter tmeschter marked this pull request as ready for review May 6, 2026 19:22
@tmeschter tmeschter requested a review from msalaman as a code owner May 6, 2026 19:22
Copilot AI review requested due to automatic review settings May 6, 2026 19:22
@tmeschter tmeschter requested a review from a team as a code owner May 6, 2026 19:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes App Lens’ legacy kind-based restriction for microsoft.web/sites, making support decisions based solely on the ARM resource type to align with current backend capabilities.

Changes:

  • Simplified AppLensService.IsResourceTypeSupported to check only resourceType (case-insensitive) against SupportedResourceTypes().
  • Updated the App Lens resource filtering path to call the new IsResourceTypeSupported(resourceType) signature.
  • Updated unit tests to validate type-only behavior and case-insensitive matching.
Show a summary per file
File Description
tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs Removes kind gating from support checks and updates the filtering call site accordingly.
tools/Azure.Mcp.Tools.AppLens/tests/Azure.Mcp.Tools.AppLens.UnitTests/Resource/ResourceDiagnoseCommandTests.cs Updates unit tests to reflect the new type-only support logic.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs
Copy link
Copy Markdown
Contributor

@jongio jongio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean simplification - removes the legacy kind restriction so all microsoft.web/sites are accepted by type alone. Using SupportedResourceTypes() as the single source of truth is a solid pattern.

The existing bot comment about ResourceKind = "app" being hard-coded downstream is valid, but it's pre-existing (already on main before this PR). This change doesn't regress that behavior - it just allows more resource kinds to reach that code path. Worth a follow-up but shouldn't block this.

Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server May 20, 2026
@msalaman
Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 20, 2026

@copilot resolve the merge conflicts in this pull request

Done in ee990cf — I merged origin/main into this branch and resolved the PR merge conflicts.

Copilot AI requested a review from msalaman May 20, 2026 15:50
@tmeschter tmeschter requested a review from a team as a code owner May 20, 2026 15:57
@msalaman msalaman merged commit 566057f into main May 20, 2026
16 checks passed
@msalaman msalaman deleted the copilot/remove-kind-restriction-app-lens branch May 20, 2026 16:36
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server May 20, 2026
micha31r pushed a commit to micha31r/mcp that referenced this pull request May 21, 2026
…kinds (microsoft#2596)

* Initial plan

* Remove App Lens web site kind restriction

Agent-Logs-Url: https://github.com/microsoft/mcp/sessions/274dcc6a-c7ea-4e2d-a43e-6ed2c6e2f60f

Co-authored-by: tmeschter <10506730+tmeschter@users.noreply.github.com>

* Remove unnecessary discard in AppLens support check

Agent-Logs-Url: https://github.com/microsoft/mcp/sessions/274dcc6a-c7ea-4e2d-a43e-6ed2c6e2f60f

Co-authored-by: tmeschter <10506730+tmeschter@users.noreply.github.com>

* Simplify AppLens resource support check signature

Agent-Logs-Url: https://github.com/microsoft/mcp/sessions/274dcc6a-c7ea-4e2d-a43e-6ed2c6e2f60f

Co-authored-by: tmeschter <10506730+tmeschter@users.noreply.github.com>

* Simplify AppLens supported type check using shared list

Agent-Logs-Url: https://github.com/microsoft/mcp/sessions/06514e5e-b94e-43ef-8657-e8896f88653a

Co-authored-by: tmeschter <10506730+tmeschter@users.noreply.github.com>

* Add changelog entry

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tmeschter <10506730+tmeschter@users.noreply.github.com>
Co-authored-by: Tom Meschter (from Dev Box) <tomescht@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Remove microsoft.web/sites "kind" restriction in App Lens

5 participants