Skip to content

[Network] Fix #27579: az network dns zone export: Fix export of empty TXT record sets - #34088

Open
Aditya Pujara (a0x1ab) wants to merge 18 commits into
Azure:devfrom
a0x1ab:agent-assist/azure-azure-cli-issue-27579-5acb833b4854
Open

Aditya Pujara (a0x1ab) wants to merge 18 commits into
Azure:devfrom
a0x1ab:agent-assist/azure-azure-cli-issue-27579-5acb833b4854

Conversation

@a0x1ab

@a0x1ab Aditya Pujara (a0x1ab) commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Related command

az network dns zone export

Description

Fixes #27579.

Correct DNS zone export so empty TXT record sets serialize without indexing a nonexistent value.

Expected behavior: exporting a zone containing an empty TXT record set must not crash, while retaining valid TXT data and the existing zone-file conventions. Both console output and optional file output should work.

Testing Guide

  • Run az network dns zone export --resource-group <resource-group> --name <dns-zone> --file-name zone.txt.
  • Focused regression coverage: src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py.
  • Repository CI and the authorized live-test workflow validate the published revision.

History Notes

[Network] az network dns zone export: Fix export of empty TXT record sets


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

…f empty TXT record sets

AI-generated by X Engineering Agent via Azure AI Foundry.
Foundry-Job: 5acb833b4854a53d4787b397556ad96a6e6708ffb41eabf63a5392f72a400c69
@x-engineering-agent x-engineering-agent Bot added the Request X Engineering Agent Request X Engineering Agent testing and review label Sep 16, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Auto-Assign Auto assign by bot label Sep 16, 2026
@x-engineering-agent
x-engineering-agent Bot marked this pull request as ready for review September 16, 2026 05:10
@x-engineering-agent
x-engineering-agent Bot requested a review from a team as a code owner September 16, 2026 05:10
Copilot AI lite review requested due to automatic review settings September 16, 2026 05:10
@yonzhan

Copy link
Copy Markdown
Collaborator

Network

@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.

🟢 Approval recommended

The reviewed changes are fully covered and no blocking issues were identified.

Pull request overview

Fixes az network dns zone export for empty TXT record sets and preserves them during import.

Changes:

  • Emits TXT "" for empty TXT record sets.
  • Preserves empty TXT values during parsing.
  • Adds export, import, and round-trip regression tests.
File summaries
File Changes
src/azure-cli/azure/cli/command_modules/network/zone_file/parse_zone_file.py Preserves empty TXT fragments.
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py Adds TXT export/import regression coverage.
src/azure-cli/azure/cli/command_modules/network/custom.py Emits empty TXT values during export.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@a0x1ab

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@x-engineering-agent

Copy link
Copy Markdown
Contributor

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

❌ FAIL (exit 1)

Selectors: test_dns_commands (module)
PR head ref: agent-assist/azure-azure-cli-issue-27579-5acb833b4854
PR head sha: e50e67811bc39eeab2e24be93e618cf6d62472ea
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py

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

Live-test recordings: 1 regenerated — archived in workflow artifact live-test-pr-34088 (recordings/).

ℹ️ This PR is from a fork, so recordings were not pushed automatically. Download them from the artifact and commit to your branch.

Recording files
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_zone10_import.yaml
Last 80 lines of azdev output

    def _handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ResourceNotFoundError during execution and fails the command.

azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.network.tests.latest.test_dns_commands.DnsZoneImportTest testMethod=test_dns_zone10_import>
resource_group = 'cli_dns_zone10_importey2lsvzhiczpca66h4t7cobagtqhsrf4tp7zjdfawfvdbzom4bjoty'

    @ResourceGroupPreparer(name_prefix='cli_dns_zone10_import')
    def test_dns_zone10_import(self, resource_group):
>       self._test_zone('dnstestzone10.com', 'zone10.txt')

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py:142: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py:61: in _test_zone
    self.cmd('network dns zone import -n {zone} -g {rg} --file-name "{export}"')
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in __init__
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
.venv/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:677: in execute
    raise ex
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:820: in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:789: in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:335: in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli/azure/cli/command_modules/network/custom.py:2832: in import_zone
    root_soa = DNSRecordSetSOAShow(cli_ctx=cmd.cli_ctx)(command_args={
azure-cli/src/azure-cli-core/azure/cli/core/aaz/_command.py:154: in __call__
    return self._handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/dns/record_set/_show.py:27: in _handler
    self._execute_operations()
azure-cli/src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/dns/record_set/_show.py:67: in _execute_operations
    self.RecordSetsGet(ctx=self.ctx)()
azure-cli/src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/dns/record_set/_show.py:91: in __call__
    return self.on_error(session.http_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <azure.cli.command_modules.network.aaz.latest.network.dns.record_set._show.Show.RecordSetsGet object at 0x7f5125662f00>
response = <RequestsTransportResponse: 404 Not Found, Content-Type: application/json; charset=utf-8>

    def on_error(self, response):
        """ handle errors in response
        """
        # raise common http errors
        error_type = self.error_map.get(response.status_code)
        if error_type:
>           raise error_type(response=response)
E           azure.core.exceptions.ResourceNotFoundError: (ParentResourceNotFound) Failed to perform 'read' on resource(s) of type 'dnszones/SOA', because the parent resource '/subscriptions/f758ac53-3e63-4317-a956-0997793808d7/resourceGroups/cli_dns_zone10_importey2lsvzhiczpca66h4t7cobagtqhsrf4tp7zjdfawfvdbzom4bjoty/providers/Microsoft.Network/dnszones/dnstestzone10.com' could not be found.
E           Code: ParentResourceNotFound
E           Message: Failed to perform 'read' on resource(s) of type 'dnszones/SOA', because the parent resource '/subscriptions/f758ac53-3e63-4317-a956-0997793808d7/resourceGroups/cli_dns_zone10_importey2lsvzhiczpca66h4t7cobagtqhsrf4tp7zjdfawfvdbzom4bjoty/providers/Microsoft.Network/dnszones/dnstestzone10.com' could not be found.

azure-cli/src/azure-cli-core/azure/cli/core/aaz/_operation.py:324: ResourceNotFoundError
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
=================== 1 failed, 1 passed, 1 skipped in 45.81s ====================

Posted by the Azure Client Tools Agent live-test workflow.

@x-engineering-agent x-engineering-agent Bot 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.

Aditya Pujara (@a0x1ab)

Reviewed e50e67811bc39eeab2e24be93e618cf6d62472ea from the managed a0x1ab/azure-cli fork and agent-assist/azure-azure-cli-issue-27579-5acb833b4854 branch. The live-test gate failed; this is not an all-green validation.

The bounded release-artifact, test-strength, scope-consistency, and domain-edge-case questions produced no additional confirmed semantic defect. The empty-TXT export branch supplies the missing txt field, and the TXT-specific parser change preserves quoted empty strings without changing NAPTR handling. The six added deterministic tests assert output, request mappings, round trips, empty/missing/null collections, multi-value and 255-character boundaries, and malformed-record exception propagation.

Upstream CI

All 53 completed upstream checks passed and matched current head e50e67811bc39eeab2e24be93e618cf6d62472ea in the completed one-shot gate. They do not override the separate live-test failure.

Test validation

  • Live test: Failed with conclusion failure. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.

Task-level evidence: Job azdev test --live (PR 34088), step 12, Run azdev test (live, series) — changed test files only, ran src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneImportTest::test_dns_zone10_import. Its log reports 1 failed, 1 passed, 1 skipped in 45.81s and stopping after 1 failures. Step 12 captures the test exit status; step 18, Set workflow conclusion, then reports azdev tests failed (exit 1). and fails the workflow.

The failing operation is the second import after deleting the zone, reaching the SOA lookup. The diagnostic is azure.core.exceptions.ResourceNotFoundError: (ParentResourceNotFound) and Failed to perform 'read' on resource(s) of type 'dnszones/SOA'; the response is 404 Not Found. The first import reports 7/7 RECORDS IMPORTED SUCCESSFULLY.

Relevance: not PR-related to the TXT change. The path-based failure helper marks the test relevant because its file changed, but the actual src/azure-cli/azure/cli/command_modules/network/tests/latest/zone_files/zone10.txt and captured export contain only SOA, NS, DS, and TLSA records: neither new TXT branch applies. The failing delete/re-create/SOA-read path is unchanged. The logs establish the missing-parent failure, not its underlying service/lifecycle cause; they do not prove a DNS propagation race or a regression introduced by this PR.

Coverage details: src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py adds DnsZoneExportTest; the coverage helper reports no changed-file coverage gap. No recording changes are required merely for these mocked deterministic tests. The existing scenario recording src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_zone10_import.yaml is unchanged. This live run stopped after the third of 38 collected items and provides no execution evidence for the new empty-TXT unit class or the remaining scenarios.

Required follow-up and focused verification: Investigate the existing DnsZoneImportTest._test_zone delete/re-create lifecycle and the zone-create/SOA-read responses before changing behavior. Reproduce the failure independently of TXT changes; fix only a confirmed lifecycle/readiness cause, without masking the 404, skipping the scenario, or changing unrelated TXT handling on speculation. If the scenario changes, refresh its recording after a successful authorized live run. Verify the six DnsZoneExportTest unit tests, then have the authorized tester rerun DnsZoneImportTest::test_dns_zone10_import live and the focused test_dns_commands.py selection. No test or rerun was started during this review. The agent-review iteration state is 0/3, so this feedback is eligible for one durable Foundry follow-up rather than an exhausted-cap handoff.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@x-engineering-agent x-engineering-agent Bot added the X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent label Sep 16, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

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

@a0x1ab

Copy link
Copy Markdown
Member Author

@Azure/x-engineering-agent The remediation execution for the current agent review was canceled by the agent deployment before model work began. Retry the existing live-test remediation against the unchanged current head without expanding its scope.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Automated processing requires maintainer follow-up for this request.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

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

❌ FAIL (exit 1)

Selectors: test_dns_commands (module)
PR head ref: agent-assist/azure-azure-cli-issue-27579-5acb833b4854
PR head sha: 8190326d657a44c9973386c61b0594bdfebf16ec
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py

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

Live-test recordings: 2 regenerated — archived in workflow artifact live-test-pr-34088 (recordings/).

⚠️ The recording was not committed because the live test failed. Fix the test failure before publishing its regenerated cassette.

Recording files
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_zone10_import.yaml
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_zone11_import.yaml
Last 80 lines of azdev output

    def _handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ResourceNotFoundError during execution and fails the command.

azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.network.tests.latest.test_dns_commands.DnsZoneImportTest testMethod=test_dns_zone11_import>
resource_group = 'cli_dns_zone11_importzl3ktjen37uesxoridlspd6eiwper2ortm2awx6wn2ahpzvkck3g5a'

    @ResourceGroupPreparer(name_prefix='cli_dns_zone11_import')
    def test_dns_zone11_import(self, resource_group):
>       self._test_zone('dnstestzone11.com', 'zone11.txt')

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py:61: in _test_zone
    self.cmd('network dns zone import -n {zone} -g {rg} --file-name "{export}"')
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in __init__
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
.venv/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:677: in execute
    raise ex
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:820: in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:789: in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:335: in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli/azure/cli/command_modules/network/custom.py:2832: in import_zone
    root_soa = DNSRecordSetSOAShow(cli_ctx=cmd.cli_ctx)(command_args={
azure-cli/src/azure-cli-core/azure/cli/core/aaz/_command.py:154: in __call__
    return self._handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/dns/record_set/_show.py:27: in _handler
    self._execute_operations()
azure-cli/src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/dns/record_set/_show.py:67: in _execute_operations
    self.RecordSetsGet(ctx=self.ctx)()
azure-cli/src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/dns/record_set/_show.py:91: in __call__
    return self.on_error(session.http_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <azure.cli.command_modules.network.aaz.latest.network.dns.record_set._show.Show.RecordSetsGet object at 0x7fbb61ee3710>
response = <RequestsTransportResponse: 404 Not Found, Content-Type: application/json; charset=utf-8>

    def on_error(self, response):
        """ handle errors in response
        """
        # raise common http errors
        error_type = self.error_map.get(response.status_code)
        if error_type:
>           raise error_type(response=response)
E           azure.core.exceptions.ResourceNotFoundError: (ParentResourceNotFound) Failed to perform 'read' on resource(s) of type 'dnszones/SOA', because the parent resource '/subscriptions/f758ac53-3e63-4317-a956-0997793808d7/resourceGroups/cli_dns_zone11_importzl3ktjen37uesxoridlspd6eiwper2ortm2awx6wn2ahpzvkck3g5a/providers/Microsoft.Network/dnszones/dnstestzone11.com' could not be found.
E           Code: ParentResourceNotFound
E           Message: Failed to perform 'read' on resource(s) of type 'dnszones/SOA', because the parent resource '/subscriptions/f758ac53-3e63-4317-a956-0997793808d7/resourceGroups/cli_dns_zone11_importzl3ktjen37uesxoridlspd6eiwper2ortm2awx6wn2ahpzvkck3g5a/providers/Microsoft.Network/dnszones/dnstestzone11.com' could not be found.

azure-cli/src/azure-cli-core/azure/cli/core/aaz/_operation.py:324: ResourceNotFoundError
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
============== 1 failed, 2 passed, 1 skipped in 75.69s (0:01:15) ===============

Posted by the X Engineering Agent live-test workflow.

@x-engineering-agent x-engineering-agent Bot 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.

Aditya Pujara (@a0x1ab)

Live validation requires follow-up

Upstream CI passed, but live validation failed. This is not an all-green result; the observed failure does not exercise the changed TXT behavior.

Summary

  • Reviewed head: 8190326d657a44c9973386c61b0594bdfebf16ec.
  • Upstream CI: 50/50 completed checks passed, with no pending or failed checks in the supplied snapshot.
  • Remaining failure groups by relevance to this diff: 0 PR-related, 1 not PR-related, 0 uncertain. These counts classify relevance, not whether the underlying service/lifecycle cause is fully established.
  • Static inspection found no evidence-confirmed semantic defect in the empty-TXT changes. The existing non-TXT scenario and its lifecycle helpers are unchanged from base 10f0350504f3911fd0955b1111093673efc136cb.

Test validation

  • Live test: Failed with conclusion failure. Workflow run

  • Regression coverage: Present for network: 1 focused test file(s) changed.

  • Executed coverage is incomplete: the task collected 38 tests, then stopped after one failure: 1 failed, 2 passed, 1 skipped. None of the six new DnsZoneExportTest methods ran in this live attempt. The failed wrapper conclusion is not an additional test failure.

  • Recording attention: no recording file changed. The new tests mock service commands and exercise serialization, import arguments, empty/null/missing TXT collections, multiple values, round-trips and malformed input; they do not establish a live service round-trip. Because public TXT output/import behavior changes, the Network owner should review recording risk and require a focused re-recording plus playback if service integration evidence is needed.

  • Single failing live task — Not PR-related to the TXT diff: Run azdev test, step 12, followed by exit-code propagation, step 19. The failure is DnsZoneImportTest::test_dns_zone11_import. Its unchanged zone_files/zone11.txt fixture contains SOA, NS and NAPTR, no TXT.

    • Smallest relevant task-log excerpts (capability diagnostic and terminal exception are distinct):
<<<UNTRUSTED:live-test-task-log>>>
(BadRequest) The feature NAPTR is not available.
Code: ParentResourceNotFound
Failed to perform 'read' on resource(s) of type 'dnszones/SOA'
1 failed, 2 passed, 1 skipped in 75.69s (0:01:15)
<<<END:live-test-task-log>>>
  • Capability evidence: initial import logs the NAPTR service rejection, imports 5/7 records and exports SOA/NS. The existing importer catches that record-creation error; NAPTR unavailability is not the terminal exception.
  • Terminal traceback: the unchanged import/export/delete/reimport helper, line 61 fails during its second import at import_zone's SOA read, line 2832, because the parent zone cannot be found.
  • The additions only affect empty TXT export and TXT-token preservation; neither applies to this fixture or its SOA/NS export. The NAPTR rejection is a service-capability issue, not a TXT defect. The fatal missing-parent cause remains unproven: these logs do not distinguish service consistency from pre-existing lifecycle behavior, or establish that NAPTR caused the 404.

Bounded next action and focused verification

  • Keep the empty-TXT scope intact. Do not add a speculative NAPTR/lifecycle fix, disable the existing scenario, weaken assertions, or change unrelated modules to make this run green.
  • Foundry follow-up: verify the new deterministic export regression class separately and assess only evidence-backed remediation relevant to this PR. If the remaining failure is environmental or pre-existing, leave product source unchanged and return the precise blocker rather than inventing a source fix.
  • In the configured repository test environment, run python -m pytest src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest -q separately so fail-fast in the earlier scenario cannot hide its result.
  • Network/live-test owners: confirm NAPTR availability in the validation environment, reproduce DnsZoneImportTest::test_dns_zone11_import at the base and reviewed head, and capture delete/create/SOA-read diagnostics if the parent-resource 404 persists. Escalate the capability/lifecycle evidence to the service or test-infrastructure owner as appropriate; do not assume an unawaited deletion.
  • After that prerequisite is resolved, the authorized test owner should rerun the existing changed-file validation (azdev test test_dns_commands --live --series --discover). Verify the focused export class and the named import scenario; if recordings are updated, verify their playback without --live before publication. This review did not dispatch or rerun tests.

Automated follow-up

The agent_review cycle is below its cap (1/3 before this request). This COMMENT requests one bounded durable Foundry follow-up, not approval or a new live-test dispatch. It does not repeat the already-handled human-feedback request.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Automated processing requires maintainer follow-up for this request.

@x-engineering-agent x-engineering-agent Bot 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.

Aditya Pujara (@a0x1ab)

Focused review: unrelated DNS validation failure

Nonblocking review: no source change is requested for the observed failure. Live validation remains incomplete.

Summary

  • Reviewed head: 8190326d657a44c9973386c61b0594bdfebf16ec.
  • Failed test cases: 0 PR-related, 1 not PR-related, 0 uncertain, in one workflow group.
  • Upstream CI: 50/50 passed in the supplied snapshot; the separate live-test workflow failed.
  • All seven repository review skills were considered; no deterministic or confirmed changed-line semantic finding was identified.

Test validation

  • Live test: Failed with conclusion failure. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.
  • Out-of-scope live-test failures:
    • src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneImportTest::test_dns_zone11_import — Not PR-related: this existing SOA/NS/NAPTR-only scenario hit unavailable NAPTR and then a missing SOA parent during delete/reimport. Neither changed TXT-only branch is exercised by its fixture or captured export.
  • Execution gap: 38 tests were collected, but fail-fast stopped after four results (1 failed, 2 passed, 1 skipped), leaving 34 unexecuted. The six new DnsZoneExportTest methods were not reached. Playback verification and recording publication were skipped; this run is not evidence that the new tests passed.
  • Exact added tests: in src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest: test_export_empty_txt_collections, test_export_valid_txt_values, test_parse_empty_txt_fragments_and_naptr_regexp, test_export_mixed_records_and_import_supported_types, test_export_import_and_reexport_txt, and test_export_malformed_nonempty_txt_is_not_masked. They cover console/file output, missing/null/empty collections, valid/multiple/chunked values, mixed/alias records, mocked import arguments, re-export and malformed-value exceptions.
  • Output/request/recording risk: empty TXT sets now export as IN TXT ""; the parser preserves empty TXT values rather than converting them to the NAPTR EMPTY marker, affecting the TXT values sent on re-import. No transport, API-version or response-schema change is present. No recordings changed. The new tests mock service calls, so they do not verify live service acceptance. The failing scenario's existing cassette is src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_zone11_import.yaml; it is unchanged and has no verified replacement from this run. Do not rewrite that cassette or change NAPTR/SOA code to hide this unrelated failure.

Focused validation and escalation

  • In a prepared Azure CLI development environment, run python -m unittest azure.cli.command_modules.network.tests.latest.test_dns_commands.DnsZoneExportTest independently so the existing scenario cannot mask these regressions.
  • The live-test runner/Network DNS owners should rerun the existing workflow with NAPTR available, or run the focused TXT tests separately. If the SOA parent lookup still fails after zone recreation, escalate this job's diagnostics to those owners as a separate service/lifecycle investigation; do not broaden this PR.
  • After restoring the live-test prerequisite, validate azdev test test_dns_commands --live --series, then azdev test test_dns_commands --series for playback. This review has not dispatched a rerun or executed local tests.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

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

✅ PASS

Selectors: network.DnsZoneExportTest (module)
PR head ref: agent-assist/azure-azure-cli-issue-27579-5acb833b4854
PR head sha: a647bdfee61d2765c9b30aa06c40f782b6a1f526
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py

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

Last 80 lines of azdev output

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


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

Test on modules: network.DnsZoneExportTest

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, 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: forked-1.7.5, xdist-3.8.0
collecting ... collected 6 items

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_empty_txt_collections PASSED [ 16%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_import_and_reexport_txt PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_malformed_nonempty_txt_is_not_masked PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_mixed_records_and_import_supported_types PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_valid_txt_values PASSED [ 83%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_parse_empty_txt_fragments_and_naptr_regexp PASSED [100%]

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

Posted by the X Engineering Agent live-test workflow.

@a0x1ab Aditya Pujara (a0x1ab) left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Aditya Pujara (@a0x1ab)

DNS TXT export review

Reviewed head a647bdfee61d2765c9b30aa06c40f782b6a1f526. No deterministic policy violations or confirmed semantic findings in the current changes.

Reviewed scope

Paths are under src/azure-cli/azure/cli/command_modules/network/:

  • custom.py:2708-2709: absent, null and empty TXT collections export as TXT "".
  • zone_file/parse_zone_file.py:311-313: empty TXT fragments remain empty instead of becoming NAPTR's EMPTY sentinel.
  • tests/latest/test_dns_commands.py::DnsZoneExportTest: meaningful exact-output and command-argument assertions cover console/file output, TTL/names, multiple and long TXT values, literal EMPTY, NAPTR separation, aliases, malformed-record errors and import/re-export mappings.

Upstream CI

The supplied head-bound snapshot reports 50/50 checks passed. No outstanding human change request was found at posting. No tests were executed locally for this review.

Test validation

  • Live test: Passed. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.
  • Recording attention: No recordings changed. Export's service-list request is unchanged, but TXT zone-file output and subsequent empty-TXT import payloads change (value: [""], not ["EMPTY"]). The added unit tests mock service boundaries; they do not establish recording completeness. Network owners should check the DnsZoneImportTest import/export scenarios and refresh affected fixtures if the changed empty-TXT payload appears there.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@x-engineering-agent x-engineering-agent Bot 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.

Aditya Pujara (@a0x1ab)

Review

No actionable findings at a647bdfee61d2765c9b30aa06c40f782b6a1f526. Empty TXT record sets now export as TXT "", and TXT parsing preserves empty strings without changing NAPTR empty-field handling. The focused regression cases assert console/file output, import/re-export mappings, mixed record types and aliases, and propagation of malformed nonempty-record errors.

Upstream CI

The current-head snapshot has 50 completed passing checks, with no failed, pending, or canceled validation checks.

Test validation

  • Live test: Passed. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@x-engineering-agent x-engineering-agent Bot added the Request X Engineering Agent Request X Engineering Agent testing and review label Sep 21, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

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

@a0x1ab Aditya Pujara (a0x1ab) added X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent and removed Request X Engineering Agent Request X Engineering Agent testing and review X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent labels Sep 22, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

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

@x-engineering-agent

Copy link
Copy Markdown
Contributor

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

✅ PASS

Selectors: network.DnsZoneExportTest (module)
PR head ref: agent-assist/azure-azure-cli-issue-27579-5acb833b4854
PR head sha: 178ee4f93ed804b966343e8291458a7dd60bc7fe
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py

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

Last 80 lines of azdev output

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


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

Test on modules: network.DnsZoneExportTest

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, 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: forked-1.7.5, xdist-3.8.0
collecting ... collected 6 items

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_empty_txt_collections PASSED [ 16%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_import_and_reexport_txt PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_malformed_nonempty_txt_is_not_masked PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_mixed_records_and_import_supported_types PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_valid_txt_values PASSED [ 83%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_parse_empty_txt_fragments_and_naptr_regexp PASSED [100%]

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

Posted by the X Engineering Agent live-test workflow.

@x-engineering-agent x-engineering-agent Bot 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.

Aditya Pujara (@a0x1ab)

Review

No blocking findings in the changed code at 178ee4f93ed804b966343e8291458a7dd60bc7fe.

network/custom.py:2708-2709 supplies an empty TXT payload for missing, null or empty record collections, so zone export emits TXT "" rather than failing. network/zone_file/parse_zone_file.py:311-313 preserves empty TXT strings without applying NAPTR's EMPTY sentinel. The existing non-TXT and alias export paths are unchanged; the title and History Notes describe the customer-visible fix.

The new DnsZoneExportTest cases in network/tests/latest/test_dns_commands.py assert console/file output, one-shot record iteration, zero TTL, empty and literal EMPTY values, multiple/long TXT values, mixed records and aliases, import/re-export request mappings, and propagation of malformed nonempty TXT data. This covers both serialization and the affected import boundary, not just an isolated mapping.

Upstream CI

All 50 reported checks completed successfully for the reviewed head; no failed, pending or canceled validation remains.

Test validation

  • Live test: Passed. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@yonzhan

Copy link
Copy Markdown
Collaborator

Network

@x-engineering-agent

Copy link
Copy Markdown
Contributor

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

✅ PASS

Selectors: network.DnsZoneExportTest (module)
PR head ref: agent-assist/azure-azure-cli-issue-27579-5acb833b4854
PR head sha: 16faaed6d5a394696a70e96d2da632adac1897bc
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py

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

Last 80 lines of azdev output

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


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

Test on modules: network.DnsZoneExportTest

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, 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: forked-1.7.5, xdist-3.8.0
collecting ... collected 6 items

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_empty_txt_collections PASSED [ 16%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_import_and_reexport_txt PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_malformed_nonempty_txt_is_not_masked PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_mixed_records_and_import_supported_types PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_valid_txt_values PASSED [ 83%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_parse_empty_txt_fragments_and_naptr_regexp PASSED [100%]

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

Posted by the X Engineering Agent live-test workflow.

@x-engineering-agent x-engineering-agent Bot 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.

Aditya Pujara (@a0x1ab)

Non-blocking review

No source change is requested. No confirmed source defect was found; the supplied CI failures are unrelated infrastructure timeouts, not source-change blockers.

Source review

Reviewed all three changed files at 16faaed6d5a394696a70e96d2da632adac1897bc, including the bounded review targets and their export/parser/import context. No deterministic policy finding or evidence-confirmed semantic defect was found.

Review skill Result
Release artifact validator The [Network] title and History Notes describe the empty-TXT export fix; no generated HISTORY.rst is edited.
Generated code ownership checker Not applicable: changes are in handwritten network behavior and module tests, not generated output or shared test infrastructure.
Command and help convention checker Not applicable: no command registration, parameter, help, or example changes.
Test semantic-strength reviewer Six new unit tests contain concrete output, parser-result, command-argument, round-trip, and exception assertions; coverage details below.
No-silent-user-intent reviewer No new accepted input is introduced. Existing resource-group, zone, TTL, TXT data, and optional file-output paths remain connected to their uses.
Scope-consistency reviewer The export fix, companion empty-TXT parser preservation, and focused tests stay within network DNS scope; no API-version, endpoint, pipeline, or dependency changes.
Domain edge-case reviewer Reviewed missing/null/empty collections, empty versus literal EMPTY, inherited/apex names, TTL zero, mixed/multiple TXT records, long values, and isolation from NAPTR empty-regexp handling.

At src/azure-cli/azure/cli/command_modules/network/custom.py:2708-2709, the empty collection branch supplies the TXT field needed by the existing serializer. At src/azure-cli/azure/cli/command_modules/network/zone_file/parse_zone_file.py:311-313, TXT-specific empty-token preservation prevents the NAPTR EMPTY sentinel from becoming TXT data. The nonempty export mapping and non-TXT parser paths are unchanged.

Upstream CI

Snapshot: 50 completed checks; 47 passed, 1 failed aggregate build, 2 cancelled, and 0 pending. Failure groups: 0 PR-related, 1 Not PR-related (two timeout children), 0 uncertain. The cancelled children are not cancelled validation gates.

Azure.azure-cli

  • Result: failure
  • Failure details:
    • Unit Test for Core Python312 (Not PR-related)
      • Evidence: The job running on agent pool-ubuntu-2204 44 ran longer than the maximum time of 10 minutes. For more information, see https://go.microsoft.com/fwlink/?linkid=2077134
      • Next action: Re-run the timed-out job. If it times out again at the same setup or checkout step, escalate to the pipeline owner instead of changing unrelated PR source.
      • Verify: Re-run Unit Test for Core Python312 and confirm the job completes within its limit.
    • Unit Test for Core Python314 (Not PR-related)
      • Evidence: The job running on agent pool-ubuntu-2204 45 ran longer than the maximum time of 10 minutes. For more information, see https://go.microsoft.com/fwlink/?linkid=2077134
      • Next action: Re-run the timed-out job. If it times out again at the same setup or checkout step, escalate to the pipeline owner instead of changing unrelated PR source.
      • Verify: Re-run Unit Test for Core Python314 and confirm the job completes within its limit.

The changed scope is network DNS export/parser behavior and its tests, not CLI core tests or pipeline configuration. The quoted diagnostics report agent-job duration limits rather than a failing source assertion, supporting the Not PR-related classification. Re-run the two named jobs; if the same timeout recurs, escalate to the pipeline owner rather than modifying unrelated PR source.

Test validation

  • Live test: Passed. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.
  • Focused regression inspection: src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py:934-1128 covers missing/null/empty TXTRecords, explicit empty strings, console/file parity, apex and TTL zero, ordinary/multiple/mixed/long TXT values, NAPTR isolation, supported non-TXT/alias records, import/re-export argument equality, and malformed nonempty input retaining its exception. The AAZ calls are mocked; these are deterministic unit assertions, not evidence of every service interaction.
  • Recording limitation — non-blocking human attention: No recording files changed. src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_zone1_import.yaml contains nonempty TXT PUT/GET values; src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_zone11_import.yaml contains no TXT fields. These inspected recordings do not demonstrate the newly preserved empty-TXT import value. The new unit round-trip asserts txt_records=[{'value': ['']}]; the REST schema and API version are unchanged. The successful workflow does not by itself close this specific recorded-service evidence gap.
  • Focused recording follow-up: For recorded assurance of the empty/mixed TXT round-trip, the network owning squad can extend src/azure-cli/azure/cli/command_modules/network/tests/latest/zone_files/zone1.txt, exercise DnsZoneImportTest.test_dns_zone1_import in src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py, and re-record src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_zone1_import.yaml through the existing authorized focused live-test flow. Replay that scenario and verify empty TXTRecords[].value values in the PUT/GET and subsequent export, alongside the new unit tests' console/file assertions. This is an integration-evidence follow-up, not a confirmed source defect or a source-fix request.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

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

✅ PASS

Selectors: network.DnsZoneExportTest (module)
PR head ref: agent-assist/azure-azure-cli-issue-27579-5acb833b4854
PR head sha: b1d43a2426386be1abe52cadfd403b0fd29b0833
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py

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

Last 80 lines of azdev output

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


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

Test on modules: network.DnsZoneExportTest

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, 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: forked-1.7.5, xdist-3.8.0
collecting ... collected 6 items

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_empty_txt_collections PASSED [ 16%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_import_and_reexport_txt PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_malformed_nonempty_txt_is_not_masked PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_mixed_records_and_import_supported_types PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_valid_txt_values PASSED [ 83%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_parse_empty_txt_fragments_and_naptr_regexp PASSED [100%]

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

Posted by the X Engineering Agent live-test workflow.

@x-engineering-agent x-engineering-agent Bot 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.

Aditya Pujara (@a0x1ab)

Review: automated validation passed

Reviewed b1d43a2426386be1abe52cadfd403b0fd29b0833. The supplied snapshot has 50/50 upstream CI checks passed and no blocking human reviews. The seven-skill review found no confirmed findings or deterministic regression-coverage gap.

Source tracing and DnsZoneExportTest in src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py cover missing/null/empty and multiple TXT values, console/file output, import/re-export mappings, literal EMPTY, long values, NAPTR isolation, and malformed-data propagation. No local tests were run.

Test validation

  • Live test: Passed. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.

Recording scope: No recordings changed. The added regressions exercise the real exporter/parser/writer with mocked Azure command boundaries. Owning-squad review should confirm DNS import/export recordings remain representative of corrected empty-TXT output and import payloads; this is not new service-side recording evidence.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

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

✅ PASS

Selectors: network.DnsZoneExportTest (module)
PR head ref: agent-assist/azure-azure-cli-issue-27579-5acb833b4854
PR head sha: 30f10848ec04ab6691bcf96e94ba0aced8614c19
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py

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

Last 80 lines of azdev output

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


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

Test on modules: network.DnsZoneExportTest

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, 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: forked-1.7.5, xdist-3.8.0
collecting ... collected 6 items

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_empty_txt_collections PASSED [ 16%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_import_and_reexport_txt PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_malformed_nonempty_txt_is_not_masked PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_mixed_records_and_import_supported_types PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_valid_txt_values PASSED [ 83%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_parse_empty_txt_fragments_and_naptr_regexp PASSED [100%]

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

Posted by the X Engineering Agent live-test workflow.

@x-engineering-agent x-engineering-agent Bot 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.

Aditya Pujara (@a0x1ab)

Review

No blocking findings in the changed code at 30f10848ec04ab6691bcf96e94ba0aced8614c19.

The empty-TXT fallback in network/custom.py:2692-2710 retains the record name and TTL and exports an empty quoted TXT value. The TXT-specific normalization in network/zone_file/parse_zone_file.py:311-315 preserves that empty value during import instead of turning it into the NAPTR EMPTY sentinel. Literal TXT EMPTY values and NAPTR empty-regexp handling remain distinct.

DnsZoneExportTest in network/tests/latest/test_dns_commands.py covers missing/null/empty collections, zero TTL, stdout/file output, multiple and long TXT values, empty fragments, NAPTR compatibility, mixed record types and aliases, exact import request arguments, export/import/re-export, and propagation of malformed nonempty-record errors. The title and History Notes describe the customer-visible fix; no generated history files were edited.

Upstream CI

50 checks passed for the reviewed head, with no failed or pending checks.

Test validation

  • Live test: Passed. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

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

✅ PASS

Selectors: network.DnsZoneExportTest (module)
PR head ref: agent-assist/azure-azure-cli-issue-27579-5acb833b4854
PR head sha: 9644457a0e141b2ca6bf5c8eae2743a32d12daaa
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py

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

Last 80 lines of azdev output

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


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

Test on modules: network.DnsZoneExportTest

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, 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: forked-1.7.5, xdist-3.8.0
collecting ... collected 6 items

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_empty_txt_collections PASSED [ 16%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_import_and_reexport_txt PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_malformed_nonempty_txt_is_not_masked PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_mixed_records_and_import_supported_types PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_valid_txt_values PASSED [ 83%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_parse_empty_txt_fragments_and_naptr_regexp PASSED [100%]

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

Posted by the X Engineering Agent live-test workflow.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

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

✅ PASS

Selectors: network.DnsZoneExportTest (module)
PR head ref: agent-assist/azure-azure-cli-issue-27579-5acb833b4854
PR head sha: 08eda9020e0bd5f68fae3656d18166cc071c172e
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py

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

Last 80 lines of azdev output

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


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

Test on modules: network.DnsZoneExportTest

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, 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: forked-1.7.5, xdist-3.8.0
collecting ... collected 6 items

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_empty_txt_collections PASSED [ 16%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_import_and_reexport_txt PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_malformed_nonempty_txt_is_not_masked PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_mixed_records_and_import_supported_types PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_export_valid_txt_values PASSED [ 83%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py::DnsZoneExportTest::test_parse_empty_txt_fragments_and_naptr_regexp PASSED [100%]

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

Posted by the X Engineering Agent live-test workflow.

@x-engineering-agent x-engineering-agent Bot 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.

Aditya Pujara (@a0x1ab)

Review

No actionable code or repository-policy findings were confirmed at head 08eda9020e0bd5f68fae3656d18166cc071c172e.

The empty-record fallback in network/custom.py:2708-2709 supplies the TXT field required by zone-file generation. In network/zone_file/parse_zone_file.py:311-314, matching the TXT record grammar preserves quoted empty values before serialization without changing NAPTR's existing EMPTY handling. The change remains within DNS zone export/import behavior; the title and History Notes describe the customer-visible fix, and no generated source or history artifact was edited.

Upstream CI

The current-head snapshot has 50 passed checks, zero failed checks, and zero pending checks.

Test validation

  • Live test: Passed. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.

Regression evidence and recording consideration

DnsZoneExportTest in src/azure-cli/azure/cli/command_modules/network/tests/latest/test_dns_commands.py checks missing/null/empty TXT collections, console and file output, zero TTL, multiple and long TXT values, literal EMPTY, mixed record types and aliases, exact import arguments, export/import/re-export, NAPTR compatibility, and propagation of malformed nonempty data.

No recording files changed. The new round-trip assertions use production-shaped AAZ data with mocked service calls: they establish the local output and import mapping, not a newly recorded service-side round trip. The network owner should confirm the empty-TXT export/import scenario and its recording expectations before merge; this changes zone-file content and imported TXT values, not an API version or request schema.

Risk assessment

45/100 · Medium · High confidence

The Medium rating is driven by security-sensitive behavior, public CLI behavior.

  • Change scope: 3 changed files, 309 changed lines (+309 / -0), including 2 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

This branch has not been deployed

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

Labels

act-quality-productivity-squad Auto-Assign Auto assign by bot Network az network vnet/lb/nic/dns/etc... X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure DNS zone export failing

4 participants