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/05/19 19:25:46 UTC

[PR] CAMEL-23553: Fix RestRegistry lazy plugin resolution [camel]

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

   ## Summary
   
   - `RestRegistry` is registered as a lazy plugin via `lazyAddContextPlugin()`, but `isContextPluginInUse()` always returns `false` for lazy plugins. This caused `VertxPlatformHttpConsumer` and `MultiRestConsumer` to never resolve the registry — even when camel-rest was on the classpath — breaking contract-first REST services.
   - Make the lazy resolution return `null` gracefully when camel-rest is absent (instead of throwing), so callers can use `PluginHelper.getRestRegistry()` directly with a null-check.
   
   ### Changes
   
   | File | Change |
   |------|--------|
   | `SimpleCamelContext` | Use optional `resolveBootstrapService()` instead of mandatory (returns null when camel-rest absent) |
   | `AbstractCamelContext` | Null-check factory in `createRestRegistry()` |
   | `DefaultCamelContextExtension` | Handle null from `createRestRegistryFactory()` |
   | `DefaultContextPluginManager` | Remove entry when lazy supplier returns null (avoids repeated retries) |
   | `VertxPlatformHttpConsumer` | Drop broken `isContextPluginInUse` guard, resolve directly |
   | `MultiRestConsumer` | Drop broken `isContextPluginInUse` guard, resolve with null-check |
   
   ## Test plan
   
   - [x] `mvn test -pl core/camel-base-engine` — passes
   - [x] `mvn test -pl components/camel-platform-http-vertx` — passes
   - [x] `mvn test -pl components/camel-webhook` — passes
   - [ ] Test contract-first REST DSL with camel-platform-http-vertx to verify services are registered in RestRegistry
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23553: Fix RestRegistry lazy plugin resolution [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #23336:
URL: https://github.com/apache/camel/pull/23336


-- 
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-23553: Fix RestRegistry lazy plugin resolution [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23336:
URL: https://github.com/apache/camel/pull/23336#issuecomment-4491901768

   :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-23553: Fix RestRegistry lazy plugin resolution [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23336:
URL: https://github.com/apache/camel/pull/23336#issuecomment-4491991535

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `components/camel-platform-http-vertx`
   - `components/camel-webhook`
   - `core/camel-base-engine`
   
   > :information_source: Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the `test-dependents` label to force testing all dependents.
   
   <details><summary>Build reactor — dependencies compiled but only changed modules were tested (3 modules)</summary>
   
   - Camel :: Base Engine
   - Camel :: Platform HTTP :: Vert.x
   - Camel :: Webhook
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/26120073690)


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