You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/10/08 10:58:38 UTC
[PR] CAMEL-25429: camel-jbang - camel overview lists the error handling apart from the flows [camel]
davsclaus opened a new pull request, #27563:
URL: https://github.com/apache/camel/pull/27563
https://issues.apache.org/jira/browse/CAMEL-25429 (the `camel overview` part; independent of #27557 / #27560, which are the runtime topology and the monitor)
`camel overview` (and the `camel-summary.md` it writes) listed a global error handler as a route calling the error route, under **Flows between routes**:
```
- `error-handler@error-handling.camel.yaml:3` calls `parked` over `direct:parked`
- `error-handler@error-handling.camel.yaml:12` calls `parked` over `direct:parked`
- `checkout` calls `payment-provider` over `direct:charge`
```
Now, on fail-well/error-handling:
```
## Flows between routes
- `checkout` calls `payment-provider` over `direct:charge`
## Error handling
- dead letter channel (global, error-handling.camel.yaml:3): failures to `parked`
- onException IllegalStateException (global, error-handling.camel.yaml:12): failures to `parked`
- no error handler in `payment-provider`: failures go back to the caller, whose error handling acts
```
- **Flows** keep the calls only. A link from a global error handler, or sent while handling a failure (onException, doCatch, dead letter channel), is not a flow.
- **Error handling:**
- each global handler by what it is: `dead letter channel`, `onException` with its exception classes, `route configuration`. The YAML, XML and Java readers label it;
- a route's own error handling, as `` `route` (its own error handling) ``;
- the routes the failures go to;
- the routes with `noErrorHandler`.
- The source readers record a route's own error handler: `ProjectRoutes.Route` gets an `errorHandler` component through `withErrorHandler`, and the existing constructors are kept. YAML reads `errorHandler: noErrorHandler: {}` in a route; Java reads `.errorHandler(noErrorHandler())` / a dead letter channel.
- The plain-text form of the overview (what the AI reads) has the same split.
**Tests:** `IntegrationSummaryTest.errorHandlingIsNotAFlow` (YAML) and `errorHandlingIsNotAFlowInJava`. The overview, summary and capabilities tests pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-25429: camel-jbang - camel overview lists the error handling apart from the flows [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27563:
URL: https://github.com/apache/camel/pull/27563#issuecomment-6059229427
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `dsl/camel-jbang/camel-jbang-core`
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 6 of 700 tested, 8 compile-only — current: 6 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **6 affected modules** (current approach: 6).
**Skip-tests mode would test 6 modules** (1 direct + 6 downstream), **skip tests for 8** (generated code, meta-modules)
<details><summary>Modules Scalpel would test (6)</summary>
- `camel-jbang-mcp` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-mcp` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-route-parser` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-tui` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-validate` ← downstream of org.apache.camel:camel-jbang-core
- `camel-launcher-container` ← downstream of org.apache.camel:camel-launcher
</details>
<details><summary>Modules with tests skipped (8)</summary>
- `camel-jbang-it`
- `camel-jbang-main`
- `camel-jbang-plugin-edit`
- `camel-jbang-plugin-generate`
- `camel-jbang-plugin-kubernetes`
- `camel-jbang-plugin-test`
- `camel-launcher`
- `coverage`
</details>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
:warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
- `dsl/camel-jbang/camel-jbang-core`: 2 test(s) disabled on GitHub Actions
:bulb: **Manual integration tests recommended:**
> You modified `dsl/camel-jbang/camel-jbang-core`. The related integration tests in `dsl/camel-jbang/camel-jbang-it` are excluded from CI. Consider running them manually:
> ```
> mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
> ```
<details><summary>All tested modules (15 modules, 2m 5s total)</summary>
**Total reactor time:** 2m 5s
| Module | Duration | Status |
| --- | --- | --- |
| Camel :: JBang :: Plugin :: TUI | 54.0s | FAILURE |
| Camel :: JBang :: Plugin :: Validate | 17.9s | SUCCESS |
| Camel :: JBang :: MCP | 17.2s | SUCCESS |
| Camel :: JBang :: Plugin :: Kubernetes | 15.9s | SUCCESS |
| Camel :: JBang :: Plugin :: Testing | 9.2s | SUCCESS |
| Camel :: Coverage | 4.3s | SUCCESS |
| Camel :: JBang :: Plugin :: MCP | 1.6s | SUCCESS |
| Camel :: JBang :: Plugin :: Edit | 1.3s | SUCCESS |
| Camel :: JBang :: Plugin :: Route Parser | 1.3s | SUCCESS |
| Camel :: JBang :: Plugin :: Generate | 1.3s | SUCCESS |
| Camel :: JBang :: Main | 1.0s | SUCCESS |
| Camel :: JBang :: Core | n/a | |
| Camel :: JBang :: Integration tests | n/a | |
| Camel :: Launcher | n/a | |
| Camel :: Launcher :: Container | n/a | |
**Top 20 slowest modules:**
- `Camel :: JBang :: Plugin :: TUI` (54.0s)
- `Camel :: JBang :: Plugin :: Validate` (17.9s)
- `Camel :: JBang :: MCP` (17.2s)
- `Camel :: JBang :: Plugin :: Kubernetes` (15.9s)
- `Camel :: JBang :: Plugin :: Testing` (9.2s)
- `Camel :: Coverage` (4.3s)
- `Camel :: JBang :: Plugin :: MCP` (1.6s)
- `Camel :: JBang :: Plugin :: Edit` (1.3s)
- `Camel :: JBang :: Plugin :: Route Parser` (1.3s)
- `Camel :: JBang :: Plugin :: Generate` (1.3s)
- `Camel :: JBang :: Main` (1.0s)
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/37767016319)
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-25429: camel-jbang - camel overview lists the error handling apart from the flows [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #27563:
URL: https://github.com/apache/camel/pull/27563
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-25429: camel-jbang - camel overview lists the error handling apart from the flows [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27563:
URL: https://github.com/apache/camel/pull/27563#issuecomment-6058384589
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: Apache Camel Committers, please review the following items:
* First-time contributors **require MANUAL approval** for the GitHub Actions to run
* You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
* You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
* Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-25429: camel-jbang - camel overview lists the error handling apart from the flows [camel]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #27563:
URL: https://github.com/apache/camel/pull/27563#discussion_r4218669718
##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/JavaRouteReader.java:
##########
@@ -150,10 +151,20 @@ private void route(RouteDefinition r, RouteTemplateDefinition template, boolean
for (ProcessorDefinition<?> p : r.getOutputs()) {
decisions(p, scope, decisions, visited, 0);
}
- routes.add(new Route(
+ Route route = new Route(
id, template != null ? "routeTemplate" : "route", description, r.getGroup(), file, Math.max(1, line),
"java", partial, from, consumes, produces, r.getOutputs().size(), -1, 0, null, null,
- logOnly(r, produces), note, decisions));
+ logOnly(r, produces), note, decisions);
+ // the route's own error handler, such as errorHandler(noErrorHandler())
+ if (r.isErrorHandlerFactorySet()) {
+ ErrorHandlerFactory eh = r.getErrorHandlerFactory();
+ if (eh instanceof NoErrorHandlerDefinition) {
+ route = route.withErrorHandler("noErrorHandler");
+ } else if (eh instanceof DeadLetterChannelDefinition) {
+ route = route.withErrorHandler("deadLetterChannel");
+ }
Review Comment:
⚠️ **Missing else branch — `defaultErrorHandler()` and ref-based handlers are silently ignored**
The current code only handles two subtypes of `ErrorHandlerFactory`. If a route overrides with `errorHandler(defaultErrorHandler())` or `errorHandlerRef("myHandler")`, the factory is set but the branch falls through — leaving `route.errorHandler` as `null`, making it look like the route inherits the global handler.
This means a route that explicitly resets to the default error handler (overriding a global DLC, for example) will be incorrectly reported in the overview.
Suggested fix:
```suggestion
// the route's own error handler, such as errorHandler(noErrorHandler())
if (r.isErrorHandlerFactorySet()) {
ErrorHandlerFactory eh = r.getErrorHandlerFactory();
if (eh instanceof NoErrorHandlerDefinition) {
route = route.withErrorHandler("noErrorHandler");
} else if (eh instanceof DeadLetterChannelDefinition) {
route = route.withErrorHandler("deadLetterChannel");
} else {
route = route.withErrorHandler("defaultErrorHandler");
}
}
```
The `else` branch catches `DefaultErrorHandlerDefinition` and any ref-based handler (both of which are semantically equivalent to "using the default" in terms of the overview display).
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-25429: camel-jbang - camel overview lists the error handling apart from the flows [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #27563:
URL: https://github.com/apache/camel/pull/27563#issuecomment-6060310131
to rebase on main when https://github.com/apache/camel/pull/27570 is merged
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org