oscerd opened a new pull request, #9069:
URL: https://github.com/apache/camel-quarkus/pull/9069
Fixes #9052.
`CamelCliConnectorConfig.enabled()` carries `@WithDefault("true")` and
`CliConnectorProcessor` applied no launch mode condition — the only gate was
that flag — so the connector's action file IPC was active in production builds.
`CamelCliConnectorRecorder` then calls `factory.setEnabled(true)`
unconditionally.
**Change**
Adds `quarkus.camel.cli.exposure-mode`, following the same shape as
`quarkus.camel.console.exposure-mode` (the issue suggested gating it like the
console extension):
| Value | Effect |
|---|---|
| `dev-test` (default) | dev and test modes only |
| `all` | dev, test and prod |
| `none` | never |
`quarkus.camel.cli.enabled=false` still turns it off in every mode. Dev and
test behaviour is unchanged, so this only affects prod builds, and a deployer
opts back in with `quarkus.camel.cli.exposure-mode=all`. Migration guide entry
added.
**Tests**
`CliConnectorEnabledSupplierTest` exercises the gate directly across launch
modes — `QuarkusUnitTest` always runs in test mode, so it cannot cover the prod
case. Against the previous gate, `devTestModeNotEnabledInProd` and
`noneModeNeverEnabled` both fail with `expected: <false> but was: <true>`; both
pass with this change.
The existing `CliConnectorEnabledTest` (no config override, expects the
factory present) and `CliConnectorDisabledTest` still pass — 7/7 green.
`@QuarkusTest`-based `CliConnectorTest` is unaffected, since that is test mode.
`./mvnw clean validate -pl docs` passes.
> Note: this adds `docs/modules/ROOT/pages/migration-guide/3.40.0.adoc`, as
does #9066. Whichever merges second will need a trivial conflict resolution in
that file and in `migration-guide/index.adoc`.
🤖 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]