CAMEL-24512: camel-spring-boot - keep each failing health check's error message - #1936
Open
oscerd wants to merge 1 commit into
Open
CAMEL-24512: camel-spring-boot - keep each failing health check's error message#1936oscerd wants to merge 1 commit into
oscerd wants to merge 1 commit into
Conversation
…or message CamelHealthCheckIndicator applies every health check result to the same Health.Builder, and error.message was written only as a flat top-level detail. Health.Builder.withDetail is a Map.put, so with more than one DOWN check the last result overwrote the messages of all the earlier ones. The message is now also written into the check-scoped <id>.data map, alongside the other per-check entries, so each failing check keeps its own. The top-level key is left in place for compatibility. The diff is deliberately confined to error.message: PR apache#1929 (CAMEL-24592) changes the stack-trace gating in the same method. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0165HC1XCB3h6mMii6wbZneG Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Croway
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CamelHealthCheckIndicator.doHealthCheckloops over every health check result and passes the sameHealth.BuildertoCamelHealthHelper.applyHealthDetail. The error message was written only as a flattop-level detail:
Health.Builder.withDetailis aMap.put, so that key is a single slot shared by every check. With two DOWNchecks the actuator response carried only the second message:
The per-check
<id>.datamaps stay separate, so the fix is to put the message there too. The top-level key iskept as it was, for compatibility.
Found by @luigidemasi while reviewing CAMEL-24499; it pre-dates that change and is independent of it.
Scope
Deliberately confined to
error.message. #1929 (CAMEL-24592) changes the stack-trace gating in the samemethod, and @Croway scoped that PR to leave this alone — doing the same in reverse here, so the two should
apply cleanly in either order.
Tests
CamelHealthHelperMultipleFailuresTest:eachFailingCheckKeepsItsOwnMessage— two DOWN results with distinct messages, asserting each is retrievableunder its own check id
topLevelErrorMessageIsStillReported— the compatibility guard on the flat keyVerified meaningful: the first fails against
main(expected <first-message> but was <null>), the secondpasses either way. Full
core/camel-spring-bootsuite: 163 tests, 0 failures.Note on the root build
The full reactor currently fails on
camel-hivemq-starter, unrelated to this change:org.apache.camel:camel-hivemq:4.23.0-SNAPSHOTis not on apache.snapshots yet (main's HEAD is the commit thatadded the starter). 171 modules build,
core/camel-spring-bootamong them, before the reactor stops there.Same publishing-lag shape as
camel-toona few days ago.🤖 Generated with Claude Code
https://claude.ai/code/session_0165HC1XCB3h6mMii6wbZneG