fix: rename currentRole to current-role in health check response#3291
fix: rename currentRole to current-role in health check response#3291
currentRole to current-role in health check response#3291Conversation
…for consistency Co-authored-by: Aniruddh25 <3513779+Aniruddh25@users.noreply.github.com>
currentRole to current-role in health check response
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Aligns the /health endpoint JSON response keys by renaming the current role field to kebab-case for consistency with the rest of the comprehensive health report.
Changes:
- Renamed health report JSON property from
currentRoletocurrent-role. - Updated the inline comment in the health response writer to reflect the new key name.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Service/HealthCheck/Model/ComprehensiveHealthCheckReport.cs |
Renames the serialized JSON field for CurrentRole to current-role. |
src/Service/HealthCheck/ComprehensiveHealthReportResponseWriter.cs |
Updates comment text referencing the renamed response field. |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
@copilot some tests are failing. can you take a look and analyze and provide the summary here?both tests- HotReloadConfigConnectionString and HotReloadConfigDatabaseType seems to fail in assertion- "Assert.AreEqual failed. Expected:. Actual:." |
…ConfigDatabaseType tests Co-authored-by: souvikghosh04 <210500244+souvikghosh04@users.noreply.github.com>
The failures in Root cause: The "Validated hot-reloaded configuration file" success message is logged inside Fix applied in d0d1d0c: Added the same retry-with-delay pattern (up to 10 attempts, 1s apart) to |
Why make this change?
The
/healthendpoint response usedcurrentRole(camelCase) while every other multi-word key in the response uses kebab-case (app-name,cache-ttl-seconds,response-ms, etc.), creating an inconsistent API surface.What is this change?
[JsonPropertyName("currentRole")]→[JsonPropertyName("current-role")]inComprehensiveHealthCheckReport.cs.HotReloadConfigConnectionStringandHotReloadConfigDatabaseTypeintegration tests to handle a pre-existing race condition: the "Validated hot-reloaded configuration file" success message is logged before metadata re-initialization completes, causing intermittent REST request failures. This is consistent with the same fix already applied toHotReloadConfigDataSource.Before:
{ "status": "Healthy", "app-name": "dab_oss_2.0.0", "currentRole": "anonymous" }After:
{ "status": "Healthy", "app-name": "dab_oss_2.0.0", "current-role": "anonymous" }How was this tested?
Sample Request(s)
Response now contains
current-roleinstead ofcurrentRole.💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.