You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/08/25 08:58:51 UTC

[PR] CAMEL-24469: Fix camel-jbang plugin versionCheck crashing PluginHelperTest on 4.22.x [camel]

davsclaus opened a new pull request, #25678:
URL: https://github.com/apache/camel/pull/25678

   Fixes [CAMEL-24469](https://issues.apache.org/jira/browse/CAMEL-24469): `PluginHelperTest` crashes the surefire fork ("The forked VM terminated without properly saying goodbye") on the `camel-4.22.x` branch, breaking **all** builds on that branch.
   
   ## Root cause
   
   `PluginHelper.versionCheck` stripped `-SNAPSHOT` from the current `version` but **not** from the plugin `firstVersion`, then compared them with the string-based `VersionHelper.compare`:
   
   ```
   compare("4.22.1", "4.22.1-SNAPSHOT")
     -> "042201" vs "04221-SNAPSHOT"
     -> position 4: '0' (48) < '1' (49) -> negative -> isGE == false
   ```
   
   So a plugin whose `firstVersion` equals the current SNAPSHOT release was rejected, invoking `main.quit(1)` — which is `System.exit` on the real `CamelJBangMain` and crashes the test fork.
   
   This is **branch-specific**: on `main` (patch `.0`, e.g. `4.23.0-SNAPSHOT`) the same string comparison happens to sort `>= 0`, so the fork survives. On `4.22.x` (patch `.1`) it does not.
   
   ## Fix
   
   Strip `-SNAPSHOT` from `firstVersion` as well before comparing. Added two regression tests in `PluginHelperTest`:
   - `testVersionCheckAcceptsSameSnapshotVersion` — same SNAPSHOT release must be accepted (the regression)
   - `testVersionCheckRejectsOlderVersion` — a build older than the plugin's `firstVersion` is still rejected
   
   ## Verification
   
   `PluginHelperTest` — 11 tests pass on JDK 21, no fork crash (previously crashed at startup).
   
   ---
   _Fix prepared by Claude Code on behalf of davsclaus_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24469: Fix camel-jbang plugin versionCheck crashing PluginHelperTest on 4.22.x [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25678:
URL: https://github.com/apache/camel/pull/25678#issuecomment-5409029658

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `dsl/camel-jbang/camel-jbang-core`
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 7 tested, 8 compile-only — current: 6 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **15 affected modules** (current approach: 6).
   
   <details><summary>:warning: Modules only in Scalpel (9)</summary>
   
   - `camel-jbang-core`
   - `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`
   
   </details>
   
   **Skip-tests mode would test 7 modules** (1 direct + 6 downstream), **skip tests for 8** (generated code, meta-modules)
   
   <details><summary>Modules Scalpel would test (7)</summary>
   
   - `camel-jbang-core`
   - `camel-jbang-mcp`
   - `camel-jbang-plugin-mcp`
   - `camel-jbang-plugin-route-parser`
   - `camel-jbang-plugin-tui`
   - `camel-jbang-plugin-validate`
   - `camel-launcher-container`
   
   </details>
   
   <details><summary>Modules with tests skipped (8)</summary>
   
   - `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`
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   :warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
   
   - `dsl/camel-jbang/camel-jbang-core`: 1 test(s) disabled on GitHub Actions
   
   :bulb: **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
   > ```
   
   <details><summary>All tested modules (15 modules)</summary>
   
   - Camel :: Coverage
   - Camel :: JBang :: Core
   - Camel :: JBang :: Integration tests
   - Camel :: JBang :: MCP
   - Camel :: JBang :: Main
   - Camel :: JBang :: Plugin :: Edit
   - Camel :: JBang :: Plugin :: Generate
   - Camel :: JBang :: Plugin :: Kubernetes
   - Camel :: JBang :: Plugin :: MCP
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: JBang :: Plugin :: Testing
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: Launcher
   - Camel :: Launcher :: Container
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/32829457664)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24469: Fix camel-jbang plugin versionCheck crashing PluginHelperTest on 4.22.x [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #25678:
URL: https://github.com/apache/camel/pull/25678


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24469: Fix camel-jbang plugin versionCheck crashing PluginHelperTest on 4.22.x [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25678:
URL: https://github.com/apache/camel/pull/25678#issuecomment-5408484572

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: 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](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org