-
Notifications
You must be signed in to change notification settings - Fork 338
Add Azure Function App support with list command #863
Conversation
…ion App management instructions
…pected function app list
…trings from bicep
There was a problem hiding this 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 introduces Azure Function App support to the Azure MCP server, adding a list command to enumerate function apps within a subscription. The implementation follows the established patterns used by other Azure services in the codebase.
Key changes:
- New Function App area with complete list functionality
- Integration tests and unit tests with proper test infrastructure
- Documentation updates including README and command reference
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
core/src/AzureMcp.Cli/Program.cs | Registers the new FunctionAppSetup area |
areas/functionApp/src/AzureMcp.FunctionApp/* | Complete Function App implementation with service, commands, models, and options |
areas/functionApp/tests/* | Comprehensive unit and live test coverage with Bicep test resources |
docs/azmcp-commands.md | Documentation for the new functionapp list command |
e2eTests/e2eTestPrompts.md | Test prompts for the new Function App functionality |
README.md | Updated service table to include Function App |
Directory.Packages.props | Added Azure.ResourceManager.AppService package |
AzureMcp.sln | Solution file updates for new projects |
.vscode/cspell.json | Spelling dictionary updates for Function App terms |
.github/CODEOWNERS | Code ownership for Function App area |
Comments suppressed due to low confidence (3)
areas/functionApp/src/AzureMcp.FunctionApp/Models/FunctionApp.cs:6
- The class name 'FunctionAppModel' is inconsistent with the file name 'FunctionApp.cs'. Either rename the file to 'FunctionAppModel.cs' or rename the class to 'FunctionApp'.
public class FunctionAppModel
areas/functionApp/tests/test-resources.bicep:138
- The API version '2018-01-01-preview' for roleDefinitions is outdated. Consider using a more recent stable version like '2022-04-01'.
resource websiteContributorRoleDefinition 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' existing = {
areas/functionApp/tests/test-resources.bicep:157
- The API version '2018-01-01-preview' for roleDefinitions is outdated. Consider using a more recent stable version like '2022-04-01'.
resource blobContributorRoleDefinition 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' existing = {
areas/functionApp/src/AzureMcp.FunctionApp/Services/FunctionAppService.cs
Outdated
Show resolved
Hide resolved
@microsoft-github-policy-service agree |
…ride ToolMetadata instead of using the attributes on ExecuteAsync.
/azp run azure - mcp |
Azure Pipelines successfully started running 1 pipeline(s). |
We had a CI system change late last week. Let me rerun and to make sure we're good. Thanks |
@jongio Looks like we will need another approver |
areas/functionapp/src/AzureMcp.FunctionApp/Options/List/FunctionAppListOptions.cs
Outdated
Show resolved
Hide resolved
areas/functionapp/src/AzureMcp.FunctionApp/Models/FunctionApp.cs
Outdated
Show resolved
Hide resolved
areas/functionapp/src/AzureMcp.FunctionApp/Options/FunctionAppOptionDefinitions.cs
Outdated
Show resolved
Hide resolved
…end SubscriptionOptions for the list options.
… FunctionAppListOptions to include necessary using directive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review @alzimmermsft. Made some updates based on your feedback.
areas/functionapp/src/AzureMcp.FunctionApp/Options/List/FunctionAppListOptions.cs
Outdated
Show resolved
Hide resolved
areas/functionapp/src/AzureMcp.FunctionApp/Options/FunctionAppOptionDefinitions.cs
Outdated
Show resolved
Hide resolved
areas/functionapp/src/AzureMcp.FunctionApp/Models/FunctionApp.cs
Outdated
Show resolved
Hide resolved
/azp run azure - mcp |
Azure Pipelines successfully started running 1 pipeline(s). |
Why did we call the new command group |
@joshfree Fair point. Looking at MS docs (example: https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview) they reference them as |
@joshfree Thinking about it more...maybe functionapp makes sense because the functionapp is the container for your functions. So functionapp is the parent level and therefore the root command group. |
* Add custom words for function app to cspell configuration * Scaffold and setup Function app with list command * Add test setup bicep * Add unit tests for list command * Add live tests * Add Azure Function App operations and test prompts * Add "azurewebsites" to cspell dictionary and update README with Function App management instructions * Fix formatting * Remove unnecessary comments * Update FunctionAppListCommandTests to include ResourceGroupName in expected function app list * Update codeowners * Add additional test prompt for azmcp-aks-functionapp-list in e2eTestPrompts.md * Fix typo for function app e2e tests * Add additional words to cspell configuration for content connection strings from bicep * Update FunctionAppListCommand to inherit BaseFunctionAppCommand. Override ToolMetadata instead of using the attributes on ExecuteAsync. * Update subscription parameter name. Update cacheKey to remove unnecessary cache key type. * Update changelog to include function app list command * Rename areas directory to `functionapp` * Remove duplicate * Fix casing in function app directory paths in solution file * Update .github/CODEOWNERS * Update .github/CODEOWNERS * Update .github/CODEOWNERS * Update .github/CODEOWNERS * Remove base function app options since they are not necessary and extend SubscriptionOptions for the list options. * Remove option definition as it's not necessary for the list command. * Update command group description to align with other areas. * Refactor BaseFunctionAppCommand to use SubscriptionOptions and update FunctionAppListOptions to include necessary using directive. * Update FunctionApp to be record and update references and unit tests. * Remove SubscriptionId from FunctionAppInfo and update related tests * Refactor FunctionAppInfo to include JsonPropertyName attributes for serialization * Update Azure.ResourceManager.AppService package version to 1.4.1 * Remove telemetry tag based on consolidation change in Azure#935 --------- Co-authored-by: Jon Gallant <[email protected]>
What does this PR do?
Sample run
GitHub issue number?
Pre-merge Checklist
CHANGELOG.md
for product changes (features, bug fixes, UI/UX, updated dependencies
).\eng\common\spelling\Invoke-Cspell.ps1
README.md
documentation/docs/azmcp-commands.md
/e2eTests/e2eTestPrompts.md
crypto mining, spam, data exfiltration, etc.
)/azp run azure - mcp
to run Live Test Pipeline