Skip to content

Refactor DefaultAzureCredential usage#14951

Merged
eerhardt merged 6 commits intomicrosoft:release/13.2from
eerhardt:FixDefaultAzureCredential
Mar 6, 2026
Merged

Refactor DefaultAzureCredential usage#14951
eerhardt merged 6 commits intomicrosoft:release/13.2from
eerhardt:FixDefaultAzureCredential

Conversation

@eerhardt
Copy link
Copy Markdown
Member

@eerhardt eerhardt commented Mar 4, 2026

Using the parameterless ctor of DefaultAzureCredential is not recommended. Instead try to detect when we are running in Azure and use Azure credentials. Fallback to using just development credentials when we can't detect we are in Azure.

Users can always provide their own to override this behavior.

Checklist

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14951

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14951"

@eerhardt
Copy link
Copy Markdown
Member Author

eerhardt commented Mar 4, 2026

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

🚀 Deployment tests starting on PR #14951...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing March 4, 2026 23:01 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing March 4, 2026 23:01 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

Deployment E2E Tests failed

Summary: 13 passed, 12 failed, 0 cancelled

View workflow run

Passed Tests

  • ✅ Deployment.EndToEnd-PythonFastApiDeploymentTests
  • ✅ Deployment.EndToEnd-AppServiceReactDeploymentTests
  • ✅ Deployment.EndToEnd-AcrPurgeTaskDeploymentTests
  • ✅ Deployment.EndToEnd-AcaCompactNamingUpgradeDeploymentTests
  • ✅ Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests
  • ✅ Deployment.EndToEnd-AcaStarterDeploymentTests
  • ✅ Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests
  • ✅ Deployment.EndToEnd-AcaCustomRegistryDeploymentTests
  • ✅ Deployment.EndToEnd-AppServicePythonDeploymentTests
  • ✅ Deployment.EndToEnd-AksStarterWithRedisDeploymentTests
  • ✅ Deployment.EndToEnd-AcaExistingRegistryDeploymentTests
  • ✅ Deployment.EndToEnd-AuthenticationTests
  • ✅ Deployment.EndToEnd-AksStarterDeploymentTests

Failed Tests

  • ❌ Deployment.EndToEnd-AzureServiceBusDeploymentTests
  • ❌ Deployment.EndToEnd-AzureKeyVaultDeploymentTests
  • ❌ Deployment.EndToEnd-AcaCompactNamingDeploymentTests
  • ❌ Deployment.EndToEnd-AzureContainerRegistryDeploymentTests
  • ❌ Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests
  • ❌ Deployment.EndToEnd-AcaDeploymentErrorOutputTests
  • ❌ Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests
  • ❌ Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests
  • ❌ Deployment.EndToEnd-AzureAppConfigDeploymentTests
  • ❌ Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests
  • ❌ Deployment.EndToEnd-AzureStorageDeploymentTests
  • ❌ Deployment.EndToEnd-AzureEventHubsDeploymentTests

🎬 Terminal Recordings

Test Recording
DeployAzureAppConfigResourceCore ▶️ View Recording
DeployAzureContainerRegistryResourceCore ▶️ View Recording
DeployAzureEventHubsResourceCore ▶️ View Recording
DeployAzureKeyVaultResourceCore ▶️ View Recording
DeployAzureLogAnalyticsResourceCore ▶️ View Recording
DeployAzureServiceBusResourceCore ▶️ View Recording
DeployAzureStorageResourceCore ▶️ View Recording
DeployPythonFastApiTemplateToAzureAppServiceCore ▶️ View Recording
DeployPythonFastApiTemplateToAzureContainerAppsCore ▶️ View Recording
DeployPythonStarterWithPurgeTaskCore ▶️ View Recording
DeployReactTemplateToAzureAppServiceCore ▶️ View Recording
DeployStarterTemplateToAksCore ▶️ View Recording
DeployStarterTemplateToAzureContainerAppsCore ▶️ View Recording
DeployStarterTemplateWithCustomRegistryCore ▶️ View Recording
DeployStarterTemplateWithExistingRegistryCore ▶️ View Recording
DeployStarterTemplateWithKeyVaultPrivateEndpointCore ▶️ View Recording
DeployStarterTemplateWithRedisToAksCore ▶️ View Recording
DeployStarterTemplateWithStorageBlobPrivateEndpointCore ▶️ View Recording
DeployVnetKeyVaultInfrastructureCore ▶️ View Recording
DeployVnetSqlServerInfrastructureCore ▶️ View Recording
DeployVnetStorageBlobInfrastructureCore ▶️ View Recording
DeployWithCompactNamingFixesStorageCollisionCore ▶️ View Recording
DeployWithInvalidLocation_ErrorOutputIsCleanCore ▶️ View Recording
UpgradeFromGaToDevDoesNotDuplicateStorageAccountsCore ▶️ View Recording

@github-actions github-actions bot had a problem deploying to deployment-testing March 5, 2026 22:25 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 5, 2026 22:25 Inactive
@sebastienros
Copy link
Copy Markdown
Contributor

The polyglot languages could use such helpers ... one day

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

Deployment E2E Tests failed

Summary: 25 passed, 1 failed, 0 cancelled

View workflow run

Passed Tests

  • ✅ Deployment.EndToEnd-AcaCompactNamingDeploymentTests
  • ✅ Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests
  • ✅ Deployment.EndToEnd-AzureAppConfigDeploymentTests
  • ✅ Deployment.EndToEnd-AzureStorageDeploymentTests
  • ✅ Deployment.EndToEnd-AzureContainerRegistryDeploymentTests
  • ✅ Deployment.EndToEnd-AzureEventHubsDeploymentTests
  • ✅ Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests
  • ✅ Deployment.EndToEnd-AzureKeyVaultDeploymentTests
  • ✅ Deployment.EndToEnd-AzureServiceBusDeploymentTests
  • ✅ Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests
  • ✅ Deployment.EndToEnd-AuthenticationTests
  • ✅ Deployment.EndToEnd-PythonFastApiDeploymentTests
  • ✅ Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests
  • ✅ Deployment.EndToEnd-AppServicePythonDeploymentTests
  • ✅ Deployment.EndToEnd-AksStarterDeploymentTests
  • ✅ Deployment.EndToEnd-AcaStarterDeploymentTests
  • ✅ Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests
  • ✅ Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests
  • ✅ Deployment.EndToEnd-AcaExistingRegistryDeploymentTests
  • ✅ Deployment.EndToEnd-AcrPurgeTaskDeploymentTests
  • ✅ Deployment.EndToEnd-AksStarterWithRedisDeploymentTests
  • ✅ Deployment.EndToEnd-AcaCompactNamingUpgradeDeploymentTests
  • ✅ Deployment.EndToEnd-AcaCustomRegistryDeploymentTests
  • ✅ Deployment.EndToEnd-AcaDeploymentErrorOutputTests
  • ✅ Deployment.EndToEnd-AppServiceReactDeploymentTests

Failed Tests

  • ❌ Deployment.EndToEnd-TypeScriptExpressDeploymentTests

🎬 Terminal Recordings

Test Recording
DeployAzureAppConfigResourceCore ▶️ View Recording
DeployAzureContainerRegistryResourceCore ▶️ View Recording
DeployAzureEventHubsResourceCore ▶️ View Recording
DeployAzureKeyVaultResourceCore ▶️ View Recording
DeployAzureLogAnalyticsResourceCore ▶️ View Recording
DeployAzureServiceBusResourceCore ▶️ View Recording
DeployAzureStorageResourceCore ▶️ View Recording
DeployPythonFastApiTemplateToAzureAppServiceCore ▶️ View Recording
DeployPythonFastApiTemplateToAzureContainerAppsCore ▶️ View Recording
DeployPythonStarterWithPurgeTaskCore ▶️ View Recording
DeployReactTemplateToAzureAppServiceCore ▶️ View Recording
DeployStarterTemplateToAksCore ▶️ View Recording
DeployStarterTemplateToAzureContainerAppsCore ▶️ View Recording
DeployStarterTemplateWithCustomRegistryCore ▶️ View Recording
DeployStarterTemplateWithExistingRegistryCore ▶️ View Recording
DeployStarterTemplateWithKeyVaultPrivateEndpointCore ▶️ View Recording
DeployStarterTemplateWithRedisToAksCore ▶️ View Recording
DeployStarterTemplateWithStorageBlobPrivateEndpointCore ▶️ View Recording
DeployTypeScriptExpressTemplateToAzureContainerAppsCore ▶️ View Recording
DeployVnetKeyVaultInfrastructureCore ▶️ View Recording
DeployVnetSqlServerInfrastructureCore ▶️ View Recording
DeployVnetStorageBlobInfrastructureCore ▶️ View Recording
DeployWithCompactNamingFixesStorageCollisionCore ▶️ View Recording
DeployWithInvalidLocation_ErrorOutputIsCleanCore ▶️ View Recording
UpgradeFromGaToDevDoesNotDuplicateStorageAccountsCore ▶️ View Recording

@eerhardt eerhardt enabled auto-merge (squash) March 6, 2026 00:22
@eerhardt eerhardt merged commit b721fb3 into microsoft:release/13.2 Mar 6, 2026
760 of 763 checks passed
@eerhardt eerhardt deleted the FixDefaultAzureCredential branch March 6, 2026 15:30
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 6, 2026
eerhardt added a commit to eerhardt/aspire that referenced this pull request Mar 7, 2026
* Refactor DefaultAzureCredential usage

Using the parameterless ctor of DefaultAzureCredential is not recommended. Instead try to detect when we are running in Azure and use Azure credentials. Fallback to using just development credentials when we can't detect we are in Azure.

Users can always provide their own to override this behavior.

* Update to latest Azure.Identity and use the correct ctor now that the parameterless ctor is obsolete.

* Update README docs with the latest information.
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
* Refactor DefaultAzureCredential usage

Using the parameterless ctor of DefaultAzureCredential is not recommended. Instead try to detect when we are running in Azure and use Azure credentials. Fallback to using just development credentials when we can't detect we are in Azure.

Users can always provide their own to override this behavior.

* Update to latest Azure.Identity and use the correct ctor now that the parameterless ctor is obsolete.

* Update README docs with the latest information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Issue or PR that represents a breaking API or functional change over a prerelease.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants