Skip to content

Publishing emits errant provisioning message #8905

@eerhardt

Description

@eerhardt

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When publishing my app using Azure I'm seeing an information message that doesn't make sense:

Building...
info: Aspire.Hosting.Azure.Provisioning.TokenCredentialHolder[0]
      Using DefaultAzureCredential for provisioning. This may not work in all environments. See https://aka.ms/azsdk/net/identity/credential-chains#defaultazurecredential-overview for more information.
info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 9.3.0-preview.1.25217.3+f892277b67752e594973ce2fef07dcea6dbff90b

I'm not provisioning at this point. I'm just generating the bicep. It shouldn't be talking about using provisioning at all.

Expected Behavior

I shouldn't get logs talking about provisioning when publishing.

Steps To Reproduce

Publish the playground app and you can see it:

D:\git\aspire\playground\publishers\Publishers.AppHost
❯ dotnet run --publisher azure
Using launch settings from D:\git\aspire\playground\publishers\Publishers.AppHost\Properties\launchSettings.json...
Building...
info: Aspire.Hosting.Azure.Provisioning.TokenCredentialHolder[0]
      Using DefaultAzureCredential for provisioning. This may not work in all environments. See https://aka.ms/azsdk/net/identity/credential-chains#defaultazurecredential-overview for more information.
info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 9.3.0-dev

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

I believe this was caused by #8751. The logging now happens when the TokenCredentialHolder service gets resolved, even if it isn't used.

cc @davidfowl

Metadata

Metadata

Assignees

Labels

area-integrationsIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using Azure

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions