Skip to content

camel-yaml-dsl-validator: fix TextBodyFlowTest after the pulsar body type change (CAMEL-26012) - #29810

Closed
apupier wants to merge 1 commit into
apache:mainfrom
apupier:fix-yaml-validator-pulsar-body-test
Closed

apupier wants to merge 1 commit into
apache:mainfrom
apupier:fix-yaml-validator-pulsar-body-test

Conversation

@apupier

@apupier apupier commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

TextBodyFlowTest.testTheBodyOfMessaging fails on main since #29753 (CAMEL-26012, camel-pulsar: the producer no longer sends a body with Java serialization).

I do not understand the root cause. This PR is created mainly to get things moving so the regression can be investigated, not because I am sure it is the right fix.

What I observed: #29753 added dependsOn = "allowJavaSerializedObject" to the producerIn body type of PulsarEndpoint. The validator no longer reports to: pulsar needs the body as text, bytes, a stream or a file for parsed data sent to pulsar, so the test expecting 4 reports gets 3. My guess is that, since the option can also be set on the component, BodyTypeResolver now treats the body as "not known", but I have not verified whether that is the intended behaviour or whether the catalog entry / resolver should be changed instead.

The change here only removes the pulsar expectation from the test (4 -> 3 reports). If the real fix belongs in the component metadata or in the resolver, please feel free to close this PR in favour of it.

IBM Bob 2.2.1 on behalf of @apupier

…odyFlowTest

The pulsar producer body type now depends on allowJavaSerializedObject (CAMEL-26012), so the validator no longer reports parsed data sent to pulsar.

Co-authored-by: IBM Bob 2.2.1
Signed-off-by: Aurélien Pupier <apupier@ibm.com>
@davsclaus

Copy link
Copy Markdown
Contributor

Thanks for jumping on this. Your guess is right: since #29753 the pulsar producerIn body type dependsOn allowJavaSerializedObject, and as that option can also be set on the component, BodyTypeResolver treats the body as not known when the endpoint does not set it, so the finding is gone.

#29807 (opened a bit earlier, CI running) makes the same test change as this PR, to get main green quickly. The real fix is #29808 (CAMEL-26916, stacked on #29807): an insecure opt-in (security = "insecure:...", such as allowJavaSerializedObject) keeps its default in the validator unless the step sets it, since one turned on for the whole component is reported by the security policy at startup. With it, the pulsar finding comes back and the test expects 4 again.

So I suggest closing this one in favour of #29807 + #29808.

Claude Code on behalf of davsclaus

@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 added the dsl label Nov 13, 2026
@apupier apupier closed this Nov 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-yaml-dsl/camel-yaml-dsl-validator

🔬 Scalpel shadow comparison — Scalpel: 1 of 722 tested, 0 compile-only — current: 7 all tested

Maveniverse Scalpel detected 1 affected modules (current approach: 7).

Skip-tests mode would test 1 modules (1 direct + 0 downstream), skip tests for 0 (generated code, meta-modules)

Modules only in current approach (6)
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-launcher-container
  • camel-yaml-dsl-validator-maven-plugin
Modules Scalpel would test (1)
  • camel-yaml-dsl-validator ← dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/TextBodyFlowTest.java

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

All tested modules (7 modules, 1m 8s total)

Total reactor time: 1m 8s

Module Duration Status
Camel :: YAML DSL :: Validator 30.8s SUCCESS
Camel :: JBang :: Plugin :: Validate 29.1s SUCCESS
Camel :: YAML DSL :: Validator Maven Plugin 3.7s SUCCESS
Camel :: Launcher :: Container 2.9s SUCCESS
Camel :: JBang :: Plugin :: MCP 1.9s SUCCESS
Camel :: JBang :: MCP n/a
Camel :: JBang :: Plugin :: TUI n/a

Top 20 slowest modules:

  • Camel :: YAML DSL :: Validator (30.8s)
  • Camel :: JBang :: Plugin :: Validate (29.1s)
  • Camel :: YAML DSL :: Validator Maven Plugin (3.7s)
  • Camel :: Launcher :: Container (2.9s)
  • Camel :: JBang :: Plugin :: MCP (1.9s)

⚙️ View full build and test results

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

This and #29807 both fix the same TextBodyFlowTest.testTheBodyOfMessaging failure that #29753's pulsar body-type change introduced, and you are right to flag the uncertainty. #29807, from the author of the pulsar change, carries the root cause: pulsar's producerIn now dependsOn allowJavaSerializedObject, so it joins the spring-rabbitmq "decided by a component option" group and drops the marshalling finding, which is why the count goes four to three. Given that, #29807 looks like the one to merge and this can close in its favour, with the regression understood rather than just quieted. Thanks for getting it moving in the meantime.

Claude Code on behalf of oscerd

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants