-
Notifications
You must be signed in to change notification settings - Fork 423
Handle rate limiting, add runtime config and live tests for Functions toolset #2071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
manvkaur
wants to merge
6
commits into
main
Choose a base branch
from
manvkaur/updateruntimeconfig
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cc8d380
Refactor Functions toolset: CDN manifest, rate limiting, and live tests
manvkaur d432e9d
Add changelog entry for Functions toolset improvements
manvkaur b0730a9
Address Copilot code review feedback for Functions toolset
manvkaur 385a4e0
Mark cache-dependent Functions tests as LiveTestOnly
manvkaur b92953a
Address PR review feedback for Functions toolset
manvkaur 196bca4
Remove HttpClientHelper - factory already sets User-Agent
manvkaur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
servers/Azure.Mcp.Server/changelog-entries/1773697825677.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| changes: | ||
| - section: "Other Changes" | ||
| description: "Handle GitHub API rate limiting, add runtime configuration, and live tests for Azure Functions toolset" |
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
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
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
31 changes: 0 additions & 31 deletions
31
tools/Azure.Mcp.Tools.Functions/src/Models/GitHubContentEntry.cs
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
tools/Azure.Mcp.Tools.Functions/src/Models/GitHubTreeItem.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Azure.Mcp.Tools.Functions.Models; | ||
|
|
||
| /// <summary> | ||
| /// Individual item in GitHub Tree API response. | ||
| /// </summary> | ||
| public sealed class GitHubTreeItem | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets the path of the item relative to the repository root. | ||
| /// </summary> | ||
| public string? Path { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the file mode (e.g., "100644" for regular file). | ||
| /// </summary> | ||
| public string? Mode { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the type of item: "blob" for files, "tree" for directories. | ||
| /// </summary> | ||
| public string? Type { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the SHA of the item. | ||
| /// </summary> | ||
| public string? Sha { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the size of the file in bytes (only for blobs). | ||
| /// </summary> | ||
| public long Size { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the API URL for this item. | ||
| /// </summary> | ||
| public string? Url { get; set; } | ||
| } |
31 changes: 31 additions & 0 deletions
31
tools/Azure.Mcp.Tools.Functions/src/Models/GitHubTreeResponse.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Azure.Mcp.Tools.Functions.Models; | ||
|
|
||
| /// <summary> | ||
| /// GitHub Tree API response model. | ||
| /// </summary> | ||
| public sealed class GitHubTreeResponse | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets the SHA of the tree. | ||
| /// </summary> | ||
| public string? Sha { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the URL of the tree. | ||
| /// </summary> | ||
| public string? Url { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the list of items in the tree. | ||
| /// </summary> | ||
| public List<GitHubTreeItem> Tree { get; set; } = []; | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets whether the tree was truncated due to size. | ||
| /// When true, the tree response is incomplete and some files may be missing. | ||
| /// </summary> | ||
| public bool Truncated { get; set; } | ||
| } |
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
17 changes: 0 additions & 17 deletions
17
tools/Azure.Mcp.Tools.Functions/src/Models/LanguageInfo.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,76 +1,59 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace Azure.Mcp.Tools.Functions.Models; | ||
|
|
||
| /// <summary> | ||
| /// Represents detailed information about a supported Azure Functions language. | ||
| /// </summary> | ||
| public sealed class LanguageInfo | ||
| { | ||
| [JsonPropertyName("name")] | ||
| public required string Name { get; init; } | ||
|
|
||
| [JsonPropertyName("runtime")] | ||
| public required string Runtime { get; init; } | ||
|
|
||
| [JsonPropertyName("programmingModel")] | ||
| public required string ProgrammingModel { get; init; } | ||
|
|
||
| [JsonPropertyName("prerequisites")] | ||
| public required IReadOnlyList<string> Prerequisites { get; init; } | ||
|
|
||
| [JsonPropertyName("developmentTools")] | ||
| public required IReadOnlyList<string> DevelopmentTools { get; init; } | ||
|
|
||
| [JsonPropertyName("initCommand")] | ||
| public required string InitCommand { get; init; } | ||
|
|
||
| [JsonPropertyName("runCommand")] | ||
| public required string RunCommand { get; init; } | ||
|
|
||
| [JsonPropertyName("buildCommand")] | ||
| public string? BuildCommand { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Project-level files that initialize a new Azure Functions project for this language. | ||
| /// </summary> | ||
| [JsonPropertyName("projectFiles")] | ||
| public required IReadOnlyList<string> ProjectFiles { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Supported runtime versions for this language. | ||
| /// </summary> | ||
| [JsonPropertyName("runtimeVersions")] | ||
| public required RuntimeVersionInfo RuntimeVersions { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Step-by-step setup instructions for this language. | ||
| /// </summary> | ||
| [JsonPropertyName("initInstructions")] | ||
| public required string InitInstructions { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Description of the project directory structure for this language. | ||
| /// </summary> | ||
| [JsonPropertyName("projectStructure")] | ||
| public required IReadOnlyList<string> ProjectStructure { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Template parameters for placeholder replacement (e.g., {{javaVersion}}). | ||
| /// Null if this language has no configurable placeholders. | ||
| /// </summary> | ||
| [JsonPropertyName("templateParameters")] | ||
| public IReadOnlyList<TemplateParameter>? TemplateParameters { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Notes about why this language is recommended for its runtime. | ||
| /// For example, "Recommended for Node.js runtime for type safety and better tooling." | ||
| /// Null if not a recommended choice. | ||
| /// </summary> | ||
| [JsonPropertyName("recommendationNotes")] | ||
| [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||
| public string? RecommendationNotes { get; init; } | ||
| } | ||
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.