G
YouTube TikTok Games
Skip to content

CAMEL-26929: camel-jbang - the JSON of the listings: a pid is a number, the rows say their integration, and get about is a list - #29937

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

davsclaus wants to merge 1 commit into
mainfrom
CAMEL-26929-json-shape

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Item 5 of CAMEL-26929 (JSON and output), the parts about the shape of the JSON. The ANSI codes in piped output are in #29924 (no ANSI codes when stdout is not a terminal).

Problems and changes

  • pid was text in the JSON of camel cmd trace (status), camel cmd browse and camel cmd logger, and a number elsewhere. It is a number, with JsonValues.pid as in the other listings (now public, for the action commands). The JSON of these three commands is new in 4.24, so no released output changes. camel cmd stub had a number already.
  • The rows of camel get error --json, camel get history --json and camel top source --json did not say which integration they are of. They start with pid and name now, as the other listings; the rest of the row is as before.
  • camel get about --json was an object for one integration and a list for more. It is a list, also for one. Its JSON is new in 4.24.
  • --sort=age of camel get route and camel get route-group sorted the youngest first, the opposite of the listings of the integrations: those sort by when the integration started, and the uptime of a route is how long it runs. The routes now sort the oldest first too. The Javadoc of RowSort.integration said "how long the integration runs" while its callers pass the start time, and now says so.

The JSON section of the exit codes page (camel-jbang-exit-codes.adoc) says that a list is a list also for one integration, and that a row of a listing has pid (a number) and name.

Not in this PR: uptime stays a duration in the JSON of get route and get route-group (it is so since 4.23, and the TUI reads it), and "name is the file name in the action commands and the short name in the listings" needs its own look; cmd send and the trace dump have no --json yet.

Tests

  • ListErrorTest.testJsonOutput, CamelHistoryActionTest.testJsonOutputIsTheRecordedHistory, CamelSourceTopTest.jsonHasTheNumbersAndTheCode: the rows have the pid and the name.
  • CamelTraceActionTest.statusAsJson: the pid is a number.
  • ListAboutTest.asJson: a list of one.
  • CamelRouteStatusTest.sortByAgeIsTheOldestFirst (new): a route that runs for 2 hours comes before one that runs for 5 seconds.
  • All six fail without the change.
  • camel-jbang-run: 303 pass. camel-jbang-core: 3003 + 259 pass (5 cases of ExportTest failed once and passed on the rerun, as on other branches).

Claude Code on behalf of davsclaus

🤖 Generated with Claude Code

…r, the rows say their integration, and get about is a list

The pid was text in the JSON of trace, browse and logger; the rows of get error, get history and
top source had no pid or name; get about --json was an object for one integration and a list for
more; and --sort=age of get route and get route-group sorted the youngest first, the opposite of
the listings of the integrations.

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 dsl labels Nov 14, 2026
@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

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

🧪 CI tested the following changed modules:

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

🔬 Scalpel shadow comparison — Scalpel: 5 of 726 tested, 8 compile-only — current: 5 all tested

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

Skip-tests mode would test 5 modules (2 direct + 5 downstream), skip tests for 8 (generated code, meta-modules)

Modules Scalpel would test (5)
  • 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-launcher-container ← downstream of org.apache.camel:camel-launcher
Modules with tests skipped (8)
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-launcher
  • coverage

ℹ️ 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 (15 modules, 2m 17s total)

Total reactor time: 2m 17s

Module Duration Status
Camel :: JBang :: MCP 51.5s SUCCESS
Camel :: JBang :: Plugin :: Validate 24.6s SUCCESS
Camel :: Docs 17.6s SUCCESS
Camel :: JBang :: Plugin :: Kubernetes 17.0s SUCCESS
Camel :: JBang :: Plugin :: Testing 12.2s SUCCESS
Camel :: JBang :: Plugin :: Generate 5.6s SUCCESS
Camel :: JBang :: Plugin :: MCP 2.3s SUCCESS
Camel :: Coverage 1.8s SUCCESS
Camel :: JBang :: Plugin :: Edit 1.8s SUCCESS
Camel :: JBang :: Integration tests 1.3s SUCCESS
Camel :: JBang :: Main 0.9s SUCCESS
Camel :: Launcher :: Container 0.7s SUCCESS
Camel :: JBang :: Core n/a
Camel :: JBang :: Plugin :: TUI n/a
Camel :: Launcher n/a

Top 20 slowest modules:

  • Camel :: JBang :: MCP (51.5s)
  • Camel :: JBang :: Plugin :: Validate (24.6s)
  • Camel :: Docs (17.6s)
  • Camel :: JBang :: Plugin :: Kubernetes (17.0s)
  • Camel :: JBang :: Plugin :: Testing (12.2s)
  • Camel :: JBang :: Plugin :: Generate (5.6s)
  • Camel :: JBang :: Plugin :: MCP (2.3s)
  • Camel :: Coverage (1.8s)
  • Camel :: JBang :: Plugin :: Edit (1.8s)
  • Camel :: JBang :: Integration tests (1.3s)
  • Camel :: JBang :: Main (0.9s)
  • Camel :: Launcher :: Container (0.7s)

⚙️ 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 docs dsl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants