Repository navigation
az find fails with NameResolutionError when app.aladdin.microsoft.com returns NXDOMAIN #33691
Description
Activity
- addedbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
on Jul 1, 2026 - addedcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.Computeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshot
on Jul 1, 2026 - addedAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-group
on Jul 1, 2026 Bug Analysis
az find(thefindmodule, e.g.src/azure-cli/azure/cli/command_modules/find/)
calls out to the aladdin service (app.aladdin.microsoft.com) to fetch usage
examples. When DNS resolution for that host fails (NXDOMAIN, e.g. due to
network restrictions or the endpoint being unreachable), the underlying
requests/urllib3call raises an unhandled
requests.exceptions.ConnectionErrorwrapping a
urllib3.exceptions.NameResolutionError, which propagates all the way up and
crashes the CLI with a raw Python traceback instead of a clean CLI error.Fix guidance:
- Locate the HTTP call to the aladdin endpoint in the
findmodule (likely in
_gather_examples/_call_aladdin_serviceor similarly named helper in
src/azure-cli/azure/cli/command_modules/find/custom.pyor_help_files.py). - Wrap the outbound request in a
try/exceptthat catches
requests.exceptions.RequestException(which coversConnectionError,
Timeout, etc., including DNS resolution failures) and raises a
CLIError/CLIInternalError(or logs a friendly warning and returns
gracefully) instead of letting the raw exception bubble up. - Add/adjust unit tests under
src/azure-cli/azure/cli/command_modules/find/tests/to simulate a
connection failure (e.g. mockrequests.post/requests.getto raise
requests.exceptions.ConnectionError) and assertaz findreports a clean,
user-friendly error instead of raising an unhandled traceback. - Repro:
az find vmwhenapp.aladdin.microsoft.comis unreachable/NXDOMAIN
(CLI 2.87.0, macOS, Python 3.13, per the issue).
Use this EXACT PR title:
[Find] Fix #33691:az find vm: handle NameResolutionError gracefully in az findPR title & description format (required)
This repo enforces a PR format (guide). Please author the PR exactly as follows or CI's Check the Format of Pull Request Title and Content will fail.
Use this EXACT PR title (copy verbatim, do not reword):
[Find] Fix #33691: `az find vm`: handle NameResolutionError gracefully in az findKeep the backticks around the command and the
Fix #33691:prefix. You may only adjust the wording after the command (the final summary) if the fix changes; the[Find]prefix, issue link, and backticked command must stay.Description — follow the PR template and fill in:
- Link the issue — start the Description with a closing keyword so the PR auto-links and closes it:
Fixes #33691. - Related command — the
az ...command this affects. - Description (mandatory) — why the bug happens, what you changed, and the resulting behavior.
- Testing Guide — example command(s) showing the fix works.
- History Notes — leave the title to drive the history note, or add extra lines in the same format (component in brackets + the command in backticks), e.g.
[Find] `az <command>`: <note>. - Keep the template checklist and tick the items you've satisfied.
Posted by agent-assist (autonomous bug-fix pipeline).
- Locate the HTTP call to the aladdin endpoint in the
- linked a pull request that will close this issue[Find] Fix Azure/azure-cli#33691: `az find vm`: handle NameResolutionError gracefully in az find #33692
on Jul 1, 2026 - added a commit that references this issue
on Jul 1, 2026 - removedquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
on Jul 1, 2026 az find
microsoft-github-policy-service commented
on Jul 7, 2026 ContributorMore actions🔔 Routing this issue to @Azure/act-quality-productivity-squad.
Describe the bug
Running the
az findcommand results in an unhandled exception. Instead of returning command examples or a user-friendly error message, the CLI exits with a Python traceback after failing to resolveapp.aladdin.microsoft.com.Authentication and other Azure resource management commands continue to work normally, indicating the issue is isolated to
az find.Related command
Errors
Issue script & Debug output
az find vm --debug
Expected behavior
az findshould return example Azure CLI commands. If the backend service is unavailable or the endpoint cannot be reached, the command should fail gracefully with a clear error message instead of an unhandled Python traceback.Environment Summary
The following commands work successfully:
Additional context
Running the following command:
returns:
This suggests the issue is isolated to the endpoint used by
az find. If the endpoint has been retired or changed, the CLI may need to use an updated endpoint or handle the failure more gracefully.