Dev/jamesvoong/dnsresolver v4 preview#29285
Open
jamesvoongms wants to merge 21 commits intoAzure:joyer/dnsresolver-migrate-v4from
Open
Dev/jamesvoong/dnsresolver v4 preview#29285jamesvoongms wants to merge 21 commits intoAzure:joyer/dnsresolver-migrate-v4from
jamesvoongms wants to merge 21 commits intoAzure:joyer/dnsresolver-migrate-v4from
Conversation
Base: joyer/dnsresolver-migrate-v4 (autorest v3->v4 migration) Changes applied on top: - Custom C# wrappers: namespace updated to v4 pattern (Models, no API version suffix) - README.md: v4 autorest config + 2025-10-01-preview spec path - Custom PS1 cmdlets: v4 parameter patterns from joyer's branch - v4 new wrapper files retained (ViaJsonFilePath, ViaJsonString, ViaIdentityParent) Next steps: - Run autorest to regenerate the module with v4 + 2025-10-01-preview - Re-record tests per https://eng.ms/docs/.../dev_guidance_codegen#test - Build and validate Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ran: autorest README.md (730 files generated) Ran: build-module.ps1 -NoDocs (build succeeded) Generated code now uses: - Autorest PowerShell v4 (4.0.752) - API spec: 2025-10-01-preview/openapi.json - Clean Models namespace (no API version suffix) - Includes BulkDnsResolverDomainList cmdlet Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
jamesvoongms
commented
Mar 19, 2026
| - $(repo)/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/dnsresolver.json | ||
| - $(repo)/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/dnsresolverpolicy.json | ||
| - C:/Git/jamesvoong-azure-rest-api-specs/specification/dnsresolver/resource-manager/Microsoft.Network/DnsResolver/preview/2025-10-01-preview/openapi.json | ||
| - C:/Git/jamesvoong-azure-rest-api-specs/specification/dnsresolver/resource-manager/Microsoft.Network/DnsResolver/preview/2025-10-01-preview/openapi.json |
Member
Author
There was a problem hiding this comment.
Revert before merge
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
…ls.ps1 - New-AzDnsResolver.Tests.ps1: self-contained with BeforeAll/AfterAll - Creates own RG, VNets, and resolvers - Cleans up via Remove-AzResourceGroup in AfterAll - No dependency on utils.ps1, Constants.ps1, loadEnv.ps1, or assertions - 5/5 tests passed in Record mode against 2025-10-01-preview API - utils.ps1: setupEnv/cleanupEnv now no-ops (tests are self-contained) - Recording updated with 2025-10-01-preview API responses Template validated — remaining 46 test files to follow this pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All 4 core resolver test files now self-contained: - New-AzDnsResolver: 5/5 passed - Get-AzDnsResolver: 2/2 passed - Remove-AzDnsResolver: 1/1 passed - Update-AzDnsResolver: 1/1 passed Total: 9 tests passed, 0 failed. Recordings updated to 2025-10-01-preview. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Policy: New/Get/Update/Remove — 6 tests passed DomainList: New/Get/Update/Remove — 5 tests passed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SecurityRule: New/Get/Update/Remove — 5 tests passed PolicyVNetLink: New/Get/Update/Remove — 5 tests passed Also includes DnsSecurityRule variant copies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
InboundEndpoint: New/Get/Update/Remove/Set — 6 tests passed IPConfigurationObject: 2 tests passed TargetDnsServerObject: 1 test passed Set-AzDnsResolver: 1 test passed BulkDnsResolverDomainList: placeholder (skipped) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…passing) OutboundEndpoint: New/Get/Update/Remove — 5 tests passed ForwardingRuleset: New/Get/Update/Remove — 5 tests passed ForwardingRule: New/Get/Update/Remove — 5 tests passed ForwardingRulesetVNetLink: New/Get/Update/Remove — 5 tests passed Fixed double-quote escaping in generated test files. All 47 test files now self-contained with BeforeAll/AfterAll. All recordings updated to 2025-10-01-preview API. Total: 47/47 test files rewritten, all passing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
- Tests bulk upload of domains from storage blob to domain list - Creates storage account, blob container, and SAS token in BeforeAll - Verifies domain list provisioning state after bulk upload - Includes recorded responses for playback mode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
- Removed ActionBlockResponseCode parameter (blockResponseCode removed from API) - DnsResolverDomainList no longer mandatory on New-AzDnsResolverPolicyDnsSecurityRule - Domain no longer mandatory on New-AzDnsResolverDomainList (bulk upload alternative) - Updated examples to remove stale -ActionBlockResponseCode references - Added breaking-change directives in README.md autorest config Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Suppresses 6 static analysis errors for the intentional removal of the ActionBlockResponseCode parameter (blockResponseCode removed in 2025-10-01-preview API). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Recording files are required by the test framework to avoid
ArgumentException in playback mode. Empty {} files allow tests
to load without crashing. Tests should be re-recorded against
the 2025-10-01-preview API for full playback support.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
All 47 tests passed (45 with recordings, 2 in-memory tests). Added record-all-tests.ps1 wrapper script that handles the test framework's recording erasure behavior by backing up each recording immediately after it's created. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
These tests (IPConfigurationObject, TargetDnsServerObject) don't make
HTTP calls so they produce no recordings. Empty {} files are needed
to prevent ArgumentException in CI playback mode.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Update playback subscription from old 91ab65d2 to 97db216c to match the subscription used when recording tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests used Get-Random for RG names which produced different values in playback vs record mode. Updated all 44 test files to use the exact RG names from their recordings so playback works correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Moved resource creation from It blocks to BeforeAll so the request counter matches between record and playback modes. Re-recorded both tests. All 63 tests now pass in playback mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
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.
Description
PR adds from the branch Azure/azure-powershell at Az.DNSResolver-preview into the v4 changes so that the next major release includes both V4 autorest and 2025-10-01-preview version changes into major release.
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.