CAMEL-24856: the properties validator reports a nested segment under an option group, which fails at startup - #26639
Conversation
…an option group (camel.resilience4j.circuitbreaker.<id>.<option>): the options are global, or per circuit breaker in the route Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet-bot
left a comment
There was a problem hiding this comment.
One correctness issue in the new nestedGroupKeyHint method.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
…main model Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after the null-guard commit.
The previous CHANGES_REQUESTED finding — NPE risk from catalog.mainModel() returning null — is addressed: the new commit adds if (mm == null) { return null; } before dereferencing .getOptions(), matching the defensive pattern used in mainOptionHint().
The rest of the nestedGroupKeyHint logic is correct:
NESTING_GROUPScorrectly excludescomponent,dataformat,language,beans,variable,kamelet,jbang,route-template,routeTemplate,main,rest,server,management— all prefixes that legitimately nest or are owned by other checks.- The
rest.contains(".")guard prevents false positives on valid single-segment keys. - The options filter (
!o.getName().substring(prefix.length()).contains(".")) correctly isolates flat group options. - Placement before
catalog.validateConfigurationProperty()is correct: the catalog silently accepts these invented per-id forms, so the intercept must come first.
Test coverage is adequate: two representative cases (resilience4j and faulttolerance), the valid single-segment form excluded (line 2), and message content verified.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 6 of 692 tested, 8 compile-only — current: 6 all testedMaveniverse Scalpel detected 15 affected modules (current approach: 6). Skip-tests mode would test 6 modules (1 direct + 6 downstream), skip tests for 8 (generated code, meta-modules)
|
| Module | Duration | Status |
|---|---|---|
| Camel :: Launcher | 53.4s | SUCCESS |
| Camel :: JBang :: Plugin :: TUI | 50.1s | SUCCESS |
| Camel :: JBang :: MCP | 41.8s | SUCCESS |
| Camel :: JBang :: Plugin :: Kubernetes | 20.6s | SUCCESS |
| Camel :: JBang :: Plugin :: Testing | 10.9s | SUCCESS |
| Camel :: JBang :: Plugin :: Validate | 8.0s | SUCCESS |
| Camel :: Coverage | 5.6s | SUCCESS |
| Camel :: JBang :: Plugin :: Generate | 1.6s | SUCCESS |
| Camel :: JBang :: Plugin :: Edit | 1.5s | SUCCESS |
| Camel :: JBang :: Plugin :: MCP | 1.2s | SUCCESS |
| Camel :: JBang :: Integration tests | 1.2s | SUCCESS |
| Camel :: JBang :: Main | 1.0s | SUCCESS |
| Camel :: JBang :: Plugin :: Route Parser | 0.9s | SUCCESS |
| Camel :: Launcher :: Container | 0.8s | SUCCESS |
| Camel :: JBang :: Core | n/a |
Top 20 slowest modules:
Camel :: Launcher(53.4s)Camel :: JBang :: Plugin :: TUI(50.1s)Camel :: JBang :: MCP(41.8s)Camel :: JBang :: Plugin :: Kubernetes(20.6s)Camel :: JBang :: Plugin :: Testing(10.9s)Camel :: JBang :: Plugin :: Validate(8.0s)Camel :: Coverage(5.6s)Camel :: JBang :: Plugin :: Generate(1.6s)Camel :: JBang :: Plugin :: Edit(1.5s)Camel :: JBang :: Plugin :: MCP(1.2s)Camel :: JBang :: Integration tests(1.2s)Camel :: JBang :: Main(1.0s)Camel :: JBang :: Plugin :: Route Parser(0.9s)Camel :: Launcher :: Container(0.8s)
Description
From the round-2 benchmark (series l3, circuit-breaker, twice):
an invented per-id form, passed the properties validation and the run died at startup with "Cannot find getter method: supplierCircuitBreaker on bean: class java.lang.String when binding property: circuitbreaker.supplierCircuitBreaker.failureRateThreshold".
PropertiesChecksnow reports a key with a nested segment under one of the main model's option groups (resilience4j, faulttolerance, threadpool, health...), before the catalog check, with the global form and, for resilience4j, the per-circuit-breaker form in the route:The prefixes whose keys nest by design (
camel.component,camel.beans,camel.variable,camel.kamelet,camel.main, bracketed keys such ascamel.threadpool.config[x]) are left to the checks that own them.Tests
SourceValidatorPropertiesTest.aNestedKeyUnderAnOptionGroupIsReported: the resilience4j and a faulttolerance nested key are reported, the global form between them is not. The ai package of camel-jbang-core green.🤖 Generated with Claude Code
https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj