Skip to content

Health check does not respect AZURE_APP_CONFIGURATION_PROVIDER_DISABLED and returns Unhealthy #699

@julealgon

Description

@julealgon

I just added the newly introduced health check from version 8.3.0 in one of our projects and immediately went to test the results, only to get an Unhealthy response locally in a project that explicitly configures AZURE_APP_CONFIGURATION_PROVIDER_DISABLED for local development.

On the console, this is logged:

fail: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[103]
      Health check Microsoft.Extensions.Configuration.AzureAppConfiguration with status Unhealthy completed after 1.0959ms with message 'No configuration provider is found.'

I think this behavior is not good. Clearly, the health check implementation is ignoring the fact that the project has explicitly opted to turn off the provider, which should be a standard scenario for local development when using the AZURE_APP_CONFIGURATION_PROVIDER_DISABLED flag.

I think the team should reconsider the behavior here and return Healthy instead if the provider is not present but it has been explicitly turned off.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions