Skip to content

Run teleop_ros2 in all modes in the teleop-ros2-docker test#226

Merged
sgrizan-nv merged 7 commits intomainfrom
sgrizan/branch1
Apr 6, 2026
Merged

Run teleop_ros2 in all modes in the teleop-ros2-docker test#226
sgrizan-nv merged 7 commits intomainfrom
sgrizan/branch1

Conversation

@life1ess
Copy link
Copy Markdown
Contributor

@life1ess life1ess commented Mar 6, 2026

Summary by CodeRabbit

  • New Features

    • Teleop demos gain a runtime option to enable mock operators, allowing loading of a synthetic-hands controller, extending plugin search paths from environment and discovered directories, and emitting a "TeleopSession started successfully" info message.
  • Chores

    • CI: expanded teleop validation across architectures and Python versions on GPU runners, downloads per-arch build artifacts, runs per-mode verification with short timeouts and runtime/OpenXR propagation, and gates release publishing on test success.
    • Updated pre-commit hook to run the check with python3.

@life1ess life1ess self-assigned this Mar 6, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 6, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b73b11e2-f9c2-4ba5-bb32-032c18217bde

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Replaces the CI smoke-test with a matrixed self-hosted GPU job that downloads per-arch build artifacts and runs per-mode Docker verification against CloudXR runtime; adds a use_mock_operators ROS parameter that conditionally discovers plugin dirs and injects a synthetic-hands PluginConfig.

Changes

Cohort / File(s) Summary
CI Workflow
\.github/workflows/build-ubuntu.yml
Replaces previous single-run job with test-teleop-ros2 on self-hosted GPU matrix (arch × python), downloads per-arch/per-python build tarballs into install/, starts CloudXR runtime via docker compose, runs iterative per-mode verification (4 modes) with timeout handling, passes host CloudXR envs, and gates publish-wheel on this job. Also enables recursive submodules in checkout.
Teleop publisher & plugin handling
examples/teleop_ros2/python/teleop_ros2_publisher.py
Adds _find_plugins_dirs(start: Path) -> List[Path]; narrows _to_pose typing to Sequence[float] and optional orientation; introduces ROS parameter use_mock_operators (bool, default False) and when true collects ISAAC_TELEOP_PLUGIN_PATH + discovered plugin dirs and injects a controller_synthetic_hands PluginConfig; logs "TeleopSession started successfully" and only calls rclpy.shutdown() when rclpy.ok() is true.
Pre-commit hook tweak
\.pre-commit-config.yaml
Changes the check-copyright-year hook command to invoke the script with python3 instead of python.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant CI as CI Workflow
    participant Runner as Self-hosted Runner
    participant Artifact as Artifact Store
    participant DockerCtl as Docker Compose (host)
    participant Container as Teleop Container
    participant Node as teleop_ros2_publisher.py
    participant CloudXR as CloudXR Runtime (container)
    participant FS as Host Filesystem / Env

    CI->>Runner: start `test-teleop-ros2` matrix (arch, python_version)
    Runner->>Artifact: download `isaacteleop-install-release-${{ matrix.arch }}-py${{ matrix.python_version }}.tar.gz`
    Artifact-->>Runner: deliver tarball
    Runner->>FS: extract to `install/`
    Runner->>DockerCtl: docker compose up -d cloudxr-runtime (mount host paths)
    DockerCtl->>CloudXR: start and report health
    Runner->>Container: docker run image (mode, mount runtime paths, envs)
    Container->>Node: invoke `teleop_ros2_publisher.py --mode`
    Node->>FS: read `ISAAC_TELEOP_PLUGIN_PATH` and call `_find_plugins_dirs(...)`
    Node->>Node: build TeleopSessionConfig (include synthetic_hands PluginConfig if `use_mock_operators`)
    Node->>CloudXR: connect/start TeleopSession
    CloudXR-->>Node: session status / logs
    Container-->>Runner: exit (timeout codes allowed/checked)
    Runner->>DockerCtl: docker compose down -v
    Runner-->>CI: per-mode result reported
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through CI gates, four modes on the run,
I sniffed plugin paths beneath the springtime sun.
Mock paws waved in rhythm, sessions hummed anew,
Build tarballs unwrapped, containers said "peek‑a‑boo!"
Tiny rabbit cheers — the tests all hopped through.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing the single-mode teleop-ros2-docker test with a comprehensive test that runs teleop_ros2 across all application modes (controller_teleop, hand_teleop, controller_raw, full_body).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sgrizan/branch1

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build-ubuntu.yml:
- Around line 177-183: No code change required: the "Verify application modes"
workflow loop correctly handles timeout exit code 124 and tests the four modes
matching the application's _TELEOP_MODES; leave the docker run line and the
escaped \$? check as-is (referencing the Verify application modes block,
matrix.ros_distro and the tested modes controller_teleop, hand_teleop,
controller_raw, full_body).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: df4d90ba-198e-4995-9016-4e9da65eb253

📥 Commits

Reviewing files that changed from the base of the PR and between 904f15b and 3c9122c.

📒 Files selected for processing (1)
  • .github/workflows/build-ubuntu.yml

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build-ubuntu.yml:
- Around line 177-183: The new smoke test job (teleop-ros2-docker) must be added
as a release gate by making the publish jobs depend on it: update the
publish-wheel and publish-github-release-assets jobs (or their parent workflow
triggers) to include teleop-ros2-docker in their needs list (in addition to
build-ubuntu and test-cloudxr) so a failing teleop-ros2-docker run blocks
publishing; locate the job named teleop-ros2-docker and the jobs publish-wheel
and publish-github-release-assets in the workflow and add teleop-ros2-docker to
their needs array (or equivalent dependency configuration).

In `@examples/teleop_ros2/python/teleop_ros2_publisher.py`:
- Around line 84-91: The helper _find_plugins_dirs currently stops after the
first plugins/ directory due to the break, which can hide ancestor plugin
directories (e.g., one containing controller_synthetic_hands) and makes
PluginConfig.search_paths brittle; remove the break so the loop collects every
plugin_dir found for each parent (and the start) and return the full list of
candidate Paths so PluginConfig.search_paths can include all matching plugin
directories.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9171f9ad-98ee-497e-a326-bbcfe2bd092a

📥 Commits

Reviewing files that changed from the base of the PR and between 3c9122c and f86f763.

📒 Files selected for processing (2)
  • .github/workflows/build-ubuntu.yml
  • examples/teleop_ros2/python/teleop_ros2_publisher.py

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
.github/workflows/build-ubuntu.yml (1)

177-183: ⚠️ Potential issue | 🟠 Major

Add teleop-ros2-docker to the publish gates.

This new verification job still does not block publish-wheel or publish-github-release-assets, so artifacts can be published after a failed mode check.

🔒 Proposed gating change
   publish-wheel:  # to internal Artifactory
     runs-on: [self-hosted, linux]
     needs:
       - build-ubuntu
+      - teleop-ros2-docker
       - test-cloudxr
     environment: dev
     # Publish only after build and CloudXR tests succeed.
-    if: ${{ needs.build-ubuntu.result == 'success' && needs.test-cloudxr.result == 'success' }}
+    if: ${{ needs.build-ubuntu.result == 'success' && needs.teleop-ros2-docker.result == 'success' && needs.test-cloudxr.result == 'success' }}
...
   publish-github-release-assets:
     runs-on: ubuntu-latest
     needs:
       - build-ubuntu
+      - teleop-ros2-docker
       - test-cloudxr
...
-    if: ${{ github.event_name == 'push' && needs.build-ubuntu.result == 'success' && needs.test-cloudxr.result == 'success' }}
+    if: ${{ github.event_name == 'push' && needs.build-ubuntu.result == 'success' && needs.teleop-ros2-docker.result == 'success' && needs.test-cloudxr.result == 'success' }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-ubuntu.yml around lines 177 - 183, The new
verification job ("Verify application modes") is not included as a prerequisite
for the publish jobs, so publishing can proceed even if mode verification fails;
update the workflow to add the verification job (the job that runs the for-loop
with docker/teleop_ros2_ref) as a gate for the publish jobs by adding its job id
(e.g., "Verify application modes" / the job key for the teleop-ros2-docker
verification) to the needs/dependencies of "publish-wheel" and
"publish-github-release-assets" (or the publish job keys) so those publish jobs
only run if the teleop-ros2-docker verification succeeds.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build-ubuntu.yml:
- Around line 177-183: The loop that runs docker and invokes "timeout 5 uv run
teleop_ros2_publisher.py ..." accepts any zero exit as success; change the
command so you capture the command's exit code and explicitly require it to be
124 (timeout) to pass. Concretely, in the for-loop around the docker run line
(the block invoking teleop_ros2_publisher.py via timeout inside docker), run the
docker command, save its exit code ($?), and then test "[ $exit_code -eq 124 ]"
(fail otherwise) so only a timeout exit from teleop_ros2_publisher.py is
considered success.

In `@examples/teleop_ros2/python/teleop_ros2_publisher.py`:
- Line 93: The _to_pose helper currently types position and orientation as
List[float], which causes false positives when callers pass numpy.ndarray;
change the annotations on _to_pose (function name _to_pose) to accept generic
sequences — e.g. use Sequence[float] for position and Sequence[float] | None (or
Optional[Sequence[float]]) for orientation — and add/import Sequence from typing
so static type checkers accept numpy arrays and other indexable iterables.

---

Duplicate comments:
In @.github/workflows/build-ubuntu.yml:
- Around line 177-183: The new verification job ("Verify application modes") is
not included as a prerequisite for the publish jobs, so publishing can proceed
even if mode verification fails; update the workflow to add the verification job
(the job that runs the for-loop with docker/teleop_ros2_ref) as a gate for the
publish jobs by adding its job id (e.g., "Verify application modes" / the job
key for the teleop-ros2-docker verification) to the needs/dependencies of
"publish-wheel" and "publish-github-release-assets" (or the publish job keys) so
those publish jobs only run if the teleop-ros2-docker verification succeeds.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d1363755-fb63-43be-9187-0226b84b3003

📥 Commits

Reviewing files that changed from the base of the PR and between f86f763 and 1036f88.

📒 Files selected for processing (2)
  • .github/workflows/build-ubuntu.yml
  • examples/teleop_ros2/python/teleop_ros2_publisher.py

Comment thread examples/teleop_ros2/python/teleop_ros2_publisher.py Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build-ubuntu.yml:
- Around line 177-184: The CI loop considers a 5s survival as success, but
teleop_ros2_publisher.py's OpenXR retry loop can spin forever and falsely pass;
update the test to assert the node actually enters a session by either (A)
adding a one-time CLI flag to teleop_ros2_publisher.py (e.g., --require-session
or --exit-if-no-session) that causes the process to exit non‑zero if
session.step() is never reached within the timeout, or (B) change the docker run
command to capture and check stdout/stderr for the session start marker (search
for the log line emitted when session.step() is called) within the timeout and
fail if not found; modify the test invocation in the workflow where
teleop_ros2_publisher.py is executed so it fails unless session.step() is
observed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f6263eb1-01c8-439d-806f-5e0669991511

📥 Commits

Reviewing files that changed from the base of the PR and between 1036f88 and ac2c860.

📒 Files selected for processing (2)
  • .github/workflows/build-ubuntu.yml
  • examples/teleop_ros2/python/teleop_ros2_publisher.py

Comment thread .github/workflows/build-ubuntu.yml
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/build-ubuntu.yml (1)

177-184: ⚠️ Potential issue | 🟠 Major

Timeout-only success check can still false-pass broken mode startup.

If the node stays in the OpenXR retry loop, this still returns 124 and passes without proving mode logic actually ran.

🔧 Suggested hardening
     - name: Verify application modes
       run: |
         touch /tmp/dummy.json
         for mode in controller_teleop hand_teleop controller_raw full_body; do
           echo "Testing mode: $mode"
-          docker run --rm -v /tmp/dummy.json:/tmp/dummy.json -e NV_CXR_RUNTIME_DIR=/tmp -e XR_RUNTIME_JSON=/tmp/dummy.json --entrypoint bash teleop_ros2_ref:${{ matrix.ros_distro }} -c \
-            "source /usr/local/bin/teleop-env-setup && timeout 5 uv run teleop_ros2_publisher.py --ros-args -p mode:=$mode -p use_mock_operators:=true; rc=\$?; [ \$rc -eq 124 ]"
+          log_file="$(mktemp)"
+          docker run --rm -v /tmp/dummy.json:/tmp/dummy.json -e NV_CXR_RUNTIME_DIR=/tmp -e XR_RUNTIME_JSON=/tmp/dummy.json --entrypoint bash teleop_ros2_ref:${{ matrix.ros_distro }} -c \
+            "source /usr/local/bin/teleop-env-setup && timeout 5 uv run teleop_ros2_publisher.py --ros-args -p mode:=$mode -p use_mock_operators:=true" \
+            >"${log_file}" 2>&1
+          rc=$?
+          cat "${log_file}"
+          [ "${rc}" -eq 124 ]
+          ! grep -q "No XR client connected" "${log_file}"
         done
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-ubuntu.yml around lines 177 - 184, The workflow
currently treats a timeout exit code (124) as success, which can false-pass
OpenXR retry loops; modify the loop that runs teleop_ros2_publisher.py so it
captures stdout/stderr to a temp file and, after the docker run, assert not only
that rc is 124 (timeout) or 0, but also grep the captured output for a concrete
startup confirmation indicating the requested mode (e.g., a log line containing
the mode variable or a phrase like "mode" or "Started teleop" produced by
teleop_ros2_publisher.py); update the shell snippet around docker run and the
check that follows (the block invoking teleop_ros2_publisher.py) to fail the job
if neither a successful exit nor the expected confirmation string for $mode is
present.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/teleop_ros2/python/teleop_ros2_publisher.py`:
- Line 112: The _to_pose signature is failing Ruff formatting; change the
annotation from the PEP 604 union syntax to typing.Optional to satisfy the
linter: update def _to_pose(position: Sequence[float], orientation:
Sequence[float] | None = None) -> Pose: to use Optional[Sequence[float]] for the
orientation parameter and ensure Optional is imported from typing (and keep
Sequence and Pose references unchanged).

---

Duplicate comments:
In @.github/workflows/build-ubuntu.yml:
- Around line 177-184: The workflow currently treats a timeout exit code (124)
as success, which can false-pass OpenXR retry loops; modify the loop that runs
teleop_ros2_publisher.py so it captures stdout/stderr to a temp file and, after
the docker run, assert not only that rc is 124 (timeout) or 0, but also grep the
captured output for a concrete startup confirmation indicating the requested
mode (e.g., a log line containing the mode variable or a phrase like "mode" or
"Started teleop" produced by teleop_ros2_publisher.py); update the shell snippet
around docker run and the check that follows (the block invoking
teleop_ros2_publisher.py) to fail the job if neither a successful exit nor the
expected confirmation string for $mode is present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3ab647ae-9652-48d7-b368-3ffb6e23e132

📥 Commits

Reviewing files that changed from the base of the PR and between ac2c860 and 3a2a1f9.

📒 Files selected for processing (2)
  • .github/workflows/build-ubuntu.yml
  • examples/teleop_ros2/python/teleop_ros2_publisher.py

Comment thread examples/teleop_ros2/python/teleop_ros2_publisher.py Outdated
Comment on lines 176 to -220

- name: Smoke test (ROS 2 + rclpy)
run: |
docker run --rm --entrypoint bash teleop_ros2_ref:${{ matrix.ros_distro }} -c \
"source /usr/local/bin/teleop-env-setup && ros2 --help > /dev/null && python3 -c \"import rclpy; rclpy.init(); rclpy.shutdown(); print('rclpy OK')\""
# Run tests with CloudXR runtime
./scripts/run_tests_with_cloudxr.sh --python-version ${{ matrix.python_version }}

test-cloudxr:
test-teleop-ros2:
runs-on: [self-hosted, linux, gpu, "${{ matrix.arch }}"]
needs: build-ubuntu

strategy:
matrix:
python_version: ['3.10', '3.11', '3.12']
python_version: ['3.10', '3.12']
arch: ['x64', 'arm64']

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive

- name: Install uv
uses: ./.github/actions/setup-uv

- name: Download install artifacts
uses: actions/download-artifact@v7
with:
name: isaacteleop-install-release-${{ matrix.arch }}-py${{ matrix.python_version }}

- name: Extract tarball to preserve permissions
run: |
mkdir -p install
tar -xvf isaacteleop-install.tar -C install

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run Tests with CloudXR
- name: Set ROS Distro
id: ros-distro
run: |
if [ "${{ matrix.python_version }}" = "3.10" ]; then
echo "ROS_DISTRO=humble" >> $GITHUB_ENV
elif [ "${{ matrix.python_version }}" = "3.12" ]; then
echo "ROS_DISTRO=jazzy" >> $GITHUB_ENV
fi

- name: Build teleop_ros2 image
run: |
docker build -f examples/teleop_ros2/Dockerfile \
--build-arg ROS_DISTRO=${{ env.ROS_DISTRO }} \
--build-arg PYTHON_VERSION=${{ matrix.python_version }} \
-t teleop_ros2_ref:${{ env.ROS_DISTRO }} .

- name: Verify application modes
env:
CI: true
ACCEPT_CLOUDXR_EULA: Y
run: |
# Create .env file with EULA acceptance
echo "ACCEPT_CLOUDXR_EULA=Y" > deps/cloudxr/.env

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 18 days ago

In general, the fix is to define an explicit permissions: block either at the workflow root (so it applies to all jobs by default) or on the specific job(s). The minimal safe setting for workflows that only need to read repository content and artifacts is contents: read. This documents the required scope and ensures the workflow remains least-privilege even if repo/org defaults change.

The best fix here without changing functionality is to add a root-level permissions: block right after the on: section in .github/workflows/build-ubuntu.yml. This will apply to all jobs that don’t override permissions (including test-teleop-ros2, which is the one CodeQL flagged). Based on the visible steps, the jobs only require read access to the repository and artifacts; none of the shown steps push commits, publish releases, or modify issues/PRs. Therefore, permissions: contents: read is sufficient and safe as a minimal default. No imports, methods, or additional definitions are needed; this is a pure YAML configuration change.

Concretely:

  • Edit .github/workflows/build-ubuntu.yml.
  • Insert:
permissions:
  contents: read

after the on: block (after the last pull_request: line and before concurrency:). This will satisfy CodeQL and enforce least-privilege GITHUB_TOKEN access for test-teleop-ros2 and other jobs unless they define their own permissions:.

Suggested changeset 1
.github/workflows/build-ubuntu.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml
--- a/.github/workflows/build-ubuntu.yml
+++ b/.github/workflows/build-ubuntu.yml
@@ -9,6 +9,9 @@
     tags: [ 'v*' ]
   pull_request:
 
+permissions:
+  contents: read
+
 # For PRs, we want to cancel in-progress runs to save resources.
 # For pushes to main or releases, we want to allow all runs to complete.
 concurrency:
EOF
@@ -9,6 +9,9 @@
tags: [ 'v*' ]
pull_request:

permissions:
contents: read

# For PRs, we want to cancel in-progress runs to save resources.
# For pushes to main or releases, we want to allow all runs to complete.
concurrency:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
@sgrizan-nv sgrizan-nv force-pushed the sgrizan/branch1 branch 3 times, most recently from 8e13e8f to e071f9e Compare April 2, 2026 23:02
@sgrizan-nv sgrizan-nv requested a review from aristarkhovNV April 2, 2026 23:24
@sgrizan-nv
Copy link
Copy Markdown
Collaborator

sgrizan-nv commented Apr 2, 2026

Git diff is shown incorrectly, in reality no changes to test-cloudxr were made

@aristarkhovNV
Copy link
Copy Markdown
Collaborator

Git diff is shown incorrectly, in reality no changes to test-cloudxr were made

@sgrizan-nv try swappingtest-teleop-ros2 and test-cloudxr, i.e. puttest-teleop-ros2 before test-cloudxr where teleop-ros2-docker used to be

@sgrizan-nv
Copy link
Copy Markdown
Collaborator

Surely that would work, but I feel bad about bad Github tooling dictating how we should structure our code - in Cursor/VSCode the diff correctly shows that a block was removed before test-cloudxr and a new block was added after it. Logically it should be after test-cloudxr, and I'd like to add more tests in the same group in the future.

@sgrizan-nv sgrizan-nv enabled auto-merge (squash) April 3, 2026 18:11
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build-ubuntu.yml:
- Around line 192-247: Replace the shared compose project name and static log
with job-unique values, make the health wait fail-fast if it times out, and
ensure cleanup always runs: change uses of "docker compose -p isaacteleop-test"
to include a unique suffix (e.g. append $GITHUB_RUN_ID or $RUNNER_JOB_ID)
wherever referenced, replace "/tmp/ros2_test_output.log" with a per-job path
(e.g. /tmp/ros2_test_output_$RUNNER_JOB_ID.log) used by the docker run command
and subsequent greps, update the health wait loop (the for i in {1..30} ... ps
... grep -q "healthy") to exit with a clear error if it never becomes healthy,
and wrap the runtime startup and test execution so that the docker compose down
-v command is executed in a trap/finally-like block (guaranteed cleanup) instead
of only on the success path.

In `@examples/teleop_ros2/python/teleop_ros2_publisher.py`:
- Around line 103-109: The plugin discovery function _find_plugins_dirs only
looks for "plugins" directories on ancestor paths and misses source-tree layouts
like "src/plugins"; update _find_plugins_dirs to also check for a "src/plugins"
sibling under each ancestor (e.g., parent / "src" / "plugins") and include those
directories in the returned candidates (avoiding duplicates), so manifests like
src/plugins/controller_synthetic_hands are found without requiring
ISAAC_TELEOP_PLUGIN_PATH; apply the same change to the other discovery usage
referenced in the file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ea063f3d-2427-43a0-8d7d-a3984dec6ddc

📥 Commits

Reviewing files that changed from the base of the PR and between ac2c860 and baf321f.

📒 Files selected for processing (3)
  • .github/workflows/build-ubuntu.yml
  • .pre-commit-config.yaml
  • examples/teleop_ros2/python/teleop_ros2_publisher.py

Comment thread .github/workflows/build-ubuntu.yml Outdated
Comment thread examples/teleop_ros2/python/teleop_ros2_publisher.py
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/build-ubuntu.yml (1)

200-201: ⚠️ Potential issue | 🟠 Major

Make the compose project and log file unique per matrix leg.

GITHUB_RUN_ID and GITHUB_RUN_ATTEMPT are shared by every test-teleop-ros2 matrix job. If two same-arch legs land on the same Docker host, one leg can truncate the other leg’s /tmp log or tear down the other leg’s CloudXR stack through the EXIT trap.

Suggested fix
-        PROJECT_NAME="isaacteleop-test-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
-        LOG_FILE="/tmp/ros2_test_output_${GITHUB_RUN_ID}_${GITHUB_RUN_ATTEMPT}.log"
+        py_tag="${{ matrix.python_version }}"
+        py_tag="${py_tag//./}"
+        PROJECT_NAME="isaacteleop-test-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${{ matrix.arch }}-py${py_tag}"
+        LOG_FILE="/tmp/ros2_test_output_${PROJECT_NAME}.log"

Also applies to: 203-209, 239-257

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-ubuntu.yml around lines 200 - 201, PROJECT_NAME and
LOG_FILE are not unique per matrix leg; update their declarations (PROJECT_NAME
and LOG_FILE) to append a matrix-unique identifier such as a matrix variable
(e.g., ${ { matrix.arch }} or another matrix key) or the runner-specific env
(e.g., RUNNER_NAME or RUNNER_TEMP) so each matrix job gets a distinct compose
project and logfile; apply the same change to the other occurrences referenced
around the later blocks (the same PROJECT_NAME/LOG_FILE usages in the subsequent
sections).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build-ubuntu.yml:
- Around line 155-158: The checkout step currently leaves the job token in git
config; update every actions/checkout@v6 invocation (including the one shown and
the other occurrences around lines 185-190 and 198+) to disable credential
persistence by setting persist-credentials: false and keep submodules/config as
needed so that the token is not written into the repo config and cannot be read
by subsequent checked-in scripts or Docker builds.

---

Duplicate comments:
In @.github/workflows/build-ubuntu.yml:
- Around line 200-201: PROJECT_NAME and LOG_FILE are not unique per matrix leg;
update their declarations (PROJECT_NAME and LOG_FILE) to append a matrix-unique
identifier such as a matrix variable (e.g., ${ { matrix.arch }} or another
matrix key) or the runner-specific env (e.g., RUNNER_NAME or RUNNER_TEMP) so
each matrix job gets a distinct compose project and logfile; apply the same
change to the other occurrences referenced around the later blocks (the same
PROJECT_NAME/LOG_FILE usages in the subsequent sections).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2440dd25-7184-445e-ad2a-e9a716ec7fb8

📥 Commits

Reviewing files that changed from the base of the PR and between baf321f and 0da9eb1.

📒 Files selected for processing (3)
  • .github/workflows/build-ubuntu.yml
  • .pre-commit-config.yaml
  • examples/teleop_ros2/python/teleop_ros2_publisher.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • .pre-commit-config.yaml
  • examples/teleop_ros2/python/teleop_ros2_publisher.py

Comment thread .github/workflows/build-ubuntu.yml
@sgrizan-nv sgrizan-nv force-pushed the sgrizan/branch1 branch 11 times, most recently from 9922043 to fa94c14 Compare April 3, 2026 23:10
Comment thread .github/workflows/build-ubuntu.yml
@sgrizan-nv sgrizan-nv merged commit a62b947 into main Apr 6, 2026
33 checks passed
@sgrizan-nv sgrizan-nv deleted the sgrizan/branch1 branch April 6, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants