[ 
https://issues.apache.org/jira/browse/CAMEL-27352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148832#comment-18148832
 ] 

Claus Ibsen edited comment on CAMEL-27352 at 11/21/26, 7:39 PM:
----------------------------------------------------------------

*Plan*

Read-only, as in the description. The migration itself stays with camel update 
run and later Camel Kit.

*What exists*
* Release data: CamelRelease (CAMEL-27351, #30564) has LTS, EOL, newer patch 
and latest release.
* Advisories: SecurityAdvisoryHelper; each advisory has its components and the 
fixed versions per line.
* Libraries: the camelBrings resolution of CAMEL-27351, run at both versions, 
gives the third-party libraries that take a major step (no guessing from 
camel-parent properties).
* Catalog of another version: CatalogLoader.loadCatalog(repos, version, 
download), for what is deprecated or removed in the target.
* Components in use: the USED mapping of the CVE audit (endpoints to Camel 
JARs); in project mode the dependency resolution.

*Gaps*
* The upgrade guides ship only inside the camel-jbang-mcp uber-JAR 
(MigrationData parses them), so the CLI and the view cannot read them.
* camel update run needs a pom.xml: for a plain camel run project the recipes 
do not apply. On a Maven project the --dry-run preview runs on demand only 
(slow).
* camel run --camel-version is blocked when running from camel-launcher, so 
"try it on the target" comes last.

*PRs, in order*
# Upgrade guides as JSON in camel-catalog (see below). The MCP reads them from 
the catalog instead of its own copy.
# camel update check [--to] [--json] [--fail-on=security|eol|any|none], new 
package common.upgrade (UpgradeCheck, UpgradeReport): release, security, 
guides, Java, deprecated/removed components. No network except the target's 
camel-catalog JAR when needed.
# Online: libraries (camelBrings at both versions), CVEs of the libraries the 
target fixes (CVE audit), recipes preview for Maven projects.
# The view (More > Project > Upgrade): one row per check (security, guides, 
components, Java, libraries, recipes, try it) with the state on the version in 
use and on the target, a detail list for the selected check, t cycles the 
target (default: latest patch of the line), Enter/o on guide entries, v to the 
CVE Audit, Shift+F8 plan with AI (no file changes unless the user agrees). 
Help, docs section with a screenshot.
# Later: try it, run on the target next to the version in use and compare 
startup, errors and routes.

*Upgrade guides in the catalog*
A new camel-package-maven-plugin goal, run in the normal camel-catalog build 
like prepare-catalog (the guides live in this repo, unlike releases and 
advisories that come from camel-website), parses 
docs/user-manual/.../camel-4x-upgrade-guide-4_*.adoc into JSON, one file per 
minor plus an index:
{code:json}
{
  "version": "4.19", "from": "4.18", "to": "4.19",
  "title": "camel-kafka",
  "components": ["camel-kafka"],
  "kind": "change",
  "summary": "The Kafka client library has been upgraded from 3.9.1 to 4.2.0.",
  "text": "...the section, as Markdown...",
  "url": 
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_19.html#_camel_kafka";
}
{code}
* from/to come from the == sections, which include the patch releases (== 
Upgrading from 4.18.4 to 4.18.5).
* components from the heading prefix (=== camel-ftp, camel-sftp - ...), checked 
against the catalog's artifact names; a nested ==== under a heading without a 
component (=== Spring Boot 4.2) becomes its own entry; the bullet list under 
"Removed deprecated components" gives kind removed. Kinds: change, deprecated, 
removed, promoted, library.
* Today 1702 of the 1791 entries in the 4.x guides start with a component; the 
other 89 (Java DSL, YAML DSL, EIPs...) are general entries. The goal warns on a 
heading it cannot place, which also nudges guide authors to the "=== camel-xxx 
- summary" form.
* Size: the 4.x guides are about 2 MB of text, about 610 KB compressed.
* Entries for older LTS lines are added on main (upgrade guide rule for 
backports), so the newest catalog knows the most: the check uses the CLI's own 
catalog, and loads the target's only when the target is newer than the CLI.

*Open*
* Command name: camel update check (next to camel update list and camel update 
run) or a new camel upgrade check.
* The text of a guide entry: converted to Markdown at build time (reads better 
in the terminal and in AI prompts), or the raw AsciiDoc (simpler).

_Claude Code on behalf of Claus Ibsen_



was (Author: davsclaus):
*Plan*

Read-only, as in the description. The migration itself stays with camel update 
run and later Camel Kit.

*What exists*
* Release data: CamelRelease (CAMEL-27351, #30564) has LTS, EOL, newer patch 
and latest release.
* Advisories: SecurityAdvisoryHelper; each advisory has its components and the 
fixed versions per line.
* Libraries: the camelBrings resolution of CAMEL-27351, run at both versions, 
gives the third-party libraries that take a major step (no guessing from 
camel-parent properties).
* Catalog of another version: CatalogLoader.loadCatalog(repos, version, 
download), for what is deprecated or removed in the target.
* Components in use: the USED mapping of the CVE audit (endpoints to Camel 
JARs); in project mode the dependency resolution.

*Gaps*
* The upgrade guides ship only inside the camel-jbang-mcp uber-JAR 
(MigrationData parses them), so the CLI and the view cannot read them.
* camel update run needs a pom.xml: for a plain camel run project the recipes 
do not apply. On a Maven project the --dry-run preview runs on demand only 
(slow).
* camel run --camel-version is blocked when running from camel-launcher, so 
"try it on the target" comes last.

*PRs, in order*
# Upgrade guides as JSON in camel-catalog (see below). The MCP reads them from 
the catalog instead of its own copy.
# camel update check [--to] [--json] [--fail-on=security|eol|any|none], new 
package common.upgrade (UpgradeCheck, UpgradeReport): release, security, 
guides, Java, deprecated/removed components. No network except the target's 
camel-catalog JAR when needed.
# Online: libraries (camelBrings at both versions), CVEs of the libraries the 
target fixes (CVE audit), recipes preview for Maven projects.
# The view (More > Project > Upgrade): one row per check (security, guides, 
components, Java, libraries, recipes, try it) with the state on the version in 
use and on the target, a detail list for the selected check, t cycles the 
target (default: latest patch of the line), Enter/o on guide entries, v to the 
CVE Audit, Shift+F8 plan with AI (no file changes unless the user agrees). 
Help, docs section with a screenshot.
# Later: try it, run on the target next to the version in use and compare 
startup, errors and routes.

*Upgrade guides in the catalog*
A new camel-package-maven-plugin goal, run in the normal camel-catalog build 
like prepare-catalog (the guides live in this repo, unlike releases and 
advisories that come from camel-website), parses 
docs/user-manual/.../camel-4x-upgrade-guide-4_*.adoc into JSON, one file per 
minor plus an index:
{code:json}
{
  "version": "4.19", "from": "4.18", "to": "4.19",
  "title": "camel-kafka",
  "components": ["camel-kafka"],
  "kind": "change",
  "summary": "The Kafka client library has been upgraded from 3.9.1 to 4.2.0.",
  "text": "...the section, as Markdown...",
  "url": 
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_19.html#_camel_kafka";
}
{code}
* from/to come from the == sections, which include the patch releases (== 
Upgrading from 4.18.4 to 4.18.5).
* components from the heading prefix (=== camel-ftp, camel-sftp - ...), checked 
against the catalog's artifact names; a nested ==== under a heading without a 
component (=== Spring Boot 4.2) becomes its own entry; the bullet list under 
"Removed deprecated components" gives kind removed. Kinds: change, deprecated, 
removed, promoted, library.
* Today 1702 of the 1791 entries in the 4.x guides start with a component; the 
other 89 (Java DSL, YAML DSL, EIPs...) are general entries. The goal warns on a 
heading it cannot place, which also nudges guide authors to the "=== camel-xxx 
- summary" form.
* Size: the 4.x guides are about 2 MB of text, about 610 KB compressed.
* Entries for older LTS lines are added on main (upgrade guide rule for 
backports), so the newest catalog knows the most: the check uses the CLI's own 
catalog, and loads the target's only when the target is newer than the CLI.

_Claude Code on behalf of Claus Ibsen_


> camel-jbang - upgrade view and command showing the state of upgrading an 
> integration to a newer Camel release
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27352
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27352
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> A new view in camel-jbang (and a CLI command) that shows the state of 
> upgrading an integration to a newer Camel release. It is read-only: it 
> gathers the facts an upgrade needs, and the actual migration stays with camel 
> update run (OpenRewrite recipes) and later Camel Kit.
> *Where you are*
> * Camel version in use, LTS or not, EOL date, days since release, the latest 
> patch of the same line, the latest LTS, the latest release, and the JDK each 
> needs (camel-releases.json of the catalog). The target defaults to the latest 
> patch of the line, and can be changed to any newer release.
> *Why move*
> * The Apache Camel security advisories that affect the version in use, and 
> the release that fixes each (SecurityAdvisoryHelper, as in the CVE audit).
> * CVEs of Camel-managed third-party libraries that the target release fixes.
> *What breaks*
> * The upgrade guide entries between the version in use and the target, 
> filtered to the components the routes use (the guides have a section per 
> component).
> * Components the integration uses that are deprecated or removed in the 
> target (for example pipes, removed in 4.24).
> * A changed JDK minimum (4.24 needs Java 21).
> * Third-party libraries the integration relies on whose version takes a major 
> step between the two camel-parent POMs (for example kafka-clients 3.x to 4.x).
> *What camel update would change*
> * The recipes that apply between the two versions (camel update list), as a 
> preview.
> *Try it*
> * Run the integration on the target version (camel run --camel-version=X) 
> next to the one in use, and compare startup, errors and routes.
> *AI*
> * Shift+F8: plan this upgrade, with the facts above in the prompt. No change 
> to the files unless the user agrees.
> *CLI*
> * The same report as a command, for example camel upgrade check 
> [--to=<version>] [--json], with the CLI exit codes, sharing the code with the 
> view.
> Related: CAMEL-27351, CAMEL-27328, CAMEL-27340.
> _Claude Code on behalf of Claus Ibsen_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to