Skip to content

CAMEL-23300: add connectionString option to camel-couchbase endpoint#22494

Merged
Croway merged 1 commit intomainfrom
ci-issue-CAMEL-23300
Apr 8, 2026
Merged

CAMEL-23300: add connectionString option to camel-couchbase endpoint#22494
Croway merged 1 commit intomainfrom
ci-issue-CAMEL-23300

Conversation

@Croway
Copy link
Copy Markdown
Contributor

@Croway Croway commented Apr 8, 2026

Summary

  • Add connectionString endpoint option to camel-couchbase so users can pass a full Couchbase SDK connection string (e.g., couchbase://host:port), enabling connections when the KV port is not the default 11210
  • Switch test-infra Couchbase container from hardcoded fixed ports to isFixedPort(), so tests use random ports by default (fixed ports only when camel.infra.fixedPort=true for Camel JBang)
  • Update integration tests to pass connectionString from the test service

Test plan

  • camel-couchbase compiles successfully
  • 3/3 producer integration tests pass with random ports (-Dcouchbase-7)
  • Backwards compatible: when connectionString is not set, behavior is unchanged

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

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

@davsclaus
Copy link
Copy Markdown
Contributor

Is the problem only related to a port number? I wonder if you can use port = 0, to indicate a non default port, if that was the case. Also the description for connection string includes a port number in the example but the text says its needed when you do not have a port number for dynamic assigned port.

So maybe we can allow to use :0 as port number if you want a dynamic port, and then don't need to add a new parameter. And the new parameter is also not tooling friendly.

@Croway
Copy link
Copy Markdown
Contributor Author

Croway commented Apr 8, 2026

I faced an issue in camel-kafka-connectors test, and noticed that couchbase is not starting on a default port during tests. The test infra is configured to always start couch base on the default ports due to camel-couchbase limitation.

In this PR I am removing that limitation (it is now possible to define a connection string), and I am updating the test-infra to start couchbase on a random port (as expected).

This way, the tests in camel-kafka-connectors should be successful... hopefully!

The component passed only hostnames to Cluster.connect(), causing the
SDK to default the KV port to 11210. This made it impossible to connect
when the KV port is dynamically mapped (e.g., testcontainers with random
ports). The new connectionString option allows passing a full SDK
connection string (e.g., couchbase://host:port) that takes precedence
over hostname extraction.

Also switch test-infra Couchbase container to use random ports by
default (via isFixedPort) instead of hardcoded fixed ports, and update
integration tests to pass the connectionString.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-couchbase
  • dsl/camel-endpointdsl
  • test-infra/camel-test-infra-couchbase

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • components/camel-couchbase: 6 test(s) disabled on GitHub Actions
All tested modules (7 modules)
  • Camel :: Couchbase
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

@Croway Croway merged commit 6c2f458 into main Apr 8, 2026
6 checks passed
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