SteeltoeOSS / Steeltoe

.NET Components for Externalized Configuration, Database Connectors, Service Discovery, Logging and Distributed Tracing, Application Management, Security, and more.
https://steeltoe.io
Apache License 2.0
1k stars 164 forks source link

Fix breaking change: calling AddCloudFoundry() when running locally results in application name "unknown" #1350

Closed bart-vmware closed 4 weeks ago

bart-vmware commented 1 month ago

Description

Recent refactorings in #1334 changed the behavior of services.AddCloudFoundryOptions() to return "unknown" as the application name when running locally, instead of falling back to local settings. This change was observed in broken samples.

This PR restores the behavior that AddCloudFoundry() is a light-up feature: if not running on Cloud Foundry, it behaves the same as if services.AddApplicationInstanceInfo() was called.

Additionally, this PR ~adds explicit dependencies to Steeltoe.Configuration.CloudFoundry and~ removes the odd properties on IApplicationInfo that are specific to Cloud Foundry.

Quality checklist

bart-vmware commented 1 month ago

/azp run Steeltoe.All

azure-pipelines[bot] commented 1 month ago
Azure Pipelines successfully started running 1 pipeline(s).
azure-pipelines[bot] commented 4 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).
azure-pipelines[bot] commented 4 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).
sonarcloud[bot] commented 4 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud