Change parameter key from 'version' to 'properties.version' - #34027
Open
Mohammed AB (moabuham) wants to merge 1 commit into
Open
Change parameter key from 'version' to 'properties.version'#34027Mohammed AB (moabuham) wants to merge 1 commit into
Mohammed AB (moabuham) wants to merge 1 commit into
Conversation
Passing yes to command will cause below error az mysql flexible-server upgrade --name meru8upto --resource-group lab --version 8.4 --yes (InvalidRequestContent) The request content was invalid and could not be deserialized: 'Could not find member 'version' on object of type 'ResourceDefinition'. Path 'version', line 1, position 16.'. Code: InvalidRequestContent Message: The request content was invalid and could not be deserialized: 'Could not find member 'version' on object of type 'ResourceDefinition'. Path 'version', line 1, position 16.'.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested a review
from Yong Zhang (yonzhan)
September 3, 2026 11:27
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The fix changes a critical request payload shape but lacks a non-live/unit test to prevent regressions since the existing upgrade scenario test is @live_only.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes the az mysql flexible-server upgrade request payload so the service can deserialize the requested version correctly, addressing the InvalidRequestContent error reported when running the command with --yes.
Changes:
- Update the upgrade PATCH payload to send
versionunderproperties(i.e.,properties.version) instead of at the request root.
File summaries
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/mysql/custom.py |
Adjusts the update payload structure for flexible-server major version upgrade requests to match the service contract. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
323
to
325
| parameters = { | ||
| 'version': version_mapped | ||
| 'properties': {'version': version_mapped} | ||
| } |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Collaborator
|
mysql |
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.
🤖 PR Validation — ️✔️ All clear
Passing yes to command will cause below error
az mysql flexible-server upgrade --name meru8upto --resource-group lab --version 8.4 --yes (InvalidRequestContent) The request content was invalid and could not be deserialized: 'Could not find member 'version' on object of type 'ResourceDefinition'. Path 'version', line 1, position 16.'. Code: InvalidRequestContent
Message: The request content was invalid and could not be deserialized: 'Could not find member 'version' on object of type 'ResourceDefinition'. Path 'version', line 1, position 16.'.
Related command
Description
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.