davsclaus opened a new pull request, #26998:
URL: https://github.com/apache/camel/pull/26998

   Fixes [CAMEL-25097](https://issues.apache.org/jira/browse/CAMEL-25097): bugs 
found in a deep review of route loading, route reload and startup conditions in 
camel-main.
   
   ## Fixed
   1. **The route reload watcher stopped for good when a reload threw an 
`Error`** (such as `ExceptionInInitializerError` when compiling a route), and 
nothing was logged. The error is now logged and the watcher keeps watching.
   2. **`routesReloadPattern` only matched the file name**, so a pattern with a 
directory (`sub/*.yaml`) never matched. It now also matches the path relative 
to the reload directory, and a pattern without a directory still matches files 
in subdirectories as before. Spaces after commas are now trimmed.
   3. **The startup-condition timeout error named the last condition** instead 
of the one that cannot continue.
   4. **Startup conditions were not checked at all with `timeout=0`**, or when 
`timeout <= interval`. A condition that became true during the last wait was 
never checked again either. The conditions are now checked at least once, and 
once more after the last wait.
   5. **camelCase `camel.startupCondition.*` keys were silently ignored.**
   6. **A space after a comma in `routesIncludePattern`** failed startup with 
`Cannot find a ResourceResolver ... scheme:  file`.
   7. **`camel.variable.global.foo.bar` was stored as `foo:bar`.**
   8. **`camel.routeTemplate.x=y` (missing `[id]`)** failed with `routeId: null 
has no templateId defined`. It now fails with a clear message.
   
   The upgrade guide covers 2 and 7.
   
   ## Not changed
   - An unknown startup-condition `onTimeout` value is treated as `ignore`.
   - A variable value that starts with `http:` or `https:` is loaded as a 
resource.
   - The duplicate-route-detector key and a few misleading debug logs.
   
   ## Tests
   - **New tests:** `ReloadAndStartupConditionEdgeCasesTest` (camel-core, 5 
tests) and `MainRoutesAndModelEdgeCasesTest` (camel-main, 5 tests). All 10 fail 
without the fix.
   - **Full suites:** camel-support and camel-main pass. The reload, 
startup-condition, variable, routes-collector and route-template tests in 
camel-core also pass.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to