jiriOndrusek-agent commented on code in PR #9625:
URL: https://github.com/apache/camel-quarkus/pull/9625#discussion_r4786018248
##########
extensions-jvm/chaos/runtime/src/main/doc/usage.adoc:
##########
@@ -0,0 +1,42 @@
+=== Switching chaos on
+
+Chaos is intended for development only.
+
+In Quarkus dev mode, chaos is switched on with no extra configuration, because
Camel Quarkus sets the Camel profile to `dev`.
+Nothing happens to your routes until a rule is added.
+
+Outside of dev mode, chaos is off by default. To switch it on, for example in
a test, set:
+
+[source,properties]
+----
+%test.camel.chaos.enabled = true
+----
+
+To keep chaos off in dev mode, set `camel.chaos.enabled=false`.
+
+[WARNING]
Review Comment:
Could the extension enforce this instead of only documenting it, like
`QuarkusLocalCliConnector` does with `ConfigUtils.isProfileActive("prod")`? For
example, refuse chaos or force it off with a WARN under the Quarkus prod
profile, plus a QuarkusProdModeTest.
_Generated with [Claude Code](https://claude.com/claude-code) on behalf of
@JiriOndrusek_
##########
integration-tests-jvm/chaos/src/main/resources/application.properties:
##########
@@ -0,0 +1,19 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+camel.chaos.enabled=true
Review Comment:
The docs recommend `%test.camel.chaos.enabled`. Use the prefix here too, so
the only example follows the advice? Also, `camel.chaos.seed=42` (line 18) is
never asserted.
_Generated with [Claude Code](https://claude.com/claude-code) on behalf of
@JiriOndrusek_
##########
extensions-jvm/chaos/runtime/src/main/doc/usage.adoc:
##########
@@ -0,0 +1,42 @@
+=== Switching chaos on
+
+Chaos is intended for development only.
+
+In Quarkus dev mode, chaos is switched on with no extra configuration, because
Camel Quarkus sets the Camel profile to `dev`.
+Nothing happens to your routes until a rule is added.
+
+Outside of dev mode, chaos is off by default. To switch it on, for example in
a test, set:
+
+[source,properties]
+----
+%test.camel.chaos.enabled = true
+----
+
+To keep chaos off in dev mode, set `camel.chaos.enabled=false`.
+
+[WARNING]
+====
+The Quarkus `prod` profile does not set the Camel profile. A packaged
application therefore runs with no Camel profile, and
+`camel.chaos.enabled=true` switches chaos on.
+
+To make sure that chaos can never be switched on in production, set
`%prod.camel.main.profile=prod`.
+This profile also sets the Camel security policy to `fail`, so an application
with insecure settings, such as
+`camel.ssl.trustAllCertificates=true`, does not start.
+
+Alternatively, set `%prod.camel.chaos.enabled=false`. This does not change the
security policy, but the setting can be
+overridden, for example with a system property or an environment variable.
+====
+
+=== Managing the chaos rules
+
+In dev mode, open the Quarkus Dev UI and choose the Chaos page of the Camel
Chaos extension. It shows the rules and the report, and lets
+you add and remove rules while the application runs. The page is not available
outside of dev mode.
Review Comment:
Do rules added in the Dev UI survive a dev-mode hot reload (new
CamelContext)? If not, a sentence here would help.
_Generated with [Claude Code](https://claude.com/claude-code) on behalf of
@JiriOndrusek_
--
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]