[MySQL] az mysql flexible-server upgrade: Fix deserialization problem - #34027
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
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.
| parameters = { | ||
| 'version': version_mapped | ||
| 'properties': {'version': version_mapped} | ||
| } |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
mysql |
|
Mohammed AB (@moabuham) please fix the ci. |
|
Fixed PR title |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 34027 in repo Azure/azure-cli |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Updated Title |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
I Can see another failure but it is not related to MySQL, no? |
Mohammed AB (@moabuham) could you please sync with the last |
az mysql flexible-server upgrade: Fix deserialization problem
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.'.
04bbd79 to
a0b5cc4
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
🤖 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.