Azure / Azure/azure-sdk-tools

New-TestResources fails on first few attempts

Open
#1,948 3 comments 0 reactions 0 assignees View on GitHub
EngSys
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

Most times when I run New-TestResources, I get these errors on the first couple attempts:
```
WARNING: Attempt 1 failed: Exception calling "Invoke" with "0" argument(s): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Your Azure credentials have not been set up or have expired, please run Connect-AzAccount to set up your Azure credentials.". Trying again in 10 seconds...
WARNING: Attempt 2 failed: Exception calling "Invoke" with "0" argument(s): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The identity of the calling application could not be established.". Trying again in 20 seconds...
```

It usually ends up succeeding, but it seems that we should be able to avoid hitting these errors initially.

Contributor guide

Open the contributing guide

Research direction

Start at the New-TestResources entry point and reproduce the first-attempt failures, noting the retry and authentication messages. Trace the setup and authentication path responsible for those attempts; done means the command succeeds without the initial credential or identity errors during normal runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.