Skip to content

CAMEL-21873: camel-hibernate - options for both consumer and producer should be common options - #28530

Merged
davsclaus merged 1 commit into
apache:mainfrom
davsclaus:CAMEL-21873-hibernate-selection-query
Oct 26, 2026
Merged

davsclaus merged 1 commit into
apache:mainfrom
davsclaus:CAMEL-21873-hibernate-selection-query

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #27935 (CAMEL-21873, the new camel-hibernate component).

CatalogDocExamplesTest.everyYamlExampleOfTheDocumentationPassesTheCatalogChecks (camel-jbang-core) fails on main, and on any PR whose CI runs it (see #28528):

hibernate-component example 1: hibernate: Option 'selectionQuery' is not applicable in producer only mode ...
hibernate-component example 5: hibernate: Option 'selectionQuery' is not applicable in consumer only mode ...
(6 failures)

selectionQuery, readOnly, filters and tenantIdentifier were declared with label = "producer,consumer". The catalog therefore grouped them as consumer options, and the endpoint DSL generator left them out of the DSL builders entirely.

Changes

  • HibernateEndpoint: removed the producer,consumer label from these four options, so they become common options, as camel-jpa does for query / namedQuery.
  • Regenerated the component metadata, the catalog and the endpoint DSL. HibernateEndpointBuilderFactory now has selectionQuery, readOnly, filters and tenantIdentifier on the consumer, producer and common builders. The component is unreleased (4.24.0-SNAPSHOT), so nothing changes for released users.

Testing

  • components/camel-hibernate: mvn install -DskipITs passes (52 tests).
  • dsl/camel-jbang/camel-jbang-core: CatalogDocExamplesTest passes.

Claude Code on behalf of Claus Ibsen

🤖 Generated with Claude Code

… should be common options

The selectionQuery, readOnly, filters and tenantIdentifier options were labelled
producer,consumer which made the catalog group them as consumer options, causing
the documentation examples to fail the catalog checks in CatalogDocExamplesTest.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@davsclaus
davsclaus requested review from Croway, oscerd and ramu11 October 26, 2026 19:24
@davsclaus
davsclaus merged commit 714a56d into apache:main Oct 26, 2026
6 checks passed
@davsclaus
davsclaus deleted the CAMEL-21873-hibernate-selection-query branch October 26, 2026 19:25

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The fix is correct: removing label = "producer,consumer" from the four @UriParam annotations (selectionQuery, readOnly, filters, tenantIdentifier) makes them common options in Camel's framework, which is exactly the pattern camel-jpa uses for query/namedQuery. All generated artifacts (component JSON, catalog JSON, endpoint DSL) are consistent and correctly regenerated. The failing CatalogDocExamplesTest is a direct validation of this fix.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 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 have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-hibernate
  • dsl/camel-endpointdsl

🔁 1 test passed only after a retry on JDK 21 (1 retried attempt)

Recovered flaky tests on JDK 21 (1)
Module Test Failed attempts First failure
dsl/camel-jbang/camel-jbang-plugin-tui MonitorStartupTest.browserOnlyServesUntilTheServerStops 1 Connection refused

ℹ️ These tests did not fail the build. Surefire retried them and they passed.
Retries are enabled project-wide by surefire.rerunFailingTestsCount in parent/pom.xml.


🔬 Scalpel shadow comparison — Scalpel: 8 of 708 tested, 25 compile-only — current: 8 all tested

Maveniverse Scalpel detected 8 affected modules (current approach: 8).

Skip-tests mode would test 8 modules (3 direct + 7 downstream), skip tests for 25 (generated code, meta-modules)

Modules Scalpel would test (8)
  • camel-hibernate ← components/camel-hibernate/src/generated/resources/META-INF/org/apache/camel/component/hibernate/hibernate.json, components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateEndpoint.java
  • camel-jbang-mcp ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-mcp ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-tui ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-validate ← downstream of org.apache.camel:camel-yaml-dsl-validator
  • camel-launcher-container ← downstream of org.apache.camel:camel-launcher
  • camel-yaml-dsl-validator ← downstream of org.apache.camel:camel-catalog
  • camel-yaml-dsl-validator-maven-plugin ← downstream of org.apache.camel:camel-yaml-dsl-validator
Modules with tests skipped (25)
  • apache-camel
  • camel-allcomponents
  • camel-catalog-console
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (35 modules, 4m 49s total)

Total reactor time: 4m 49s

Module Duration Status
Camel :: JBang :: Plugin :: TUI 56.7s SUCCESS
Camel :: Launcher 27.7s SUCCESS
Camel :: JBang :: Plugin :: Validate 24.8s SUCCESS
Camel :: JBang :: MCP 24.1s SUCCESS
Camel :: YAML DSL 21.2s SUCCESS
Camel :: YAML DSL :: Validator 18.6s SUCCESS
Camel :: Catalog :: Camel Catalog 16.5s SUCCESS
Camel :: Component DSL 13.3s SUCCESS
Camel :: Hibernate 10.9s SUCCESS
Camel :: Kamelet Main 10.5s SUCCESS
Camel :: JBang :: Plugin :: Kubernetes 9.1s SUCCESS
Camel :: Docs 8.2s SUCCESS
Camel :: JBang :: Plugin :: Testing 8.1s SUCCESS
Camel :: Catalog :: Camel Report Maven Plugin 7.4s SUCCESS
Camel :: Catalog :: Camel Route Parser 5.3s SUCCESS
Camel :: YAML DSL :: Deserializers 5.2s SUCCESS
Camel :: All Components Sync point 4.0s SUCCESS
Camel :: YAML DSL :: Validator Maven Plugin 2.2s SUCCESS
Camel :: Catalog :: Maven 2.1s SUCCESS
Camel :: YAML DSL :: Maven Plugins 1.9s SUCCESS
Camel :: Catalog :: Suggest (deprecated) 1.8s SUCCESS
Camel :: JBang :: Integration tests 1.3s SUCCESS
Camel :: Assembly 1.2s SUCCESS
Camel :: Coverage 1.1s SUCCESS
Camel :: Endpoint DSL :: Support 1.0s SUCCESS
Camel :: Catalog :: Dummy Component 1.0s SUCCESS
Camel :: JBang :: Plugin :: Generate 0.9s SUCCESS
Camel :: JBang :: Plugin :: Edit 0.8s SUCCESS
Camel :: Catalog :: Console 0.7s SUCCESS
Camel :: Launcher :: Container 0.6s SUCCESS
Camel :: JBang :: Main 0.5s SUCCESS
Camel :: JBang :: Plugin :: MCP 0.5s SUCCESS
Camel :: Endpoint DSL n/a
Camel :: Integration Tests n/a
Camel :: JBang :: Core n/a

Top 20 slowest modules:

  • Camel :: JBang :: Plugin :: TUI (56.7s)
  • Camel :: Launcher (27.7s)
  • Camel :: JBang :: Plugin :: Validate (24.8s)
  • Camel :: JBang :: MCP (24.1s)
  • Camel :: YAML DSL (21.2s)
  • Camel :: YAML DSL :: Validator (18.6s)
  • Camel :: Catalog :: Camel Catalog (16.5s)
  • Camel :: Component DSL (13.3s)
  • Camel :: Hibernate (10.9s)
  • Camel :: Kamelet Main (10.5s)
  • Camel :: JBang :: Plugin :: Kubernetes (9.1s)
  • Camel :: Docs (8.2s)
  • Camel :: JBang :: Plugin :: Testing (8.1s)
  • Camel :: Catalog :: Camel Report Maven Plugin (7.4s)
  • Camel :: Catalog :: Camel Route Parser (5.3s)
  • Camel :: YAML DSL :: Deserializers (5.2s)
  • Camel :: All Components Sync point (4.0s)
  • Camel :: YAML DSL :: Validator Maven Plugin (2.2s)
  • Camel :: Catalog :: Maven (2.1s)
  • Camel :: YAML DSL :: Maven Plugins (1.9s)

⚙️ View full build and test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants