CAMEL-23590: camel-milo - align Exchange header constant names with Camel naming convention#23474
CAMEL-23590: camel-milo - align Exchange header constant names with Camel naming convention#23474oscerd wants to merge 1 commit into
Conversation
gnodet
left a comment
There was a problem hiding this comment.
Overall this looks good — the rename is consistent with the Camel naming convention, the constant value is properly updated, the generated artifacts (catalog JSON, endpoint DSL) are regenerated, tests are updated, and the upgrade guide entry is thorough and well-placed.
One issue: the component documentation still uses the old literal header value.
components/camel-milo/src/main/docs/milo-client-component.adoc, line 139:
.setHeader("await", constant(true)) // await: parameter "defaultAwaitWrites"This example should be updated to use "CamelMiloAwait":
.setHeader("CamelMiloAwait", constant(true)) // await: parameter "defaultAwaitWrites"The doc page is user-facing and will actively mislead people who try to follow the example after upgrading.
Minor (non-blocking): the two test methods (WriteClientTest.sendValue and CallClientTest.doCall) use the literal string "CamelMiloAwait" rather than the MiloConstants.HEADER_AWAIT constant. Using the constant would be more resilient to future renames, but this is a pre-existing pattern and not something introduced by this PR — just worth noting.
Claude Code on behalf of Guillaume Nodet
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
All tested modules (10 modules)
|
…amel naming convention Renames the MiloConstants.HEADER_AWAIT header string value from "await" (which is outside the Camel namespace and therefore not filtered by the default HeaderFilterStrategy) to "CamelMiloAwait", following the convention used across the rest of the Camel component catalog and matching the pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira). The Java field name is unchanged so routes referencing the constant symbolically continue to work; routes using the literal string value must be updated (documented in the 4.21 upgrade guide). MiloConstants.HEADER_NODE_IDS was already Camel-prefixed (CamelMiloNodeIds) and is unchanged. Updates the two tests (WriteClientTest, CallClientTest) that set the header by its literal value. The generated Endpoint DSL header accessor await() on MiloClientHeaderNameBuilder has been renamed to miloAwait(). Tracker: CAMEL-23577 Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
|
The doc example at This should be updated to Claude Code on behalf of Guillaume Nodet |
Summary
Renames the
MiloConstants.HEADER_AWAITheader string value fromawait—which sits outside the
Camelnamespace and is therefore not filtered bythe default
HeaderFilterStrategy— toCamelMiloAwait, following theconvention used across the rest of the Camel component catalog and matching the
pattern established in CAMEL-23526 (
camel-cxf), CAMEL-23522 (camel-mail),CAMEL-23461 (
camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket/camel-atmosphere-websocket/camel-iggy), and CAMEL-23576 (camel-jira).MiloConstants.HEADER_AWAITawaitCamelMiloAwaitHEADER_AWAITcontrols whethermilo-clientwrites are awaited. The Javafield name is unchanged so routes referencing the constant symbolically
continue to work; routes using the literal string value must be updated
(documented in the 4.21 upgrade guide).
Already-compliant constants left unchanged
MiloConstants.HEADER_NODE_IDSwas alreadyCamel-prefixed (CamelMiloNodeIds).Test changes
WriteClientTestandCallClientTestset the header by its literal value"await"; both are updated to"CamelMiloAwait".Generated artifacts
components/camel-milo/.../milo-client.json+ catalog mirrordsl/camel-endpointdsl/.../MiloClientEndpointBuilderFactory.java— DSL headeraccessor renamed (
await()→miloAwait())Backports
camel-4.18.x:camel-miloexists with the same legacy value (await) —backport applies and will be filed as a follow-up PR.
camel-4.14.x:camel-milodoes not exist on that branch (the componentwas removed and later reinstated) — no backport.
Test plan
mvn testincomponents/camel-milo— 41 tests pass (1 skipped)camel-miloregenartifacts included
=== camel-miloTracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino