From 4888ad3308ea738327d7aaef77134da4dafc4766 Mon Sep 17 00:00:00 2001 From: Soham Date: Fri, 5 Jun 2026 00:45:08 +0530 Subject: [PATCH] fix(jazzy): cross-distro cv_bridge include; make Jazzy CI a blocking gate The Jazzy CI job failed because cv_bridge's C++ header was renamed cv_bridge.h -> cv_bridge.hpp in Jazzy (the .h was removed); Humble ships only .h. Include whichever exists via __has_include so the package builds on both distros. Verified in a ros:jazzy container: clean build + 25/25 tests (incl. the launch_testing integration test); Humble unchanged. Jazzy is now genuinely supported, so its build+test job is promoted from continue-on-error to a blocking gate alongside Humble. --- .github/workflows/ci.yml | 7 +++---- CHANGELOG.md | 3 +++ docs/PRODUCTION_READINESS.md | 2 +- src/media_streamer_node.cpp | 7 +++++++ src/synthetic_4k_pub_node.cpp | 6 ++++++ 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 113192c..a618883 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,15 +160,14 @@ jobs: colcon test-result --verbose || true # --------------------------------------------------------------------------- - # Jazzy build (forward-compat). Jazzy ships GStreamer 1.24 where the Intel - # vapostproc GPU path is exercised; allowed to fail until officially - # supported, but surfaces API/dependency drift early. + # Jazzy build + test (blocking). Jazzy ships GStreamer 1.24 (where the Intel + # vapostproc GPU path is available) and cv_bridge's .hpp header; both are + # supported, so this is a real gate alongside Humble. # --------------------------------------------------------------------------- build-jazzy: name: build + test (jazzy) runs-on: ubuntu-24.04 container: ros:jazzy - continue-on-error: true env: DEBIAN_FRONTEND: noninteractive ROS_DISTRO: jazzy diff --git a/CHANGELOG.md b/CHANGELOG.md index b260d9e..9d95035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ for the full audit, fixes, and remaining roadmap. - **GStreamer teardown ordering** (NULL-state before element unref) and a `gst_parse_launch` partial-parse pipeline leak. - **Stereo `CameraInfo`** — `resize` now scales the projection `Tx`/`Ty` terms. +- **Cross-distro `cv_bridge` include** — use `cv_bridge.hpp` where present + (Jazzy) and fall back to `cv_bridge.h` (Humble), so the package builds on both; + ROS 2 Jazzy build + tests are now a blocking CI gate alongside Humble. ### Added diff --git a/docs/PRODUCTION_READINESS.md b/docs/PRODUCTION_READINESS.md index 32ab522..58ca34d 100644 --- a/docs/PRODUCTION_READINESS.md +++ b/docs/PRODUCTION_READINESS.md @@ -57,7 +57,7 @@ durable record of the audit findings, what has been fixed, and what remains. | `ament_export_targets/libraries/include_directories/dependencies` + `EXPORT` install so downstream packages can link `prism_core` | `missing-ament-export-for-prism-core` | `CMakeLists.txt` | | Stereo `CameraInfo` correctness — `resize_camera_info` now scales `P[3]`/`P[7]` (Tx/Ty), fixing silent disparity-to-depth corruption on rectified stereo | `camera-info-stereo-tx-untested` | `src/pipeline_factory.cpp` | | Tests — unit suite 11 → **21** (per-backend fragment build strings, `validate_platform`/`factory_exists`, vertical flip, stereo Tx, crop/encoding/flip throw paths) **plus** a `launch_testing` integration test that drives a live `ImageProcNode` in direct mode and asserts output dims/encoding + transformed CameraInfo | `no-integration-test-node-runtime`, `*-untested` | `test/` | -| CI rebuilt into a real gate: `rosdep`-driven deps, `--return-code-on-test-failure` (the old gate could not fail), least-privilege `permissions`, **+ jobs** for ASan/UBSan, advisory `ament_lint`, a Jazzy build, and a QEMU arm64 cross-build | `ci-test-result-no-exit-code`, `ci-no-sanitizer-run`, `ci-no-rosdep-install`, `ci-no-distro-matrix`, `ci-no-arm64-build` | `.github/workflows/ci.yml` | +| CI rebuilt into a real gate: `rosdep`-driven deps, `--return-code-on-test-failure` (the old gate could not fail), least-privilege `permissions`, **+ jobs** for ASan/UBSan, advisory `ament_lint`, a **blocking Jazzy build+test** (cross-distro `cv_bridge` include), and a QEMU arm64 cross-build | `ci-test-result-no-exit-code`, `ci-no-sanitizer-run`, `ci-no-rosdep-install`, `ci-no-distro-matrix`, `ci-no-arm64-build` | `.github/workflows/ci.yml` | | Docs-vs-code drift — qualified the "drop-in / same parameters" claim (topics, CameraInfo derivation, QoS), corrected the `vaapipostproc`→direct-mode prose, documented the direct-mode action-dropping limitation and the CameraInfo-topic collision footgun | `drop-in-topic-param-mismatch`, `vaapipostproc-arch-claim-misleading`, `direct-mode-chain-silent-drop-undocumented` | `README.md` | ### Phase 3 — remaining (tracked follow-ups) diff --git a/src/media_streamer_node.cpp b/src/media_streamer_node.cpp index 1f0c050..e6cf233 100644 --- a/src/media_streamer_node.cpp +++ b/src/media_streamer_node.cpp @@ -1,6 +1,13 @@ #include "prism_image_proc/media_streamer_node.hpp" +// cv_bridge shipped the C++ API as cv_bridge.h through Humble and renamed it to +// cv_bridge.hpp in Jazzy (the .h was removed). Include whichever exists so the +// package builds across distros. +#if __has_include() +#include +#else #include +#endif #include #include diff --git a/src/synthetic_4k_pub_node.cpp b/src/synthetic_4k_pub_node.cpp index ed9a9f0..8f87ebf 100644 --- a/src/synthetic_4k_pub_node.cpp +++ b/src/synthetic_4k_pub_node.cpp @@ -1,6 +1,12 @@ #include "prism_image_proc/synthetic_4k_pub_node.hpp" +// cv_bridge.h (Humble) was renamed to cv_bridge.hpp in Jazzy; include whichever +// the active distro provides. +#if __has_include() +#include +#else #include +#endif #include #include