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

   ## Description
   
   [CAMEL-26727](https://issues.apache.org/jira/browse/CAMEL-26727): W-6 of the 
stage 2 decisions on CAMEL-26607, what to try.
   
   **Stacked on #29396** (base `CAMEL-26726-chaos-expect-time-loss`): a 
hand-off suggestion uses its `expect=a->b:lost<=0`. Retarget to main once 
#29396 is merged.
   
   `ChaosManager.suggest()` (`ChaosAdvisor`) suggests rules per route from the 
running routes, the most worth trying first, each a recipe of the chaos model 
with its target filled in and a line that says why:
   
   | What a route does | Suggested |
   |---|---|
   | HTTP call, no circuit breaker | `http-error` (503), `timeout` |
   | HTTP call, with a circuit breaker | `outage` (does the breaker open, does 
the fallback answer) |
   | call over another protocol | `connection-refused`, `slow` |
   | input that can deliver again (Kafka, JMS, AMQP, SQS, ...; or a consumer 
that keeps failed messages) before a call out | `duplicate` |
   | dead letter channel | `dlq-unreachable` (`at=dlq`) |
   | hand-off over `seda`/`vm`/`disruptor` to another route | `route=<next> 
error rate=0.2 until=2m expect=<route>-><next>:lost<=0 within=3m` |
   | input from outside (not direct/seda) | `route-error` (event driven) or 
`poll-error` (polling), and `stall` |
   
   The facts come from the route (its sends via `route.filter("*")`, circuit 
breakers in its `RouteDefinition`, a `DeadLetterChannelDefinition` error 
handler, its consumer). The rules leave the query of an endpoint out (it says 
nothing of which endpoint it is, and may hold a secret). At most 40 suggestions.
   
   - Connector command `suggest` (read only), and `camel cmd chaos-suggest 
[name]`, which prints them with the `chaos-add` command of each.
   - The chaos screen of the Camel TUI: `w` asks the integration and lists them 
(`ChaosSuggestList`), with why and the rule; Enter types the rule in, to change 
or add after the confirmation.
   - About the shared hints rule set (CAMEL-26716, to be talked over): these 
facts come from the running context, since chaos only works there; they can 
become the chaos part of that set when it is built (in the JIRA and 
`design/chaos.adoc`).
   
   Docs: new section "What to try" of the camel-chaos page (with a table and an 
example), the CLI managing page, the generated `chaos-suggest` command page, 
the chaos screen help, the TUI page, `design/chaos.adoc`.
   
   ## Tests
   
   - `ChaosAdvisorTest`: the suggestions for a route with an HTTP call and a 
seda hand-off, one with a dead letter channel, one with a circuit breaker, a 
polling input; no HTTP error for the call inside the breaker; the query is left 
out; the order; every suggested rule is valid (added and removed); the JSON of 
`ChaosManager.suggest()`.
   - camel-chaos: 779 green; connector chaos tests 15; `CamelChaosActionTest` 
(suggest, nothing to suggest) and the help goldens; TUI chaos and help tests 
(`w` lists and types in, nothing to suggest) 142 green.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS
   


-- 
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