Skip to content

Conversation

@jamesvoongms
Copy link
Member

@jamesvoongms jamesvoongms commented Nov 4, 2025


PR adds the new API version changes in 2025-10-01-preview seen in the spec PR here: Azure/azure-rest-api-specs#37724

Main change is just addition of one property (managedDomainLists) into DNS Security Rule

AAZ PR: Azure/aaz#890

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

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings November 4, 2025 01:16
@jamesvoongms jamesvoongms requested a review from necusjz as a code owner November 4, 2025 01:16
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Nov 4, 2025

⚠️Azure CLI Extensions Breaking Change Test
⚠️dns-resolver
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd dns-resolver forwarding-rule update cmd dns-resolver forwarding-rule update added parameter if_none_match
⚠️ 1006 - ParaAdd dns-resolver forwarding-ruleset update cmd dns-resolver forwarding-ruleset update added parameter if_none_match
⚠️ 1006 - ParaAdd dns-resolver inbound-endpoint update cmd dns-resolver inbound-endpoint update added parameter if_none_match
⚠️ 1006 - ParaAdd dns-resolver outbound-endpoint update cmd dns-resolver outbound-endpoint update added parameter if_none_match
⚠️ 1006 - ParaAdd dns-resolver policy dns-security-rule create cmd dns-resolver policy dns-security-rule create added parameter managed_domain_lists
⚠️ 1008 - ParaPropAdd dns-resolver policy dns-security-rule create cmd dns-resolver policy dns-security-rule create update parameter domain_lists: added property aaz_default=[]
⚠️ 1009 - ParaPropRemove dns-resolver policy dns-security-rule create cmd dns-resolver policy dns-security-rule create update parameter domain_lists: removed property required=True
⚠️ 1006 - ParaAdd dns-resolver policy dns-security-rule update cmd dns-resolver policy dns-security-rule update added parameter managed_domain_lists
⚠️ 1006 - ParaAdd dns-resolver update cmd dns-resolver update added parameter if_none_match
⚠️ 1006 - ParaAdd dns-resolver vnet-link update cmd dns-resolver vnet-link update added parameter if_none_match

@azure-client-tools-bot-prd
Copy link

Hi @jamesvoongms,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 4, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Azure DNS Resolver extension from API version 2025-05-01 to 2025-10-01-preview, adding support for managed domain lists in DNS security rules, which enables the use of Azure-managed threat intelligence domain lists.

  • Version bump from 1.1.0 to 1.2.0
  • API version upgrade from 2025-05-01 to 2025-10-01-preview across all operations
  • Addition of --managed-domain-lists parameter for DNS security rules
  • New test coverage for managed domain list functionality
  • Updated minimum CLI version requirement from 2.70.0 to 2.75.0

Reviewed Changes

Copilot reviewed 70 out of 79 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
setup.py Bumped version to 1.2.0
azext_metadata.json Updated minimum CLI version requirement
HISTORY.rst Added release notes for version 1.2.0
test_dns_resolver_policy_commands.py Added test for managed domain list DNS security rule CRUD operations
test_managed_domain_list_dns_security_rule_crud.yaml Recording for new managed domain list test
test_empty_dns_security_rule_crud.yaml Recording for empty domain list test case
aaz/latest/dns_resolver/policy/dns_security_rule/*.py Updated API version, added managed-domain-lists parameter, made domain-lists optional
aaz/latest/dns_resolver/**/*.py Updated API version to 2025-10-01-preview, changed LRO final-state-via to "location", standardized header parameter casing

self.kwargs.update({
'dns_security_rule_name': self.create_random_name('dnssr-', 16),
'dns_resolver_policy_name': self.create_random_name('dnsrp-', 20),
'dns_resolver_domain_list_name': self.create_random_name('dnsdl-', 20)
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

The variable dns_resolver_domain_list_name is created but never used in the test method test_managed_domain_list_dns_security_rule_crud. This unused variable should be removed to improve code maintainability and clarity.

Copilot uses AI. Check for mistakes.
@necusjz
Copy link
Member

necusjz commented Nov 4, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@necusjz
Copy link
Member

necusjz commented Nov 4, 2025

@jamesvoongms
Copy link
Member Author

@necusjz , I have redacted the secrets, could you help re-run azp?

:example: Upsert DNS security rule
az dns-resolver policy dns-security-rule create --resource-group sampleResourceGroup --policy-name sampleDnsResolverPolicy --dns-security-rule-name sampleDnsSecurityRule --location westus2 --tags "{key1:value1}" --priority 100 --action "{action-type:Block}" --domain-lists "[{id:/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList}]" --rule-state Enabled
:example: Upsert DNS security rule without domain list
Copy link
Member

Choose a reason for hiding this comment

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

Is this allowed by the API?

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed thanks!

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 4, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@necusjz necusjz merged commit 4ca91ef into Azure:main Nov 6, 2025
25 checks passed
@azclibot
Copy link
Collaborator

azclibot commented Nov 6, 2025

[Release] Update index.json for extension [ dns-resolver-1.2.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=142832333&view=results

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants