Skip to content
Open
37 changes: 22 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
python:
name: Python Examples
Expand Down Expand Up @@ -224,8 +227,9 @@ jobs:
apps: "e2e_protection hello_world_server"
run_tests: false
env:
ZEPHYR_SDK_VERSION: "0.17.0"
OPENSOMEIP_COMMIT: "v0.0.4"
ZEPHYR_SDK_VERSION: "1.0.1"
ZEPHYR_VERSION: "v4.4.0"
OPENSOMEIP_COMMIT: "v0.1.0"

@coderabbitai coderabbitai Bot May 23, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

TAG="v0.1.0"

echo "Resolved commit for annotated tag ${TAG}:"
git ls-remote --tags https://github.com/vtz/opensomeip.git "${TAG}^{}"

echo
echo "Current OpenSOMEIP refs in repository:"
rg -n 'GIT_TAG\s+v0\.1\.0|OPENSOMEIP_COMMIT.?=.?\"?v0\.1\.0\"?' cpp/CMakeLists.txt .github/workflows/ci.yml docker/Dockerfile.zephyr

Repository: vtz/opensomeip-examples

Length of output: 391


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Show OPENSOMEIP_COMMIT in .github/workflows/ci.yml around line 228 ==="
sed -n '210,245p' .github/workflows/ci.yml | cat -n

echo
echo "=== Show checkout/openSOMEIP usage around lines 250-320 ==="
sed -n '250,320p' .github/workflows/ci.yml | cat -n

echo
echo "=== Resolve tag v0.1.0 to commit SHA ==="
git ls-remote --tags https://github.com/vtz/opensomeip.git 'v0.1.0^{}'

echo
echo "=== Repo search for OPENSOMEIP_COMMIT / v0.1.0 (fixed regex) ==="
rg -n --hidden --no-ignore -S 'OPENSOMEIP_COMMIT|v0\.1\.0|opensomeip\.git|GIT_TAG' \
  .github/workflows/ci.yml cpp/CMakeLists.txt docker/Dockerfile.zephyr || true

Repository: vtz/opensomeip-examples

Length of output: 5572


Pin OpenSOMEIP to an immutable commit SHA in CI (and align Docker/CMake).

.github/workflows/ci.yml (line ~228) uses the mutable tag v0.1.0 via OPENSOMEIP_COMMIT: "v0.1.0" and then git checkout $OPENSOMEIP_COMMIT after cloning. The same mutable tag is also used in docker/Dockerfile.zephyr (ARG/default) and cpp/CMakeLists.txt (GIT_TAG v0.1.0), so builds aren’t fully reproducible. Resolve v0.1.0 to c66051facd4d01c5c8ccf8d70fc5bb7f903c10c9 and pin to that SHA everywhere.

Suggested patch shape (replace tag with resolved SHA)
-      OPENSOMEIP_COMMIT: "v0.1.0"
+      OPENSOMEIP_COMMIT: "c66051facd4d01c5c8ccf8d70fc5bb7f903c10c9"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
OPENSOMEIP_COMMIT: "v0.1.0"
OPENSOMEIP_COMMIT: "c66051facd4d01c5c8ccf8d70fc5bb7f903c10c9"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 228, Replace the mutable OpenSOMEIP tag
with the resolved immutable commit SHA everywhere to make builds reproducible:
set OPENSOMEIP_COMMIT to c66051facd4d01c5c8ccf8d70fc5bb7f903c10c9 in the CI
workflow (replace the current v0.1.0 value), update the ARG/default in
Dockerfile.zephyr to the same SHA, and change the GIT_TAG value in
cpp/CMakeLists.txt to c66051facd4d01c5c8ccf8d70fc5bb7f903c10c9 so all three
references (OPENSOMEIP_COMMIT, the Dockerfile ARG, and the GIT_TAG in
CMakeLists) point to the exact commit.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disagree — using the annotated tag v0.1.0 is standard practice for FetchContent, Docker, and CI version pins. Tags are immutable in this project, and raw SHAs would make the references opaque and harder to maintain. The tag clearly communicates the intended version.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vtz, understood — if tags are treated as immutable in this project and the readability of v0.1.0 is preferred over an opaque SHA, that's a perfectly reasonable convention to follow. I'll keep that in mind for future reviews.

(ᴖ‿ᴖ) (ᵕ﹏ᵕ)


✏️ Learnings added
Learnt from: vtz
Repo: vtz/opensomeip-examples PR: 2
File: .github/workflows/ci.yml:228-228
Timestamp: 2026-05-25T02:02:08.524Z
Learning: In the vtz/opensomeip-examples repository, version tags (e.g., `v0.1.0`) are treated as immutable. The project intentionally uses human-readable version tags rather than pinned commit SHAs in CI (`OPENSOMEIP_COMMIT`), Docker (`ARG OPENSOMEIP_COMMIT`), and CMake (`GIT_TAG`) for clarity and maintainability. Do not suggest replacing tags with raw commit SHAs in this repository.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

steps:
- uses: actions/checkout@v4

Expand All @@ -242,7 +246,7 @@ jobs:

- name: Initialize Zephyr workspace
run: |
west init ~/zephyrproject
west init ~/zephyrproject --mr $ZEPHYR_VERSION
cd ~/zephyrproject
west update --narrow -o=--depth=1
west zephyr-export
Expand All @@ -254,12 +258,12 @@ jobs:
wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz
tar xf zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz -C ~/
~/zephyr-sdk-${ZEPHYR_SDK_VERSION}/setup.sh -h -c
# Install host and ARM toolchains
cd ~/zephyr-sdk-${ZEPHYR_SDK_VERSION}
wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/toolchain_linux-x86_64_x86_64-zephyr-elf.tar.xz
tar xf toolchain_linux-x86_64_x86_64-zephyr-elf.tar.xz
wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/toolchain_linux-x86_64_arm-zephyr-eabi.tar.xz
tar xf toolchain_linux-x86_64_arm-zephyr-eabi.tar.xz
mkdir -p ~/zephyr-sdk-${ZEPHYR_SDK_VERSION}/gnu
cd ~/zephyr-sdk-${ZEPHYR_SDK_VERSION}/gnu
wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/toolchain_gnu_linux-x86_64_x86_64-zephyr-elf.tar.xz
tar xf toolchain_gnu_linux-x86_64_x86_64-zephyr-elf.tar.xz
wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/toolchain_gnu_linux-x86_64_arm-zephyr-eabi.tar.xz
tar xf toolchain_gnu_linux-x86_64_arm-zephyr-eabi.tar.xz

- name: Clone opensomeip
run: |
Expand All @@ -271,18 +275,19 @@ jobs:
env:
ZEPHYR_BASE: ~/zephyrproject/zephyr
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
ZEPHYR_SDK_INSTALL_DIR: ~/zephyr-sdk-0.17.0
OPENSOMEIP_ROOT: ~/opensomeip
run: |
cd ~/zephyrproject
export ZEPHYR_SDK_INSTALL_DIR="$HOME/zephyr-sdk-$ZEPHYR_SDK_VERSION"
OPENSOMEIP_ROOT="$HOME/opensomeip"
BOARD="${{ matrix.target }}"
for app in ${{ matrix.apps }}; do
echo "=== Building $app for $BOARD ==="
EXTRA_ARGS=""
if [ "$BOARD" = "s32k388_renode" ]; then
EXTRA_ARGS="-DBOARD_ROOT=$OPENSOMEIP_ROOT/zephyr"
EXTRA_ARGS="-DBOARD_ROOT=$OPENSOMEIP_ROOT/zephyr -DSOC_ROOT=$OPENSOMEIP_ROOT/zephyr"
fi
west build -b "$BOARD" "zephyr/$app" \
-d "build/zephyr/${BOARD}_${app}" \
west build -b "$BOARD" "$GITHUB_WORKSPACE/zephyr/$app" \
-d "$GITHUB_WORKSPACE/build/zephyr/${BOARD}_${app}" \
--pristine auto -- \
-DOPENSOMEIP_ROOT="$OPENSOMEIP_ROOT" $EXTRA_ARGS
done
Expand All @@ -293,7 +298,9 @@ jobs:
ZEPHYR_BASE: ~/zephyrproject/zephyr
run: |
echo "=== Running e2e_protection ==="
timeout 30 ./build/zephyr/native_sim_e2e_protection/zephyr/zephyr.exe
timeout 30 $GITHUB_WORKSPACE/build/zephyr/native_sim_e2e_protection/zephyr/zephyr.exe \
2>&1 | tee /tmp/e2e_output.log || true
grep -q "0 failed" /tmp/e2e_output.log

combined:
name: Cross-Language Tests
Expand Down
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ include(FetchContent)
FetchContent_Declare(
opensomeip
GIT_REPOSITORY https://github.com/vtz/opensomeip.git
GIT_TAG v0.0.4
GIT_TAG v0.1.0
)
set(BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.zephyr
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUN groupadd -r zephyrci && useradd -r -g zephyrci -m -d /home/zephyrci zephyrci
USER zephyrci

# Clone opensomeip for use as a Zephyr module
ARG OPENSOMEIP_COMMIT=v0.0.4
ARG OPENSOMEIP_COMMIT=v0.1.0
RUN git clone https://github.com/vtz/opensomeip.git /workspace/opensomeip \
&& cd /workspace/opensomeip \
&& git checkout ${OPENSOMEIP_COMMIT}
Expand Down
2 changes: 1 addition & 1 deletion python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
opensomeip>=0.1.2
opensomeip>=0.1.5
pyyaml>=6.0
2 changes: 2 additions & 0 deletions zephyr/hello_world_server/boards/s32k388_renode.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_XSI_SINGLE_PROCESS=n
Loading