This is an automated email from the ASF dual-hosted git repository. luigidemasi pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kit.git
commit 90fb3ec8f656a3a890124450bdbfa62c594deee2 Author: Luigi De Masi <[email protected]> AuthorDate: Thu Nov 26 17:08:35 2026 +0100 Fix #195: Select the patched Quarkus platform and check runner availability Use Quarkus platform 3.27.4.1 for Camel 4.14.7 so generated HTTP routes resolve the fix for CVE-2026-50559. Keep the measured catalog results and the release instructions in sync with the distribution. Before deploying Kit snapshots, check for the matching release runner on Maven Central and resolve the pinned classifier with a fresh Maven repository. Report a published replacement or a missing runner while the development pin is in use. Co-authored-by: OpenAI Codex <[email protected]> --- .github/workflows/snapshot.yml | 4 +++ CHANGELOG.md | 3 +- distribution.properties | 2 +- docs/modules/ROOT/pages/mcp.adoc | 2 +- docs/releasing.md | 8 +++++- tools/check_camel_mcp_runner.py | 44 +++++++++++++++++++++++++++++ tools/test_check_camel_mcp_runner.py | 55 ++++++++++++++++++++++++++++++++++++ 7 files changed, 114 insertions(+), 4 deletions(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index ac54f90c..e2f5eda1 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -33,6 +33,10 @@ jobs: server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + - name: Verify the Camel MCP runner before deploying Kit + if: github.event_name == 'schedule' || inputs.target == 'all' || inputs.target == 'kit' + run: python3 tools/check_camel_mcp_runner.py + - name: Deploy snapshot run: | set -euo pipefail diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f371248..3acd5eb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 projects resolve inherited BOM properties per module and can recover a transitive core from Maven's dependency tree. The workflow checks the configured runner before design approval. A core mismatch reports INCOMPLETE. The development distribution uses the Camel MCP 4.22.3-SNAPSHOT runner and maps Camel 4.14.7 to Quarkus - platform 3.27.4. The catalog check passes for all six shipped community targets (#195). + platform 3.27.4.1, which includes the Quarkus HTTP fix for CVE-2026-50559. All six shipped community targets + pass the catalog check (#195). - Graph files now use format 1.1. CLI output such as `graph stats` reports namespaced types (for example `mule:flow`). Existing 1.0 graphs and legacy filters remain readable. diff --git a/distribution.properties b/distribution.properties index f29a0597..a669ec53 100644 --- a/distribution.properties +++ b/distribution.properties @@ -40,7 +40,7 @@ camel.quarkus.supported=4.18.3,4.14.7 # # Maps each supported Camel Quarkus version to its Quarkus platform BOM version. quarkus.platform.4.18.3=3.33.3.2 -quarkus.platform.4.14.7=3.27.4 +quarkus.platform.4.14.7=3.27.4.1 # ─── Spring Boot Framework Mapping ───────────────────────────────────────── # diff --git a/docs/modules/ROOT/pages/mcp.adoc b/docs/modules/ROOT/pages/mcp.adoc index 7fc5820e..dcb501f6 100644 --- a/docs/modules/ROOT/pages/mcp.adoc +++ b/docs/modules/ROOT/pages/mcp.adoc @@ -110,7 +110,7 @@ Camel core and the version of the runtime's timer artifact. |Spring Boot |4.22.1 |4.22.1 |Pass |Spring Boot |4.18.4 |4.18.4 |Pass |Quarkus (default) |3.33.3.2 |4.18.3 |Pass -|Quarkus |3.27.4 |4.14.7 |Pass +|Quarkus |3.27.4.1 |4.14.7 |Pass |=== The Red Hat Spring Boot example with starter BOM `4.14.4.redhat-00010` resolved core `4.14.4.redhat-00008` diff --git a/docs/releasing.md b/docs/releasing.md index 1a001fca..c3f53d93 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -23,7 +23,9 @@ Set `camel.cli.version` in `distribution.properties` to a tested released Aesh-b (4.24.0 or later), synchronize the Maven mirror, and run the hosted compatibility suite before staging. Development builds may use snapshot versions of the host and the Camel MCP runner. Before staging Kit, set `camel.mcp.version` to the tested release in Maven Central and update `camel-mcp-version` in `docs/antora.yml`. -Verify the shipped runtime profiles with that runner. Generated integration pins are independent. +Repeat the catalog checks for all shipped runtime profiles and the documented Red Hat example. Record the tested +runner and results in `docs/modules/ROOT/pages/mcp.adoc` and update the unreleased entry in `CHANGELOG.md`. +Generated integration pins are independent. 1. Start from reviewed source on a release branch. Change only the selected product POM version and its child parent versions (or only the root version for a parent @@ -58,6 +60,10 @@ Verify the shipped runtime profiles with that runner. Generated integration pins `HEAD`. For Kit, synchronize launcher fallback versions again. Verify clean-cache installation of the released CLI/plugin or standalone Knowledge runner. +Before the nightly and manual Kit snapshot deployments, `python3 tools/check_camel_mcp_runner.py` resolves the +pinned runner with an empty Maven repository. If the corresponding release is available on Maven Central, +the check stops deployment and identifies the version to verify and select. + The nightly snapshot workflow builds the root reactor. Manual snapshot dispatch can select just the parent, Kit, or Knowledge. Independent product builds require their chosen shared parent to be available locally or in the configured Maven repository. diff --git a/tools/check_camel_mcp_runner.py b/tools/check_camel_mcp_runner.py new file mode 100644 index 00000000..17478f3a --- /dev/null +++ b/tools/check_camel_mcp_runner.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python3 +"""Check remote availability of the Camel MCP runner before deploying a Kit snapshot.""" + +import os +import subprocess +import tempfile +from pathlib import Path +from urllib.error import HTTPError +from urllib.request import Request, urlopen + +from sync_distribution_mirrors import load_properties + + +def check_runner(root): + properties = load_properties(root / "distribution.properties") + version = properties["camel.mcp.version"] + if version.endswith("-SNAPSHOT"): + release = version.removesuffix("-SNAPSHOT") + url = (f"https://repo.maven.apache.org/maven2/org/apache/camel/camel-jbang-mcp/{release}/" + f"camel-jbang-mcp-{release}-runner.jar") + try: + urlopen(Request(url, method="HEAD"), timeout=30).close() + except HTTPError as error: + if error.code != 404: + raise + error.close() + else: + raise ValueError(f"Camel MCP runner {release} is available on Maven Central. " + "Verify the release and update the pin and catalog results per docs/releasing.md.") + + plugin = properties["maven.dependency.plugin.version"] + wrapper = root / ("mvnw.cmd" if os.name == "nt" else "mvnw") + with tempfile.TemporaryDirectory() as repository: + subprocess.run([str(wrapper), "-B", "-ntp", "-N", f"-Dmaven.repo.local={repository}", + f"org.apache.maven.plugins:maven-dependency-plugin:{plugin}:get", + f"-Dartifact=org.apache.camel:camel-jbang-mcp:{version}:jar:runner", + "-Dtransitive=false"], cwd=root, check=True) + + +if __name__ == "__main__": + try: + check_runner(Path(__file__).resolve().parents[1]) + except (OSError, ValueError, subprocess.CalledProcessError) as failure: + raise SystemExit(str(failure)) diff --git a/tools/test_check_camel_mcp_runner.py b/tools/test_check_camel_mcp_runner.py new file mode 100644 index 00000000..175a915f --- /dev/null +++ b/tools/test_check_camel_mcp_runner.py @@ -0,0 +1,55 @@ +import tempfile +import unittest +from pathlib import Path +from unittest.mock import patch +from urllib.error import HTTPError + +from check_camel_mcp_runner import check_runner + + +class CamelMcpRunnerTest(unittest.TestCase): + def setUp(self): + directory = tempfile.TemporaryDirectory() + self.addCleanup(directory.cleanup) + self.root = Path(directory.name) + + def pin(self, version): + (self.root / "distribution.properties").write_text( + f"camel.mcp.version={version}\nmaven.dependency.plugin.version=3.8.1\n") + + @patch("check_camel_mcp_runner.subprocess.run") + @patch("check_camel_mcp_runner.urlopen") + def test_published_runner_stops_snapshot_deployment(self, remote, maven): + self.pin("1.2.3-SNAPSHOT") + with self.assertRaisesRegex(ValueError, r"runner 1\.2\.3 is available"): + check_runner(self.root) + request = remote.call_args.args[0] + self.assertEqual("HEAD", request.get_method()) + self.assertTrue(request.full_url.endswith("/1.2.3/camel-jbang-mcp-1.2.3-runner.jar")) + maven.assert_not_called() + + @patch("check_camel_mcp_runner.urlopen") + def test_registry_error_is_reported(self, remote): + self.pin("1.2.3-SNAPSHOT") + remote.side_effect = HTTPError("central", 503, "unavailable", {}, None) + with self.assertRaises(HTTPError): + check_runner(self.root) + + @patch("check_camel_mcp_runner.urlopen") + def test_resolves_snapshot_and_release_without_cached_artifacts(self, remote): + remote.side_effect = HTTPError("central", 404, "missing", {}, None) + for version in ("1.2.3-SNAPSHOT", "1.2.3"): + with self.subTest(version=version): + self.pin(version) + + def verify(command, *, cwd, check): + self.assertTrue(check) + self.assertEqual(self.root, cwd) + self.assertIn(f"-Dartifact=org.apache.camel:camel-jbang-mcp:{version}:jar:runner", command) + repo = next(arg.split("=", 1)[1] for arg in command if arg.startswith("-Dmaven.repo.local=")) + self.assertEqual([], list(Path(repo).iterdir())) + + with patch("check_camel_mcp_runner.subprocess.run", side_effect=verify) as maven: + check_runner(self.root) + maven.assert_called_once() + remote.assert_called_once()
