G
YouTube TikTok Games
Skip to content

CAMEL-26929: camel-jbang - camel cmd receive --since filters, --output=json has only JSON, and an endpoint that matches nothing is not found - #29936

Open
davsclaus wants to merge 1 commit into
mainfrom
CAMEL-26929-receive
Open

davsclaus wants to merge 1 commit into
mainfrom
CAMEL-26929-receive

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Part of item 4 of CAMEL-26929: camel cmd receive.

Problems and changes

  • --since never filtered. The receive console recorded the message timestamp, which is 0 for most components, and the CLI keeps a message without a timestamp. ReceiveDevConsole (camel-console) now records the time the exchange was created when the message has no timestamp.
  • --action=stop said "Starting to receive messages ...". It says "Stopping to receive messages ...".
  • The JSON stream of --output=json started with "Starting to receive ..." on stdout. With --output=json, that line goes to stderr, so stdout has only the JSON.
  • --action=status --output=json printed the table. It prints a JSON list: pid (a number), name, uptime, enabled, total, firstTimestamp and lastTimestamp (when known), and endpoint (masked with --mask, as in the table).
  • A start with an endpoint that matches nothing exited 0. The integration answers with the URL of the endpoint it receives from; without one, the CLI prints "No endpoint matching: " on stderr and exits 3. Older Camel versions answer the same way, so this works against them too.

The 4.24 upgrade guide has a line in the exit codes entry.

Tests

  • ReceiveDevConsoleTest.testAMessageWithoutTimestampHasTheTimeItWasReceived (camel-console, a real direct endpoint): the timestamp is the time of the send. It was 0 without the change.
  • CamelReceiveActionTest: stop says "Stopping"; --endpoint=nope* that the integration finds nothing for exits 3; --endpoint=... --output=json has only JSON lines on stdout and the start line on stderr; --action=status --output=json is a list with the pid as a number and the password masked. endpointStartsReceivingAndDumpsTheMessages now answers with a URL, as the integration does.
  • camel-console: 292 pass. camel-jbang-run: 303. camel-jbang-core: 3005 + 259 pass.

Claude Code on behalf of davsclaus

🤖 Generated with Claude Code

…t=json has only JSON, and an endpoint that matches nothing is not found

The receive console took the message timestamp, which is 0 for most components, so --since
never filtered: it falls back to the time the exchange was created. --action=status
--output=json printed the table, the JSON stream started with 'Starting to receive ...' on
stdout, --action=stop said 'Starting to receive', and a start with an endpoint that matched
nothing exited 0.

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 14, 2026
@davsclaus davsclaus added bug Something isn't working core dsl labels Nov 14, 2026
@gnodet

gnodet commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

🔄 Backport Bot

This bugfix targets main and may need porting to:

  • camel-4.22.x

Add a port/<branch> label to automatically create a backport PR for that branch.

Backport PRs will be created automatically on merge (once a port label is added). Comment /port to create them immediately.

ℹ️ If you push additional commits after /port, use /port again to update the port PRs.

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

@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, well-tested fix across three concerns: timestamp fallback for --since filtering, JSON-only stdout in --output=json mode, and exit code 3 for no matching endpoint. All guards are correct, JSON/text parity is maintained, and all three behavior changes are covered by tests.

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

@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • core/camel-console
  • docs
  • dsl/camel-jbang/camel-jbang-core

🔬 Scalpel shadow comparison — Scalpel: 19 of 726 tested, 25 compile-only — current: 19 all tested

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

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

Modules Scalpel would test (19)
  • camel-cli-connector ← downstream of org.apache.camel:camel-console
  • camel-cli-debug ← downstream of org.apache.camel:camel-cli-connector
  • camel-console ← core/camel-console/src/main/java/org/apache/camel/impl/console/ReceiveDevConsole.java, core/camel-console/src/test/java/org/apache/camel/impl/console/ReceiveDevConsoleTest.java
  • camel-core-all ← downstream of org.apache.camel:camel-console
  • camel-diagram ← downstream of org.apache.camel:camel-console
  • camel-jbang-console ← downstream of org.apache.camel:camel-console
  • camel-jbang-mcp ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-mcp ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-tui ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-validate ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-run ← downstream of org.apache.camel:camel-kamelet-main
  • camel-launcher-container ← downstream of org.apache.camel:camel-launcher
  • camel-mcp-server ← downstream of org.apache.camel:camel-platform-http-main
  • camel-micrometer-prometheus ← downstream of org.apache.camel:camel-platform-http-main
  • camel-oauth ← downstream of org.apache.camel:camel-platform-http-main
  • camel-observability-services ← downstream of org.apache.camel:camel-micrometer-prometheus
  • camel-platform-http-main ← downstream of org.apache.camel:camel-console
  • 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
  • camel-catalog-console
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • 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

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

  • dsl/camel-jbang/camel-jbang-core: 2 test(s) disabled on GitHub Actions

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-jbang-core. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
All tested modules (46 modules, 7m 23s total)

Total reactor time: 7m 23s

Module Duration Status
Camel :: DSL :: CLI Connector 55.3s SUCCESS
Camel :: AI :: MCP Server 50.6s SUCCESS
Camel :: JBang :: MCP 40.6s SUCCESS
Camel :: JBang :: Plugin :: TUI 39.7s SUCCESS
Camel :: Console 26.4s SUCCESS
Camel :: JBang :: Plugin :: Validate 22.2s SUCCESS
Camel :: YAML DSL :: Validator 20.9s SUCCESS
Camel :: YAML DSL 20.7s SUCCESS
Camel :: OAuth 20.5s SUCCESS
Camel :: JBang :: Run 16.3s SUCCESS
Camel :: Catalog :: Camel Catalog 15.0s SUCCESS
Camel :: Component DSL 13.2s SUCCESS
Camel :: Docs 10.3s SUCCESS
Camel :: Kamelet Main 10.1s SUCCESS
Camel :: JBang :: Plugin :: Kubernetes 9.4s SUCCESS
Camel :: Diagram 9.1s SUCCESS
Camel :: JBang :: Plugin :: Testing 8.4s SUCCESS
Camel :: Catalog :: Camel Report Maven Plugin 8.2s SUCCESS
Camel :: Platform HTTP :: Main 7.6s SUCCESS
Camel :: JBang :: Plugin :: Generate 5.2s SUCCESS
Camel :: Catalog :: Camel Route Parser 4.7s SUCCESS
Camel :: YAML DSL :: Deserializers 3.8s SUCCESS
Camel :: Assembly 3.5s SUCCESS
Camel :: All Components Sync point 2.8s SUCCESS
Camel :: YAML DSL :: Validator Maven Plugin 2.5s SUCCESS
Camel :: Catalog :: Maven 1.9s SUCCESS
Camel :: YAML DSL :: Maven Plugins 1.6s SUCCESS
Camel :: Micrometer :: Prometheus 1.5s SUCCESS
Camel :: Coverage 1.5s SUCCESS
Camel :: Catalog :: Suggest (deprecated) 1.3s SUCCESS
Camel :: JBang :: Console 1.1s SUCCESS
Camel :: JBang :: Plugin :: MCP 1.0s SUCCESS
Camel :: JBang :: Plugin :: Edit 0.9s SUCCESS
Camel :: JBang :: Main 0.9s SUCCESS
Camel :: Catalog :: Dummy Component 0.8s SUCCESS
Camel :: JBang :: Integration tests 0.6s SUCCESS
Camel :: DSL :: CLI Debug 0.6s SUCCESS
Camel :: Launcher :: Container 0.6s SUCCESS
Camel :: Observability Services 0.6s SUCCESS
Camel :: Endpoint DSL :: Support 0.5s SUCCESS
Camel :: Catalog :: Console 0.4s SUCCESS
Camel :: All Core Sync point 0.3s SUCCESS
Camel :: Endpoint DSL n/a
Camel :: Integration Tests n/a
Camel :: JBang :: Core n/a
Camel :: Launcher n/a

Top 20 slowest modules:

  • Camel :: DSL :: CLI Connector (55.3s)
  • Camel :: AI :: MCP Server (50.6s)
  • Camel :: JBang :: MCP (40.6s)
  • Camel :: JBang :: Plugin :: TUI (39.7s)
  • Camel :: Console (26.4s)
  • Camel :: JBang :: Plugin :: Validate (22.2s)
  • Camel :: YAML DSL :: Validator (20.9s)
  • Camel :: YAML DSL (20.7s)
  • Camel :: OAuth (20.5s)
  • Camel :: JBang :: Run (16.3s)
  • Camel :: Catalog :: Camel Catalog (15.0s)
  • Camel :: Component DSL (13.2s)
  • Camel :: Docs (10.3s)
  • Camel :: Kamelet Main (10.1s)
  • Camel :: JBang :: Plugin :: Kubernetes (9.4s)
  • Camel :: Diagram (9.1s)
  • Camel :: JBang :: Plugin :: Testing (8.4s)
  • Camel :: Catalog :: Camel Report Maven Plugin (8.2s)
  • Camel :: Platform HTTP :: Main (7.6s)
  • Camel :: JBang :: Plugin :: Generate (5.2s)

⚙️ View full build and test results

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

Labels

bug Something isn't working core docs dsl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants