Skip to content

[MySQL] Fix flexible-server firewall rule create payload - #33865

Open
Aditya Pujara (a0x1ab) with Copilot wants to merge 2 commits into
devfrom
copilot/release-2-89-0-fix-firewall-rule
Open

[MySQL] Fix flexible-server firewall rule create payload#33865
Aditya Pujara (a0x1ab) with Copilot wants to merge 2 commits into
devfrom
copilot/release-2-89-0-fix-firewall-rule

Conversation

Copilot AI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Related command

az mysql flexible-server firewall-rule create

Description

az mysql flexible-server firewall-rule create regressed by sending a flat request body for firewall rules, causing MySQL Flexible Server to return InternalServerError.

  • Payload serialization
    • Use the generated FirewallRule SDK model for create requests.
    • Restores the expected wire shape:
{
  "properties": {
    "startIpAddress": "203.0.113.10",
    "endIpAddress": "203.0.113.10"
  }
}
  • Regression coverage
    • Added focused coverage for the custom create path to assert the serialized request body shape.

Testing Guide

PYTHONPATH=src/azure-cli:src/azure-cli-core:src/azure-cli-telemetry:src/azure-cli-testsdk \
python -m unittest azure.cli.command_modules.mysql.tests.latest.test_mysql_custom

History Notes

[MySQL] az mysql flexible-server firewall-rule create: Fix firewall rule create request payload serialization.


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Copilot AI requested a review from a team as a code owner August 8, 2026 09:25
Copilot AI changed the title [WIP] Fix firewall rule creation in MySQL Flexible Server [MySQL] Fix flexible-server firewall rule create payload Aug 8, 2026
@azure-client-tools-agent

Copy link
Copy Markdown

Live test results — azdev test --live --series (changed test files only)

PASS

Selectors: test_mysql_custom (module)
PR head ref: copilot/release-2-89-0-fix-firewall-rule
PR head sha: 06e874cf979cfca0cf8d9da26b88463ad4739725
PR base ref: dev
New test files in PR: true

Changed test files run
src/azure-cli/azure/cli/command_modules/mysql/tests/latest/test_mysql_custom.py

New test files
src/azure-cli/azure/cli/command_modules/mysql/tests/latest/test_mysql_custom.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/31251167352

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13533: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[

test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_mysql_custom

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: xdist-3.8.0, forked-1.6.0
collecting ... collected 1 item

azure-cli/src/azure-cli/azure/cli/command_modules/mysql/tests/latest/test_mysql_custom.py::MysqlFlexibleServerFirewallRuleCustomTest::test_firewall_rule_create_uses_properties_payload PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 1 passed in 0.39s ===============================

Posted by agent-assist live-test workflow.

@yonzhan

Copy link
Copy Markdown
Collaborator

MySQL

@azure-client-tools-agent azure-client-tools-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Review Summary ✅

PR: [MySQL] Fix flexible-server firewall rule create payload
Linked issue: #33839

  • Live test: ✅ Passed (azdev test ... --live)
  • CI checks: ✅ All 90 checks passed, 0 failed, 0 pending

No issues found. This PR looks ready for human maintainer review/merge.


Posted by agent-assist (autonomous bug-fix pipeline).

@azure-client-tools-agent azure-client-tools-agent Bot added the azure-client-tools-agent Pull request commented on or reviewed by Azure Client Tools Agent label Aug 8, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-identity-squad.

@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-observability-squad.

@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-quality-productivity-squad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-identity-squad act-observability-squad act-quality-productivity-squad ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot azure-client-tools-agent Pull request commented on or reviewed by Azure Client Tools Agent Backup Network - CDN az cdn Network az network vnet/lb/nic/dns/etc...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release 2.89.0 breaks creating a firewall rule in a MySQL Flexible Server

6 participants