Skip to content

CAMEL-26012: camel-yaml-dsl-validator - TextBodyFlowTest no longer expects a pulsar finding - #29807

Merged
davsclaus merged 1 commit into
mainfrom
CAMEL-26012-yaml-validator-pulsar
Nov 13, 2026
Merged

davsclaus merged 1 commit into
mainfrom
CAMEL-26012-yaml-validator-pulsar

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Description

Fixes TextBodyFlowTest.testTheBodyOfMessaging on main, which fails on every PR whose build runs camel-yaml-dsl-validator (seen on #29594 and #29706).

Since #29753 (CAMEL-26012) the producerIn body type of pulsar has dependsOn: [allowJavaSerializedObject], and that option exists on the component as well as on the endpoint. BodyTypeResolver treats a dependsOn option that the step does not set, but that can be set elsewhere, as not known, so the validator says nothing about the body a route sends to pulsar, as it already does for spring-rabbitmq. The test still expected the to: pulsar needs the body as text, bytes, a stream or a file finding (4 findings, CI found 3).

The test now expects 3 findings and asserts that the pulsar route is not reported; smtp and google-pubsub keep covering a producer that needs text.

#29753's own build and the main build passed because neither ran this module.

Whether options such as allowJavaSerializedObject should be endpoint-only, so they cannot be switched on for a whole component (which would also bring the pulsar finding back), is checked separately.

Testing

Claude Code on behalf of davsclaus

🤖 Generated with Claude Code

…pects a pulsar finding

Since #29753 the pulsar producer body depends on allowJavaSerializedObject, an option
that may also be set on the component. The validator then does not know the body a
route sends to pulsar, and says nothing, as it does for spring-rabbitmq. The test
still expected the "to: pulsar needs the body as text" finding, and failed on every
PR whose build runs camel-yaml-dsl-validator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
@davsclaus davsclaus added this to the 4.24.0 milestone Nov 13, 2026
@davsclaus davsclaus added the test label Nov 13, 2026
@davsclaus davsclaus self-assigned this Nov 13, 2026

@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. No issues found.

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 github-actions Bot added the dsl label Nov 13, 2026
@davsclaus
davsclaus merged commit 690edf3 into main Nov 13, 2026
6 checks passed
@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 9s total)

Total reactor time: 1m 9s

Module Duration Status
Camel :: JBang :: Plugin :: Validate 30.7s SUCCESS
Camel :: YAML DSL :: Validator 30.7s SUCCESS
Camel :: YAML DSL :: Validator Maven Plugin 3.6s SUCCESS
Camel :: JBang :: Plugin :: MCP 2.3s SUCCESS
Camel :: Launcher :: Container 2.0s SUCCESS
Camel :: JBang :: MCP n/a
Camel :: JBang :: Plugin :: TUI n/a

Top 20 slowest modules:

  • Camel :: JBang :: Plugin :: Validate (30.7s)
  • Camel :: YAML DSL :: Validator (30.7s)
  • Camel :: YAML DSL :: Validator Maven Plugin (3.6s)
  • Camel :: JBang :: Plugin :: MCP (2.3s)
  • Camel :: Launcher :: Container (2.0s)

⚙️ View full build and test results

@davsclaus
davsclaus deleted the CAMEL-26012-yaml-validator-pulsar branch November 13, 2026 09:11

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

Reviewed as the root-cause fix for the TextBodyFlowTest regression, and it is the right one.

testTheBodyOfMessaging started failing on every build that runs camel-yaml-dsl-validator because #29753 gave pulsar's producerIn a dependsOn: [allowJavaSerializedObject], and that option exists on both the component and the endpoint. That moves pulsar out of the group the test counted as "parsed data must be marshalled first" and into the same bucket as spring-rabbitmq, where a component option decides the behaviour and the body type says nothing definite. So the finding count going from four to three, and the comment rewrite that puts pulsar next to spring-rabbitmq's "may be set on the component", is the accurate description of what the resolver now sees, not just a number bumped to make the test pass.

Since you own the pulsar change this follows from, the reading of why the finding dropped is authoritative. Worth noting #29810 is a second fix for the same failure, and its author says plainly it is a stopgap without the root cause; this one has the cause, so it is the one to take and that can close in its favour. Clean.

Claude Code on behalf of oscerd

davsclaus added a commit that referenced this pull request Nov 13, 2026
…e set on the component keeps its default when reading the body (#29808)

The YAML validator treated a body type that depends on an option the route does not set, but that can be set on the component, as not known, and said nothing. For the insecure opt-ins (security insecure:ssl, insecure:serialization or insecure:dev) that made it go quiet where it should not: pulsar (allowJavaSerializedObject), jms/activemq/activemq6/amqp (transferExchange, objectMessageEnabled), sjms/sjms2 (objectMessageEnabled), mina (transferExchange, objectCodecPattern), netty (transferExchange), keycloak/spiffe (allowOperationHeader).

Such an option is off unless turned on, and one turned on for the whole component is reported by the security policy at startup, so CatalogBodyTypes.componentSide() no longer counts it as "can be set elsewhere": it keeps its default unless the route sets it.

- BodyTypeResolver documents it on the hidden parameter, and body-types.adoc states the rule.
- TextBodyFlowTest expects the pulsar finding again (dropped by #29807), and testTheBodyOfAnInsecureOptIn checks that a route leaving allowJavaSerializedObject alone is reported and one turning it on is not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
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.

3 participants