Repository navigation
CAMEL-25875: camel-milo - a sessionTimeout configured on the component reaches its endpoints - #28252
Conversation
gnodet-bot
left a comment
There was a problem hiding this comment.
LGTM. Clean, minimal fix.
The one-line addition to the copy constructor is the correct fix — sessionTimeout was the only field missing from the copy. Tests cover both the component→endpoint propagation path and the endpoint-level URI override. The upgrade note in camel-4x-upgrade-guide-4_24.adoc accurately describes the prior behavior and the fix.
Metadata suggestion: this is a long-standing silent bug (session timeout silently ignored since the class was introduced). Consider adding a port/camel-4.22.x label — it is a low-risk, high-value backport candidate.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
Thanks. I cannot set labels on this repository, so I leave the port labels to a committer. The copy constructor misses Claude Code on behalf of etzel-mes |
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔁 1 test passed only after a retry on JDK 21 (1 retried attempt) Recovered flaky tests on JDK 21 (1)
🔬 Scalpel shadow comparison — Scalpel: 8 of 707 tested, 26 compile-only — current: 8 all testedMaveniverse Scalpel detected 8 affected modules (current approach: 8). Skip-tests mode would test 8 modules (2 direct + 7 downstream), skip tests for 26 (generated code, meta-modules) Modules Scalpel would test (8)
Modules with tests skipped (26)
All tested modules (35 modules, 5m 49s total)Total reactor time: 5m 49s
Top 20 slowest modules:
|
davsclaus
left a comment
There was a problem hiding this comment.
Thanks etzel-mes, the fix is right. sessionTimeout was the only field the copy constructor left out (allowedSecurityPolicies is copied as a new set, everything else field by field), and the copy constructor is what MiloClientComponent and MiloBrowseComponent use for each endpoint. The tests cover both components and the endpoint override, and they fail without the fix.
- Blocking: the PR conflicts with main in
camel-4x-upgrade-guide-4_24.adoc. It is not another milo PR: CAMEL-25879 (#28174) added the note "camel-infinispan - the key option of the producer takes precedence over the key header" at the same spot, right after the miloreconnectTimeoutnote. Please rebase and keep both notes, with this one directly after the miloreconnectTimeoutnote so the milo notes stay together. #28254 also edits this file, but in other milo sections, so it should not conflict again whichever is merged first. - Optional: the copy constructor lost a field since its first version and nothing noticed. A small test that sets every field of a
MiloClientConfigurationto a non-default value, copies it and compares field by field through reflection would catch the next option that is added to the class but not to the copy constructor. Fine as a follow-up.
LGTM once rebased and the build jobs are green.
Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
…t reaches its endpoints The copy constructor of MiloClientConfiguration, which the milo-client and milo-browse components use to create the configuration of each endpoint, did not copy sessionTimeout, so a session timeout configured on the component never reached an endpoint and Milo's default applied. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
fec9c73 to
8d830e7
Compare
|
Thanks @davsclaus. Rebased onto main (8d830e7): the sessionTimeout note now follows the milo reconnectTimeout note directly, and the camel-infinispan note comes after it. The code change is unchanged, and Claude Code on behalf of etzel-mes |
davsclaus
left a comment
There was a problem hiding this comment.
Thanks Serdar,
- Blocking point addressed: the rebase fixes the conflict. A range-diff against fec9c73 shows only the context of the upgrade guide changed. The
sessionTimeoutnote now comes directly after the miloreconnectTimeoutnote, and the camel-infinispan note of CAMEL-25879 follows it. The copy constructor fix andSessionTimeoutConfigurationTestare unchanged. The PR merges cleanly with main and with #28254. - Optional point (the reflection test for the copy constructor): fine to leave it for a follow-up, as you said.
There were no inline threads to resolve. LGTM, to merge once CI is green.
Claude Code on behalf of @davsclaus.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
🔄 Backport BotConflicts (🤖 agent dispatched to resolve):
ℹ️ If you push additional commits after |
|
✅ Backport to |
Description
The
milo-clientandmilo-browsecomponents create the configuration of each endpoint with the copy constructor ofMiloClientConfiguration, which did not copysessionTimeout(since the first version of the class). A session timeout configured on the component, for examplecamel.component.milo-client.sessionTimeout=30000, therefore never reached an endpoint, and its sessions used the Milo default of 120000 ms. Only the endpoint option worked.sessionTimeoutwas the only field the copy constructor left out.This copies it. A
sessionTimeoutset on the endpoint still wins over the component's.Tests:
SessionTimeoutConfigurationTest, for both components: the component value reaches the endpoint, and the endpoint option overrides it. Both tests fail without the fix withexpected: <30000> but was: <null>.Docs: the 4.24 upgrade note. The option is already documented as a component option, so nothing is generated.
Fixes CAMEL-25875.
@davsclaus @oscerd
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.Claude Code on behalf of etzel-mes