Claus Ibsen created CAMEL-26717:
-----------------------------------

             Summary: camel-chaos - the integration name is optional when one 
runs, the hooks of a rule are the ones that can fire, and a rule in plain words
                 Key: CAMEL-26717
                 URL: https://issues.apache.org/jira/browse/CAMEL-26717
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 4.24.0


Step 2 of the stage 2 order decided on CAMEL-26607 (S2-4 + P-2, and 
ChaosRule.describe()).

h3. The integration name is optional (S2-4)

{{camel cmd chaos-add}}, {{chaos-change}} and {{chaos-remove}} take the 
integration name or pid as a required parameter today. Without one:
* with exactly one integration running (or exactly one with chaos switched on), 
it is used;
* with none or several, the command fails with the list of the running 
integrations (exit 2), so the user picks one.
Add and change never mean "all". {{chaos-clear}} keeps its default {{*}}. The 
MCP chaos tools follow the same rule.

h3. The hooks a rule has are the ones that can fire (P-2)

The list and report of a rule say where it fires ({{hooks}}). Today a rule on 
an endpoint lists {{poll}} and {{send}} also where they cannot fire. {{poll}} 
is listed only when a route that matches has a {{ScheduledPollConsumer}}, and 
{{send}} only when something in the integration sends to the target.

h3. A rule in plain words (ChaosRule.describe())

{{describe()}} says what a rule does in plain words, for example 
{{endpoint=http:stock* error status=503 rate=0.5 until=5m}} becomes "fail half 
of the sends to http:stock* with HTTP status 503, for 5 minutes". The 
confirmation of the TUI, the chaos table, the report and the coming dry-run use 
it. It comes early because {{in=}} (S2-2) and {{when=}} (S2-3) each extend it.

_Claude Code on behalf of Claus Ibsen_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to