Skip to content

aspire deploy: az login check times out after ~10 seconds with no way to override #15872

@DamianEdwards

Description

@DamianEdwards

Description

When running aspire deploy targeting Azure Container Apps, the CLI performs an az account show check to verify the user is logged in. This check has a hard timeout of approximately 10 seconds that cannot be overridden.

On some machines, az account show can take 20-40 seconds due to factors outside the user's control (e.g., Windows Defender real-time scanning of Python's import chain, network latency to Azure AD for token refresh, etc.). When this happens, the Aspire CLI fails with a timeout error before az has a chance to respond.

Expected behavior

  • The timeout for the az login check should be configurable (e.g., via a CLI flag or environment variable)
  • Or the default timeout should be more generous (e.g., 60 seconds)
  • Or the check should be skippable with a flag like --skip-login-check

Environment

  • Aspire SDK: 13.2.1
  • OS: Windows 11
  • az CLI: 2.84.0 (Python 3.13.11)
  • Target: Azure Container Apps (addAzureContainerAppEnvironment)

Repro

  1. Have a machine where az account show takes >10 seconds (common with large Python import chains + real-time AV scanning)
  2. Run aspire deploy targeting ACA
  3. The deploy fails with a timeout before az responds

Workaround

None known. Restarting the machine sometimes helps by clearing the AV scan cache, but the issue recurs.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions