Fix My SQL Tools Issues.#2677
Draft
g2vinay wants to merge 3 commits into
Draft
Conversation
- MY-02/04: Add subscription-wide ListServersInSubscriptionAsync; make --resource-group optional on 'azmcp mysql list', falling back to enumerating all servers across the subscription when omitted - MY-03: Split MaxResultLimit into MaxRowCount and MaxQueryLengthChars so each limit can be tuned independently - MY-06: Replace plain Exception with KeyNotFoundException for resource-group and parameter not-found cases so callers receive the correct HTTP 404 status code - MY-07: Extract ValidateQuerySafety's inline compiled Regex to a private static readonly field (AOT-safe, compiled once) - MY-08: Remove --user from ARM-only commands (ServerConfigGet, ServerParamGet, ServerParamSet, list without server); --user is now required only on data-plane commands (DatabaseQuery, TableSchemaGet) and optional on 'list' when --server is supplied - MY-10: Seal MySqlService per project convention - MY-11: Change MySqlListCommandResult and TableSchemaGetCommandResult from public to internal Tests: update existing tests to match new signatures; add new tests for subscription-wide listing, resource-group-not-found KeyNotFoundException, ListServersInSubscriptionAsync error path, and --user validation
…isting
Replace the resource-group-iteration approach in ListServersInSubscriptionAsync
with the direct subscription-level ARM extension method, which maps to a single
REST call (GET /subscriptions/{id}/providers/Microsoft.DBforMySQL/flexibleServers)
instead of N+1 calls.
| - section: "Bugs Fixed" | ||
| description: | | ||
| Fixed several issues in the MySQL toolset: | ||
| - `azmcp mysql list` no longer crashes when `--resource-group` is omitted. It now lists all MySQL servers across the subscription using a single ARM API call, matching the behavior of the PostgreSQL toolset. |
Contributor
There was a problem hiding this comment.
Suggested change
| - `azmcp mysql list` no longer crashes when `--resource-group` is omitted. It now lists all MySQL servers across the subscription using a single ARM API call, matching the behavior of the PostgreSQL toolset. | |
| - `azmcp mysql list` now works when `--resource-group` is omitted. It now lists all MySQL servers across the subscription using a single ARM API call, matching the behavior of the PostgreSQL toolset. |
Let's use friendlier terminology 😄
Contributor
There was a problem hiding this comment.
This class doesn't do anything now, just delete it.
| if (tableCount >= MaxRowCount) | ||
| { | ||
| tables.Add($"... (output limited to {MaxResultLimit:N0} tables for security and performance reasons)"); | ||
| tables.Add($"... (output limited to {MaxRowCount:N0} tables for security and performance reasons)"); |
Contributor
There was a problem hiding this comment.
Seems this should be returning a list of string for the tables and truncation information. This could errantly be interpreted as a table name
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.
No description provided.