[network] Fix --ttl option missing from az network private-dns record-set * add-record commands#33277
[network] Fix --ttl option missing from az network private-dns record-set * add-record commands#33277Copilot wants to merge 2 commits into
--ttl option missing from az network private-dns record-set * add-record commands#33277Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| network private-dns record-set a add-record | cmd network private-dns record-set a add-record added parameter ttl |
||
| network private-dns record-set aaaa add-record | cmd network private-dns record-set aaaa add-record added parameter ttl |
||
| network private-dns record-set cname set-record | cmd network private-dns record-set cname set-record added parameter ttl |
||
| network private-dns record-set mx add-record | cmd network private-dns record-set mx add-record added parameter ttl |
||
| network private-dns record-set ptr add-record | cmd network private-dns record-set ptr add-record added parameter ttl |
||
| network private-dns record-set srv add-record | cmd network private-dns record-set srv add-record added parameter ttl |
||
| network private-dns record-set txt add-record | cmd network private-dns record-set txt add-record added parameter ttl |
Agent-Logs-Url: https://github.com/Azure/azure-cli/sessions/f9bd77f1-0ba1-4045-bb05-35cf5d60411a Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
--ttl option missing from az network private-dns record-set * add-record commands
|
@copilot I am still seeing errors. Are you sure the changes are correct? |
The changes in this PR are correct — the fix hasn't been released yet, so if you're running azure-cli 2.85.0 you'll still see the error. To verify the fix locally, install directly from this branch: pip install -e "git+https://github.com/Azure/azure-cli.git@copilot/fix-ttl-option-private-dns#egg=azure-cli&subdirectory=src/azure-cli"Or clone the repo and run All 22 unit tests (including the new Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Closing this PR. It was generated by an earlier version of our automated bug-fix pipeline whose live-test step ran whole-module tests, which produced mis-targeted and environmental failures unrelated to the change. The pipeline now runs only the test files touched by the PR. This issue will be re-worked from scratch by the updated pipeline. |
Related command
az network private-dns record-set {a,aaaa,cname,mx,ptr,srv,txt} add-recordaz network private-dns record-set cname set-recordDescription
--ttlwas silently absent from allprivate-dns record-set * add-recordsubcommands, causingunrecognized arguments: --ttl 600at runtime despite the option being documented and supported on the equivalent public DNS commands._params.py: Register--ttlargument in theadd-recordcontext for all record types (a,aaaa,cname,mx,ptr,srv,txt) and forcname set-recordcustom.py: Addttl=Noneto_privatedns_add_save_record()and alladd_privatedns_*_record()functions; when provided, TTL overrides the existing value (consistent with public DNS module behavior)Testing Guide
New playback test
test_add_record_with_ttlvalidates that the TTL value is correctly propagated in the API request and reflected in the response.History Notes
[network]
az network private-dns record-set {a,aaaa,cname,mx,ptr,srv,txt} add-record: Add--ttloption to set record set TTL (time-to-live) when adding recordsThis 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.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
azcliprod.blob.core.windows.net/usr/bin/python python -m pytest src/azure-cli/azure/cli/command_modules/privatedns/tests/latest/test_privatedns_commands.py::PrivateDnsRecordSetsTests::test_add_record_when_record_set_is_empty -x --tb=short -q(dns block)If you need me to access, download, or install something from one of these locations, you can either: