Skip to content

Conversation

@hemarina
Copy link

@hemarina hemarina commented Nov 7, 2025

fix #1048

  • deploy_iac_get
  • deploy_pipeline
  • deploy_architecture
  • deploy_plan_get
  • deploy_app_log_gets

What does this PR do?

azd is looking to host azd mcp and want to migrate azd related tool in C2C out of Azure MCP
Remove azd related content.
For deploy_app_log_gets, it was using azure.yaml file and azd env name to identify the resource and pull logs. Since we are removing azd env name, I requested users to provide resource group name to pull the logs.

GitHub issue number?

#1048

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@github-project-automation github-project-automation bot moved this to Untriaged in Azure MCP Server Nov 7, 2025
@joshfree joshfree moved this from Untriaged to In Progress in Azure MCP Server Nov 7, 2025
@joshfree joshfree added this to the 2025-11 milestone Nov 7, 2025
@joshfree joshfree added the tools-Azd Azure Developer CLI related label Nov 7, 2025
@hemarina hemarina changed the title migrate azd tool out of C2C Deploy WIP migrate azd tool out of C2C Deploy Nov 7, 2025
@hemarina hemarina changed the title WIP migrate azd tool out of C2C Deploy migrate azd tool out of C2C Deploy Nov 13, 2025
@hemarina hemarina marked this pull request as ready for review November 13, 2025 18:17
@hemarina hemarina requested a review from qianwens as a code owner November 13, 2025 18:17
Copilot AI review requested due to automatic review settings November 13, 2025 18:17
@hemarina hemarina requested review from a team as code owners November 13, 2025 18:17
@hemarina

This comment was marked as duplicate.

@azure-pipelines

This comment was marked as duplicate.

Copilot finished reviewing on behalf of hemarina November 13, 2025 18:22
Copy link
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 migrates the C2C Deploy functionality away from Azure Developer CLI (azd) dependency, standardizing on Azure CLI for all deployment operations. The changes remove azd-specific parameters, templates, and service logic while simplifying the implementation to use resource groups instead of azd environment names.

Key changes:

  • Removed azd-specific parameters (provisioning-tool, azd-iac-options, azd-env-name) from commands
  • Replaced azd environment discovery with direct resource group specification
  • Removed IaC-specific template generation logic (Bicep/Terraform rules)
  • Simplified infrastructure rules to only provide Azure CLI guidance
  • Updated file paths from .azure/ to docs/ for generated plans and diagrams

Reviewed Changes

Copilot reviewed 42 out of 44 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
LogsGetOptions.cs Replaced azd-env-name parameter with resource-group parameter
LogsGetCommand.cs Updated command to use resource groups instead of azd environments
DeployService.cs Changed method signature from GetAzdResourceLogsAsync to GetResourceLogsAsync
ResourceLogService.cs New service replacing AzdResourceLogService, uses resource groups for log retrieval
AppLogRetriever.cs Refactored to discover resources by resource group instead of azd tags
AzdResourceLogService.cs Removed entire azd-specific service
DeploymentPlanTemplateUtil.cs Simplified to remove azd/bicep/terraform options
IaCRulesTemplateUtil.cs Removed complex template generation logic
PipelineGenerationUtil.cs Removed azd pipeline configuration option
RulesGetCommand.cs Simplified to load static Azure CLI rules template
GetCommand.cs Removed provisioning-tool and azd-iac-options parameters
GuidanceGetCommand.cs Removed use-azd-pipeline-config parameter
DeployOptionDefinitions.cs Removed azd-related option definitions
Template files Removed azd-specific templates (azd-steps.md, azd-pipeline.md, bicep-rules.md, terraform-rules.md, azd-rules.md)
Test files Updated tests to remove azd parameters and add resource-group tests
Documentation files Updated command documentation, test prompts, and tool descriptions
CHANGELOG.md Added entry for this migration
Comments suppressed due to low confidence (2)

tools/Azure.Mcp.Tools.Deploy/src/Services/Util/AppLogRetriever.cs:81

  • This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.
    tools/Azure.Mcp.Tools.Deploy/src/Services/Util/AppLogRetriever.cs:103
  • These 'if' statements can be combined.

hemarina and others added 10 commits November 13, 2025 10:31
…ice.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…GetCommand.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hemarina

This comment was marked as duplicate.

@azure-pipelines

This comment was marked as duplicate.

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets ensure that we preserve any generic bicep guidance apart from specific azd usage.

Copy link
Author

@hemarina hemarina Nov 25, 2025

Choose a reason for hiding this comment

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

The base-iac-rules/bicep-rules/terraform-rules is only called if azd tool is using: https://github.com/microsoft/mcp/blob/main/tools/Azure.Mcp.Tools.Deploy/src/Services/Util/IaCRulesTemplateUtil.cs#L26-#L46. I think we should remove it.

Copy link
Contributor

@qianwens qianwens left a comment

Choose a reason for hiding this comment

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

There are lots of changes that not about azd. I also don't understand why this PR removed the azd support in the entire c2c deploy flow. c2c help user create a e2e deploy plan and we are maintaining the IaC rules for azure services. Could you please help schedule a meeting with our team including yungez, xiaofanzhou to discuss how should c2c leverage azd tools for deployment that using azd?

| deploy_app_logs_get | Show me the log of the application deployed by azd |
| deploy_app_logs_get | Show me the log of the application in resource group <resource-group-name> |
| deploy_architecture_diagram_generate | Generate the azure architecture diagram for this application |
| deploy_iac_rules_get | Show me the rules to generate bicep scripts |
Copy link
Contributor

Choose a reason for hiding this comment

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

IaC rules is not just designed for AZD, other deployment tool like az also support bicep.

Copy link
Author

@hemarina hemarina Nov 26, 2025

Choose a reason for hiding this comment

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

Thanks for clarification. I'll update them.

@yungezz
Copy link

yungezz commented Nov 26, 2025

hi @hemarina , @joshfree could you pls hold on this PR which changes a lot of codetocloud? It seems not aligning with what we discussed last time, re-connecting with the team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools-Azd Azure Developer CLI related

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Migrate azd related tool out of azure mcp

5 participants