Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression : Timeout with azure identity #1710

Open
lipoteFR opened this issue Oct 18, 2024 · 2 comments
Open

Regression : Timeout with azure identity #1710

lipoteFR opened this issue Oct 18, 2024 · 2 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@lipoteFR
Copy link

lipoteFR commented Oct 18, 2024

My visualstudiocode was working like a charme
Once i get :
Image
and upgrade debugpy

then my python was still running in a "Run" mode but in debug i get a time-out

DEBUG:azure.identity._internal.decorators:AzureCliCredential.get_token failed: Failed to invoke the Azure CLI
  File "c:\Program Files\Python312\Lib\subprocess.py", line 1628, in _communicate
    raise TimeoutExpired(self.args, orig_timeout)
subprocess.TimeoutExpired: Command '['cmd', '/c', 'az account get-access-token --output json --resource https://database.windows.net]' timed out after 10 seconds

may be my professional laptop get restrictions and i should ask to have flow opened :(

My code is :

from azure.identity import AzureCliCredential, ChainedTokenCredential

az_cli = AzureCliCredential()
az_cred = ChainedTokenCredential( az_cli)
az_token = az_cred.get_token("https://database.windows.net/.default")
print(az_token)

The GetToken fails in timeout
i revert to 2024.10.0 and it is working again
Image

What could explain why it was working before and still working without debug mode ?

@karthiknadig
Copy link
Member

debugpy published a new version with support for python 3.13. The fixes for it might have had a side effect for this. Moving this to debugpy repo.

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python-debugger Oct 21, 2024
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Oct 21, 2024
@debonte
Copy link

debonte commented Oct 21, 2024

@lipoteFR, thanks for the issue. I'm unable to reproduce this. Your code runs to completion for me, both on the command line and in the debugger. I tried both Python 3.12.7 and 3.13.0. I'm using the latest azure-identity (version 1.19.0).

Not sure it's relevant, but what version of Python are you using?
 

then my python was still running in a "Run" mode but in debug i get a time-out

Are you using the same environment (same python version, same packages) in both of these cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants