Skip to content

CAMEL-26108: camel-avro-rpc - the component should configure all options on the endpoint - #28360

Merged
orpiske merged 2 commits into
apache:mainfrom
orpiske:camel-26108
Oct 26, 2026
Merged

orpiske merged 2 commits into
apache:mainfrom
orpiske:camel-26108

Conversation

@orpiske

@orpiske orpiske commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Just making sure we set all options on the endpoint.

Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com

@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

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • components/camel-avro-rpc/camel-avro-rpc-component
  • components/camel-avro-rpc/camel-avro-rpc-jetty
  • components/camel-avro-rpc/camel-avro-rpc-spi
  • docs

🔁 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: 10 of 707 tested, 26 compile-only — current: 10 all tested

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

Skip-tests mode would test 10 modules (4 direct + 7 downstream), skip tests for 26 (generated code, meta-modules)

Modules Scalpel would test (10)
  • camel-avro-rpc ← components/camel-avro-rpc/camel-avro-rpc-component/src/main/java/org/apache/camel/component/avro/AvroListener.java, components/camel-avro-rpc/camel-avro-rpc-component/src/test/java/org/apache/camel/component/avro/AvroHttpConsumerHostTest.java
  • camel-avro-rpc-jetty ← components/camel-avro-rpc/camel-avro-rpc-jetty/src/main/java/org/apache/camel/component/avro/spi/JettyHttpServerFactory.java
  • camel-avro-rpc-spi ← components/camel-avro-rpc/camel-avro-rpc-spi/src/main/java/org/apache/camel/component/avro/spi/AvroRpcHttpServerFactory.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 (26)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-endpointdsl
  • 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
  • dummy-component

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

All tested modules (37 modules, 6m 5s total)

Total reactor time: 6m 5s

Module Duration Status
Camel :: Launcher 54.1s SUCCESS
Camel :: JBang :: MCP 46.5s SUCCESS
Camel :: JBang :: Plugin :: Validate 30.8s SUCCESS
Camel :: YAML DSL :: Validator 26.9s SUCCESS
Camel :: YAML DSL 24.3s SUCCESS
Camel :: Catalog :: Camel Catalog 23.8s SUCCESS
Camel :: Component DSL 21.0s SUCCESS
Camel :: Kamelet Main 20.2s SUCCESS
Camel :: JBang :: Plugin :: Testing 18.1s SUCCESS
Camel :: JBang :: Plugin :: Kubernetes 15.3s SUCCESS
Camel :: Docs 15.0s SUCCESS
Camel :: Assembly 10.5s SUCCESS
Camel :: YAML DSL :: Deserializers 9.2s SUCCESS
Camel :: Catalog :: Camel Route Parser 8.4s SUCCESS
Camel :: Catalog :: Camel Report Maven Plugin 7.8s SUCCESS
Camel :: All Components Sync point 5.2s SUCCESS
Camel :: YAML DSL :: Validator Maven Plugin 4.3s SUCCESS
Camel :: Avro RPC :: Spi 3.9s SUCCESS
Camel :: YAML DSL :: Maven Plugins 3.4s SUCCESS
Camel :: Catalog :: Maven 3.0s SUCCESS
Camel :: Catalog :: Suggest (deprecated) 2.2s SUCCESS
Camel :: Avro RPC :: Jetty 1.5s SUCCESS
Camel :: Coverage 1.3s SUCCESS
Camel :: JBang :: Plugin :: Edit 1.2s SUCCESS
Camel :: JBang :: Integration tests 1.1s SUCCESS
Camel :: JBang :: Plugin :: Generate 1.1s SUCCESS
Camel :: JBang :: Plugin :: MCP 1.0s SUCCESS
Camel :: Catalog :: Console 0.9s SUCCESS
Camel :: Catalog :: Dummy Component 0.8s SUCCESS
Camel :: Launcher :: Container 0.8s SUCCESS
Camel :: JBang :: Main 0.8s SUCCESS
Camel :: Endpoint DSL :: Support 0.7s SUCCESS
Camel :: Avro RPC n/a
Camel :: Endpoint DSL n/a
Camel :: Integration Tests n/a
Camel :: JBang :: Core n/a
Camel :: JBang :: Plugin :: TUI n/a

Top 20 slowest modules:

  • Camel :: Launcher (54.1s)
  • Camel :: JBang :: MCP (46.5s)
  • Camel :: JBang :: Plugin :: Validate (30.8s)
  • Camel :: YAML DSL :: Validator (26.9s)
  • Camel :: YAML DSL (24.3s)
  • Camel :: Catalog :: Camel Catalog (23.8s)
  • Camel :: Component DSL (21.0s)
  • Camel :: Kamelet Main (20.2s)
  • Camel :: JBang :: Plugin :: Testing (18.1s)
  • Camel :: JBang :: Plugin :: Kubernetes (15.3s)
  • Camel :: Docs (15.0s)
  • Camel :: Assembly (10.5s)
  • Camel :: YAML DSL :: Deserializers (9.2s)
  • Camel :: Catalog :: Camel Route Parser (8.4s)
  • Camel :: Catalog :: Camel Report Maven Plugin (7.8s)
  • Camel :: All Components Sync point (5.2s)
  • Camel :: YAML DSL :: Validator Maven Plugin (4.3s)
  • Camel :: Avro RPC :: Spi (3.9s)
  • Camel :: YAML DSL :: Maven Plugins (3.4s)
  • Camel :: Catalog :: Maven (3.0s)

⚙️ View full build and test results

@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. Clean bug fix that passes the configured host to the HTTP server factory, making avro:http behave consistently with avro:netty. The SPI default method provides correct backward compatibility — existing custom factories silently fall back to binding all interfaces (matching prior behavior). The test is sound, and the upgrade guide accurately documents the behavior change.

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

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

Two nits worth addressing before merge:

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

Comment thread docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc Outdated

@davsclaus davsclaus 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.

The change is the same one I approved before (rebase only): AvroListener passes the endpoint host to AvroRpcHttpServerFactory.create(responder, host, port), so avro:http binds like avro:netty, and the default method in the SPI keeps existing custom factories working.

The red build (21, false) is main's SourceSizeTest (SourceTab.java 2007 lines), fixed on main by #28419; all the avro-rpc tests passed in that run. The branch now conflicts with main in camel-4x-upgrade-guide-4_24.adoc, so GitHub cannot update it — could you rebase onto main? That also gets CI green. While there, drop the trailing space at the end of the new upgrade-guide line.


Reviewed with Claude Code on behalf of @davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

@orpiske

orpiske commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Yeah, it's conflicting quite often on the documentation, but I don't have time to sort it out during the weekend

…ons on the endpoint

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

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

Following up on my earlier review — neither nit has been addressed after the rebase.

  • Trailing whitespace in the upgrade guide — still present
  • Test skip risk (assumeTrue/findNonLoopbackAddress) — still present

The core fix remains correct. Address the two nits before merge.

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

Comment thread docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc Outdated

@oscerd oscerd 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.

Thanks for this — the fix is correct and nicely minimal.

AvroListener.createServer now passes configuration.getHost() into the factory, and the new AvroRpcHttpServerFactory.create(SpecificResponder, String, int) default method keeps backward compatibility (it ignores the host and delegates to the old overload), while the Jetty factory overrides it to actually bind the host — so the avro:http consumer now honours the endpoint host exactly as the avro:netty consumer already did. The @since 4.24 tag and the upgrade-guide note for the new SPI method are good touches, and AvroHttpConsumerHostTest covers the "listens on the configured host only" behaviour (nicely guarded with assumeTrue when no non-loopback address is available).

Non-blocking:

  • The failing build (21, false) is unrelated to this change — it's the camel-jbang SourceSizeTest failure on main, which was already fixed and merged in #28419. A rebase onto current main should clear the red check (and resolve the upgrade-guide hunk at the same time).

Already approved by a committer; just the rebase to get CI green.

Claude Code on behalf of oscerd

Use 127.0.0.2 in the test instead of looking up a non-loopback address, so it always runs, and remove trailing whitespace in the upgrade guide.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@davsclaus davsclaus 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.

Thanks @orpiske, both points are handled. AvroHttpConsumerHostTest now compares 127.0.0.1 with 127.0.0.2 without the assumeTrue, and in CI it ran rather than being skipped. The trailing space in the upgrade guide is gone too. The fix itself is unchanged: AvroListener passes the endpoint host to AvroRpcHttpServerFactory.create(responder, host, port), and the default method keeps existing factories working. CI is green.

One tiny optional nit: the commit leaves an extra empty line at the end of camel-4x-upgrade-guide-4_24.adoc (git diff --check reports a new blank line at EOF). LGTM.


Reviewed with Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

@orpiske
orpiske merged commit aa2c0c3 into apache:main Oct 26, 2026
7 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.

5 participants