Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
ecc0077
Flexiv Rizon 4s Reach Policy Support (#4526)
shauryadNv Apr 4, 2026
7f4b072
Update cartpole golden images and clean up rendering correctness test…
huidongc Apr 4, 2026
9c1e673
Reach Tutorial Doc Fixes (#5174)
shauryadNv Apr 6, 2026
b682366
Adds perspective video recording via Newton GL viewer for Kitless bac…
bdilinila Apr 6, 2026
33fb3ee
Fixes raycaster visulization errors printed in the terminal (#4519)
DreaverZhao Apr 7, 2026
6f57c14
Adds smart docker image cleanup (preserving base Isaac Sim image) (#5…
myurasov-nv Apr 7, 2026
151b054
Fixes NaN after env reset by syncing body_q before collision detectio…
ooctipus Apr 7, 2026
e661684
Change Flexiv Reach ROS env config to reflect robot mounting pose in …
ashwinvkNV Apr 7, 2026
cc5ac8d
Update Isaac Sim container tag to 6.0.0-dev2 (#5189)
vidurv-nvidia Apr 8, 2026
03f69fd
Dense startup time profiling (#5072)
AntoineRichard Apr 8, 2026
7588fa9
Fix flatdict version pin to allow 4.1.0+ (develop) (#5181)
kellyguo11 Apr 8, 2026
6a881cf
Fixes typo correction for IsaacSim Docker Version (#5209)
thdhyan Apr 8, 2026
b59a9a2
Adds release version to benchmark output (#5188)
kellyguo11 Apr 9, 2026
83151c7
Fixes broken VideoRecorder test imports and config field names (#5207)
AntoineRichard Apr 9, 2026
a62f5a1
docs: add NCCL troubleshooting notes for multi-GPU training (#5212)
binzily Apr 9, 2026
78e765b
Pins sphinx<9 to fix sphinx-multiversion compatibility (#5211)
kellyguo11 Apr 9, 2026
df77fe7
Adds collision, inertia, and visual geometry toggles to Newton viewer…
vidurv-nvidia Apr 9, 2026
f16c3b1
Fixes Pausing and Unpausing in KIT GUI (#5178)
garylvov Apr 10, 2026
5673af0
Adds optimizations for Isaac Lab Mimic data generation performance (#…
peterd-NV Apr 10, 2026
982e151
perf(ovrtx): batched tile extraction — single kernel launch for all e…
ncournia-nv Apr 10, 2026
d0dddc6
Adds Installation CI (#5220)
myurasov-nv Apr 11, 2026
4356a67
Fixes missing pinocchio, nvidia.srl imports in CI + minor CI improvem…
myurasov-nv Apr 13, 2026
3d2c67b
[Newton] Implements Frame Transformer Sensor (#4822)
camevor Apr 13, 2026
2071c96
Unify physics randomization events across PhysX and Newton (#5098)
ooctipus Apr 13, 2026
2f7dd1e
Exposes Newton collision pipeline configuration through NewtonCfg (#5…
ooctipus Apr 13, 2026
720161c
Simplify preset resolution with single-pass resolve_presets (#5177)
ooctipus Apr 13, 2026
50b6ccc
Fix randomize_actuator_gains zeroing explicit actuator gains (#5180)
ooctipus Apr 13, 2026
abbf838
Rename IMU sensor to PVA and add real IMU sensor (#5247)
AntoineRichard Apr 13, 2026
b1aba48
Move TiledCamera implementation into Camera and deprecate TiledCamera…
nvsekkin Apr 13, 2026
22114bc
Fixes docs dropdown, once again (#5256)
myurasov-nv Apr 13, 2026
dcca2af
Disables git history for GH Pages (#5260)
myurasov-nv Apr 14, 2026
447b4a4
Pins Python version to 3.12 across all packages (#5213)
AntoineRichard Apr 14, 2026
caab0de
Adds fix for Cassie with ability to force newton to create joint driv…
AntoineRichard Apr 14, 2026
dade3f9
Remove stale nvidia.srl symlink hack from Dockerfiles (#5266)
AntoineRichard Apr 14, 2026
730fec3
Update Visualizer CLI usage in doc to align with 3.0 behavior (#5277)
uebian Apr 16, 2026
6a374f4
Revert Docker hacks and pin IsaacSim nightly to Apr 8 digest (#5290)
AntoineRichard Apr 16, 2026
e29d5c4
Adds surface deformable support and migrate deformable API to isaacla…
mmichelis Apr 16, 2026
da973e3
[Newton] Adds IMU Sensor (#5264)
camevor Apr 16, 2026
5dee881
[Exp] Cherry-pick manager-based warp env infrastructure from dev/newt…
hujc7 Apr 16, 2026
74792e7
Restrict pyglet to <3 to fix Newton viewer (#5263)
rubengrandia Apr 16, 2026
b539d38
Fix first-frame textured rendering test (#5259)
nvsekkin Apr 16, 2026
b8a15c0
Fixes test_schemas to skip ensure_drives_exist validation (#5291)
AntoineRichard Apr 16, 2026
8a32f24
Fixes mimic test subprocess cleanup to kill entire process group (#5292)
AntoineRichard Apr 16, 2026
144c948
Pins Isaac Sim docker in postmerge-ci.yaml to the same commit as in b…
myurasov-nv Apr 16, 2026
1e74d70
Wheel Builder + Fixing Pinocchio for wheel/native install (#5222)
myurasov-nv Apr 16, 2026
93ae322
Adds CloudXR runtime auto-launch to teleop scripts (#5187)
rwiltz Apr 16, 2026
7956fa4
[Newton] Adds Pose, Velocity, Acceleration (PVA) sensor (#5267)
camevor Apr 17, 2026
20aa797
Have python return status code (#5238)
Alex-Omar-Nvidia Apr 17, 2026
92ee40a
Fixes default shape margin field name in Newton manager (#5289)
hujc7 Apr 17, 2026
2287151
Add NVTX instrumentation to Newton Warp Renderer (#5294)
pbarejko Apr 17, 2026
392d879
ovphysx backend integration (#4852)
marcodiiga Apr 20, 2026
46ab062
Newton color inconsistency (#5224)
huidongc Apr 20, 2026
8d1c51c
Adds license exception for ovphysx (#5340)
kellyguo11 Apr 21, 2026
f29f666
[Newton] Add averaging and improve tuning of contact sensor tests (#5…
camevor Apr 21, 2026
3b60654
Expand Visualizer Tests and Patch Visualizer Bugs (#5103)
matthewtrepte Apr 21, 2026
30931ae
Upgrade newton (#5339)
huidongc Apr 21, 2026
3238a3f
Add documentation for setup of perspective video recording (#5231)
bdilinila Apr 21, 2026
df2644c
Revert "Add NVTX instrumentation to Newton Warp Renderer (#5294)" (#5…
pbarejko Apr 21, 2026
9aa3f70
Fixes installation; updates installation docs (#5314)
myurasov-nv Apr 22, 2026
3d42b11
Fixes M1 3.0 GA Issues (#5343)
myurasov-nv Apr 22, 2026
1c237bd
Transitions raycaster to warp backend (#4967)
pascal-roth Apr 22, 2026
d1cb8e8
Port WrenchComposer dual-buffer fix to develop branch (#5265)
AntoineRichard Apr 22, 2026
09fe938
Wires up teleop control states via Isaac Teleop message channel (#5268)
rwiltz Apr 22, 2026
481d7ee
Rendering correctness test determinism (#5353)
huidongc Apr 22, 2026
0a9e45c
Adds presets to environment docs and fix doc build issues (#5360)
kellyguo11 Apr 23, 2026
33f8f3a
Refactors Newton XformPrimView: proper local poses, warp-native API, …
ooctipus Apr 23, 2026
0c565d6
Caches resolve_matching_names on AssetBase for all finder methods (#5…
hougantc-nvda Apr 23, 2026
a0e07b4
Forbid pushing to origin in AGENTS.md (#5344)
AntoineRichard Apr 23, 2026
b655176
Add render flag to environment step() API (#5349)
kellyguo11 Apr 23, 2026
63da1f4
Improve Partial Visuallization (#5347)
matthewtrepte Apr 23, 2026
ae41e2a
Cleans up failing unit tests (#5385)
kellyguo11 Apr 24, 2026
17d2f66
Hydra SDG rendering fix (#5384)
pbarejko Apr 24, 2026
cfdbe71
Minimal Shading Mode (#5346)
pbarejko Apr 24, 2026
ca84d35
Fixes compatibility issues with latest Isaac Sim updates (#5358)
kellyguo11 Apr 25, 2026
4af4969
Update deformable showroom image (#5392)
mmichelis Apr 25, 2026
1d916c3
Migrated golden images to Git LFS (#5361)
huidongc Apr 25, 2026
b69279d
Fixes Docker Image Publishing (#5379)
myurasov-nv Apr 25, 2026
80e48f7
[Exp] Cherry-pick warp MDP migration and capture safety from dev/newt…
hujc7 Apr 25, 2026
b674671
Improves Isaac Lab Mimic tutorial documentation and flow (#5283)
peterd-NV Apr 25, 2026
080898f
Updates deprecated extensions in Isaac Sim (#5293)
kellyguo11 Apr 26, 2026
4d58ce4
Updates tests for Isaac Sim CI pipeline (#5403)
kellyguo11 Apr 26, 2026
d76c153
Add checked_apply helper for forwarding configclass fields onto upstr…
hujc7 Apr 26, 2026
1a040c0
[Newton] Add Rough terrain locomotion Part 1: Foundation + quadrupeds…
hujc7 Apr 26, 2026
544f7b1
Fixes arm64 docker build failure (#5408)
myurasov-nv Apr 27, 2026
01014fe
ProxyArray and Asset/Sensor level property caching (#5304)
AntoineRichard Apr 27, 2026
d1a6cdb
Fixes arm64 docker build failure
myurasov-nv Apr 27, 2026
301094d
Runtime switch to read transforms from GPU. (#5411)
pbarejko Apr 27, 2026
4085387
Adds more published docker image tags (#5417)
myurasov-nv Apr 28, 2026
640e71b
Adds initial support for the Kamino solver (#5214)
AntoineRichard Apr 28, 2026
555e3ed
Fix Newton mock missing articulation_ids and run all CI tests on ever…
nvsekkin Apr 29, 2026
83a1d81
Updated TiledCamera references to Camera in downstream configs (#5377)
bdilinila Apr 29, 2026
ad399b8
ci: Improve Docker cleanup for test jobs (#5438)
AntoineRichard Apr 29, 2026
12d935b
Decouple Camera from RTX/Replicator output-buffer logic (#5366)
nvsekkin Apr 29, 2026
15dd6a1
Add Metrics/success_rate logging across RL tasks (#5415)
ooctipus Apr 30, 2026
f0234a8
Fix camera obs hang when xr is enabled (#5425)
rwiltz Apr 30, 2026
4f85aae
Merges updates from main (#5436)
kellyguo11 Apr 30, 2026
ab0a141
Pin PyTorch intersphinx to /docs/2.11/ to fix broken /stable/ alias (…
nvsekkin Apr 30, 2026
f267f96
CI: reliable pipeline cancellation (per-PR concurrency + interruptibl…
nvsekkin Apr 30, 2026
e57269f
Performance optimization on asset writes (#5329)
AntoineRichard Apr 30, 2026
951978b
Gate isaacteleop dependency on Linux to fix Windows install (#5441)
rwiltz Apr 30, 2026
9817fce
Fix required CI checks for docs-only PRs (#5454)
AntoineRichard Apr 30, 2026
88d2407
OVRTX Correctness (#5401)
huidongc Apr 30, 2026
41908c0
Makes ovphysx an optional install of isaaclab_ovphysx (#5428)
ooctipus Apr 30, 2026
5037857
Avoids force push for doc deploy job (#5460)
kellyguo11 Apr 30, 2026
082e488
Fixes more installation issues for ARM and Windows (#5431)
myurasov-nv Apr 30, 2026
8fdb110
Remove colors of deformable cube tutorial docs (#5456)
mmichelis Apr 30, 2026
61c8a94
Fixes multi-GPU device resolution in AppLauncher (#5215)
kellyguo11 May 1, 2026
3827956
[Rough Locomotion] Part 2: H1/Cassie bipeds on Newton (#5298)
hujc7 May 1, 2026
11b8c64
Suspends Fabric USD notice listener during cloning for faster startup…
ooctipus May 1, 2026
a6e7577
Document Kamino solver presets (#5457)
AntoineRichard May 1, 2026
6dfa5fa
OMPE-90534: Add json nsys trace definitions (#5397)
jmart-nv May 1, 2026
2b49dac
Updates wheel versioning (#5467)
myurasov-nv May 1, 2026
3303bef
Adds compatibility note regarding Isaac Sim (#5465)
kellyguo11 May 1, 2026
8bb6eff
Adds retry logic for timeout tests (#5448)
kellyguo11 May 1, 2026
7166229
Skip cloner perf test and fix ray caster intrinsics camera pose (#5470)
ooctipus May 1, 2026
261d077
Patch newton model reqs (#5398)
matthewtrepte May 1, 2026
779a0fc
Adds support for gear insertion with Flexiv Rizon 4s (#5175)
shauryadNv May 2, 2026
9bf2920
Add fragment-based changelog system to eliminate per-PR merge conflic…
hujc7 May 2, 2026
26c253c
CI: trigger build.yaml workflow on scripts/ changes (#5442)
jmart-nv May 3, 2026
d3ce0b3
OMPE-85851: Added success metric tracking to benchmark scripts. (#5335)
jmart-nv May 3, 2026
8394807
[Newton] Adds joint wrench sensor (#5412)
camevor May 3, 2026
d48075a
Adds LEAPP export integration (#5105)
frlai May 3, 2026
26cfdda
Decouple Renderer from Camera (#5297)
r-schmitt May 4, 2026
add60a1
Simplifies CI change detection and concurrency groups (#5466)
myurasov-nv May 4, 2026
9da0c2f
Refactors visualizer cloning around ClonePlan (#5484)
ooctipus May 4, 2026
347ce94
[Rough Locomotion] Part 3: G1 on Newton (max_iterations 3000→5000, no…
hujc7 May 4, 2026
08dbf1f
add RenderContext to docs (#5489)
r-schmitt May 4, 2026
744e371
omniverseclient pin (#5487)
huidongc May 5, 2026
33f5f71
Update a set of small documentation inconsistencies (#5490)
Alex-Omar-Nvidia May 5, 2026
5afbca4
Reduce rendering test flakiness (#5475)
huidongc May 5, 2026
4758900
Restores GR1T2 legacy teleop pipeline for teleop CI (#5254)
rwiltz May 5, 2026
9ffafbb
Replace add_usd with open_usd (#5491)
pbarejko May 5, 2026
2644c1e
Sync video recorder's (--video) renderer backend with the active visu…
matthewtrepte May 5, 2026
7361ece
Add PhysX joint wrench sensor (#5458)
AntoineRichard May 5, 2026
530fa8b
Rename Newton preset to MJWarp (#5488)
AntoineRichard May 5, 2026
632d05f
Refactor NewtonManager into solver-specific subclasses (#5439)
mmichelis May 5, 2026
c0ae5ee
Updating docs, explicitly call out physicx support and handtracking r…
rwiltz May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ _isaac_sim?
docker/.isaac-lab-docker-history
# ignore uv environment
env_isaaclab
tools/wheel_builder/build/
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
*.jit filter=lfs diff=lfs merge=lfs -text
*.hdf5 filter=lfs diff=lfs merge=lfs -text

source/isaaclab_tasks/test/golden_images/**/*.png filter=lfs diff=lfs merge=lfs -text

*.bat text eol=crlf
*.sh text eol=lf
46 changes: 46 additions & 0 deletions .github/actions/run-package-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,47 @@ inputs:
description: 'Additional pytest options'
default: ''
required: false
extra-pip-packages:
description: 'Space-separated pip packages to install inside the Docker container before pytest starts'
default: ''
required: false
container-name:
description: 'Docker container name prefix (run-id is appended automatically)'
required: true
runs:
using: composite
steps:
# Display some details on AWS instance we're running on
- name: AWS Instance Info
shell: bash
run: |
# get instance ID for debugging purposes (if running on EC2)
IMDS_TOKEN=$(curl -sf -X PUT "http://169.254.169.254/latest/api/token" \
-H "X-aws-ec2-metadata-token-ttl-seconds: 21600") || true
if [ -n "$IMDS_TOKEN" ]; then
INSTANCE_ID=$(curl -sf -H "X-aws-ec2-metadata-token: ${IMDS_TOKEN}" \
"http://169.254.169.254/latest/meta-data/instance-id") || true
INSTANCE_REGION=$(curl -sf -H "X-aws-ec2-metadata-token: ${IMDS_TOKEN}" \
"http://169.254.169.254/latest/meta-data/placement/region") || true
INSTANCE_TYPE=$(curl -sf -H "X-aws-ec2-metadata-token: ${IMDS_TOKEN}" \
"http://169.254.169.254/latest/meta-data/instance-type") || true
echo "⚪ Instance ID: ${INSTANCE_ID:-Not running on EC2}"
echo "⚪ Instance Region: ${INSTANCE_REGION:-Not running on EC2}"
echo "⚪ Instance Type: ${INSTANCE_TYPE:-Not running on EC2}"
echo "⚪ Connect: https://${INSTANCE_REGION}.console.aws.amazon.com/ec2-instance-connect/ssh/home?region=${INSTANCE_REGION}&connType=standard&instanceId=${INSTANCE_ID}&osUser=ubuntu&sshPort=22&addressFamily=ipv4"
else
echo "🟠 Could not obtain IMDS token, probably not running on EC2"
fi

- name: Prepare Docker disk space
shell: bash
run: |
bash .github/actions/run-package-tests/cleanup_docker_storage.sh \
"${{ inputs.isaacsim-base-image }}:${{ inputs.isaacsim-version }}" \
"isaacsim-pin-${{ inputs.container-name }}-${{ github.run_id }}-${{ github.run_attempt }}-pre" \
"pre-test-cleanup" \
"true"

- name: Record pull start time
id: pull-start
shell: bash
Expand Down Expand Up @@ -103,6 +138,7 @@ runs:
quarantined-only: ${{ inputs.quarantined-only }}
include-files: ${{ inputs.include-files }}
volume-mount-source: ${{ github.workspace }}
extra-pip-packages: ${{ inputs.extra-pip-packages }}

- name: Check Test Results
if: always()
Expand All @@ -126,3 +162,13 @@ runs:
echo "🟠 Workflow cancelled, force-killing container ${CONTAINER}..."
docker kill "${CONTAINER}" 2>/dev/null || true
docker rm -f "${CONTAINER}" 2>/dev/null || true

- name: Cleanup old Docker images
if: always()
shell: bash
run: |
bash .github/actions/run-package-tests/cleanup_docker_storage.sh \
"${{ inputs.isaacsim-base-image }}:${{ inputs.isaacsim-version }}" \
"isaacsim-pin-${{ inputs.container-name }}-${{ github.run_id }}-${{ github.run_attempt }}-post" \
"post-job-cleanup" \
"false"
128 changes: 128 additions & 0 deletions .github/actions/run-package-tests/cleanup_docker_storage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
#!/usr/bin/env bash

# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

set -u

ISAACSIM_IMAGE="${1:-}"
ISAACSIM_IMAGE_PIN_CONTAINER="${2:-isaacsim-pin-run-package-tests}"
CLEANUP_CONTEXT="${3:-docker-cleanup}"
FAIL_IF_STILL_HIGH="${4:-false}"

DOCKER_STORAGE_PATH="${DOCKER_STORAGE_PATH:-/var/lib/docker}"
DOCKER_CLEANUP_THRESHOLD_PERCENT="${DOCKER_CLEANUP_THRESHOLD_PERCENT:-85}"
DOCKER_AGGRESSIVE_PRUNE_UNTIL="${DOCKER_AGGRESSIVE_PRUNE_UNTIL:-24h}"
DOCKER_CONSERVATIVE_PRUNE_UNTIL="${DOCKER_CONSERVATIVE_PRUNE_UNTIL:-72h}"

get_docker_storage_usage_percent() {
df -P "${DOCKER_STORAGE_PATH}" 2>/dev/null | awk 'NR == 2 { gsub("%", "", $5); print $5 }'
}

resolve_docker_storage_path() {
local docker_root_dir
docker_root_dir="$(docker info --format '{{.DockerRootDir}}' 2>/dev/null || true)"
if [ -n "${docker_root_dir}" ]; then
DOCKER_STORAGE_PATH="${docker_root_dir}"
echo "[${CLEANUP_CONTEXT}] Using Docker root from docker info: ${DOCKER_STORAGE_PATH}"
return 0
fi

echo "[${CLEANUP_CONTEXT}] Could not determine Docker storage path from ${DOCKER_STORAGE_PATH} or docker info." >&2
return 1
}

print_docker_storage_usage() {
echo "[${CLEANUP_CONTEXT}] Docker storage usage:"
df -h "${DOCKER_STORAGE_PATH}" || true
docker system df || true
}

pin_isaacsim_image_if_present() {
if [ -z "${ISAACSIM_IMAGE}" ]; then
echo "[${CLEANUP_CONTEXT}] No IsaacSim base image provided; skipping image pin."
return
fi

if docker image inspect "${ISAACSIM_IMAGE}" >/dev/null 2>&1; then
echo "[${CLEANUP_CONTEXT}] Pinning IsaacSim base image: ${ISAACSIM_IMAGE}"
docker create --name "${ISAACSIM_IMAGE_PIN_CONTAINER}" "${ISAACSIM_IMAGE}" true >/dev/null 2>&1 || true
else
echo "[${CLEANUP_CONTEXT}] IsaacSim base image is not present locally; skipping image pin."
fi
}

remove_isaacsim_image_pin() {
docker rm "${ISAACSIM_IMAGE_PIN_CONTAINER}" >/dev/null 2>&1 || true
}

run_conservative_cleanup() {
echo "[${CLEANUP_CONTEXT}] Running conservative Docker cleanup."
echo "[${CLEANUP_CONTEXT}] Removing Docker images older than ${DOCKER_CONSERVATIVE_PRUNE_UNTIL}."
docker image prune -a -f --filter "until=${DOCKER_CONSERVATIVE_PRUNE_UNTIL}" || true
}

run_aggressive_cleanup() {
echo "[${CLEANUP_CONTEXT}] Running aggressive Docker cleanup."
echo "[${CLEANUP_CONTEXT}] Removing stopped Docker containers."
docker container prune -f --filter "until=${DOCKER_AGGRESSIVE_PRUNE_UNTIL}" || true

echo "[${CLEANUP_CONTEXT}] Removing unused Docker builder cache older than ${DOCKER_AGGRESSIVE_PRUNE_UNTIL}."
docker builder prune -a -f --filter "until=${DOCKER_AGGRESSIVE_PRUNE_UNTIL}" || true

echo "[${CLEANUP_CONTEXT}] Removing Docker images older than ${DOCKER_AGGRESSIVE_PRUNE_UNTIL}."
docker image prune -a -f --filter "until=${DOCKER_AGGRESSIVE_PRUNE_UNTIL}" || true
}

main() {
echo "[${CLEANUP_CONTEXT}] Checking Docker storage before cleanup."

local usage_percent
usage_percent="$(get_docker_storage_usage_percent)"
if [ -z "${usage_percent}" ]; then
resolve_docker_storage_path || true
usage_percent="$(get_docker_storage_usage_percent)"
fi

print_docker_storage_usage

if [ -z "${usage_percent}" ]; then
echo "[${CLEANUP_CONTEXT}] Could not determine Docker storage usage; running conservative cleanup."
pin_isaacsim_image_if_present
trap remove_isaacsim_image_pin EXIT
run_conservative_cleanup
print_docker_storage_usage
if [ "${FAIL_IF_STILL_HIGH}" = "true" ]; then
echo "::error::Could not determine Docker storage usage after cleanup. The self-hosted runner needs a measurable Docker storage path before tests can run." >&2
return 1
fi
return 0
fi

pin_isaacsim_image_if_present
trap remove_isaacsim_image_pin EXIT

if [ "${usage_percent}" -ge "${DOCKER_CLEANUP_THRESHOLD_PERCENT}" ]; then
echo "[${CLEANUP_CONTEXT}] Docker storage is at ${usage_percent}%, meeting the ${DOCKER_CLEANUP_THRESHOLD_PERCENT}% threshold."
run_aggressive_cleanup
else
echo "[${CLEANUP_CONTEXT}] Docker storage is at ${usage_percent}%, below the ${DOCKER_CLEANUP_THRESHOLD_PERCENT}% threshold."
run_conservative_cleanup
fi

echo "[${CLEANUP_CONTEXT}] Docker storage after cleanup."
print_docker_storage_usage

local final_usage_percent
final_usage_percent="$(get_docker_storage_usage_percent)"
if [ "${FAIL_IF_STILL_HIGH}" = "true" ] \
&& [ -n "${final_usage_percent}" ] \
&& [ "${final_usage_percent}" -ge "${DOCKER_CLEANUP_THRESHOLD_PERCENT}" ]; then
echo "::error::Docker storage remains at ${final_usage_percent}% after cleanup. The self-hosted runner needs more free Docker storage before tests can run." >&2
return 1
fi
}

main "$@"
181 changes: 181 additions & 0 deletions .github/actions/run-package-tests/test_cleanup_docker_storage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""Tests for CI Docker storage cleanup helpers."""

from __future__ import annotations

import os
import subprocess
from pathlib import Path

_ACTION_DIR = Path(__file__).resolve().parent
_REPO_ROOT = _ACTION_DIR.parents[2]
_ACTION_PATH = _ACTION_DIR / "action.yml"
_SCRIPT_PATH = _ACTION_DIR / "cleanup_docker_storage.sh"


def _write_fake_df(
bin_dir: Path, first_usage: int, final_usage: int, failed_path: str | None = None, fallback_path: str | None = None
) -> None:
count_file = bin_dir / "df-count"
count_file.write_text("0", encoding="utf-8")
script = bin_dir / "df"
script.write_text(
f"""#!/usr/bin/env bash
set -euo pipefail

path="${{2:-}}"
if [ -n "{failed_path or ""}" ] && [ "$path" = "{failed_path or ""}" ]; then
exit 1
fi
if [ -n "{fallback_path or ""}" ] && [ "$path" = "{fallback_path or ""}" ]; then
:
elif [ -n "{fallback_path or ""}" ]; then
exit 1
fi

if [ "${{1:-}}" = "-P" ]; then
count=$(cat "{count_file}")
if [ "$count" -eq 0 ]; then
usage="{first_usage}"
else
usage="{final_usage}"
fi
echo "$((count + 1))" > "{count_file}"
echo "Filesystem 1024-blocks Used Available Capacity Mounted on"
echo "/dev/test 100 90 10 ${{usage}}% /var/lib/docker"
else
echo "Filesystem Size Used Avail Use% Mounted on"
echo "/dev/test 100G 90G 10G {first_usage}% /var/lib/docker"
fi
""",
encoding="utf-8",
)
script.chmod(0o755)


def _write_fake_docker(bin_dir: Path, docker_root_dir: str = "/var/lib/docker") -> Path:
log_path = bin_dir / "docker.log"
script = bin_dir / "docker"
script.write_text(
f"""#!/usr/bin/env bash
set -euo pipefail

printf '%s\\n' "$*" >> "{log_path}"
if [ "${{1:-}}" = "info" ] && [ "${{2:-}}" = "--format" ]; then
if [ -z "{docker_root_dir}" ]; then
exit 1
fi
echo "{docker_root_dir}"
exit 0
fi
if [ "${{1:-}}" = "image" ] && [ "${{2:-}}" = "inspect" ]; then
exit 0
fi
exit 0
""",
encoding="utf-8",
)
script.chmod(0o755)
return log_path


def _run_cleanup(
tmp_path: Path,
first_usage: int,
final_usage: int,
failed_path: str | None = None,
docker_root_dir: str = "/var/lib/docker",
) -> subprocess.CompletedProcess[str]:
bin_dir = tmp_path / "bin"
bin_dir.mkdir()
_write_fake_df(bin_dir, first_usage, final_usage, failed_path=failed_path, fallback_path=docker_root_dir)
_write_fake_docker(bin_dir, docker_root_dir=docker_root_dir)

env = os.environ.copy()
env["PATH"] = f"{bin_dir}{os.pathsep}{env['PATH']}"
env["DOCKER_STORAGE_PATH"] = "/var/lib/docker"
env["DOCKER_CLEANUP_THRESHOLD_PERCENT"] = "85"

return subprocess.run(
[
"bash",
str(_SCRIPT_PATH),
"nvcr.io/nvidian/isaac-sim:latest-develop",
"isaacsim-pin-test",
"test-cleanup",
"true",
],
cwd=_REPO_ROOT,
env=env,
check=False,
capture_output=True,
text=True,
)


def test_cleanup_uses_aggressive_pruning_when_docker_storage_exceeds_threshold(tmp_path: Path):
result = _run_cleanup(tmp_path, first_usage=91, final_usage=70)

assert result.returncode == 0, result.stderr
docker_log = (tmp_path / "bin" / "docker.log").read_text(encoding="utf-8")
assert "container prune -f --filter until=24h" in docker_log
assert "builder prune -a -f --filter until=24h" in docker_log
assert "image prune -a -f --filter until=24h" in docker_log


def test_cleanup_keeps_conservative_image_pruning_below_threshold(tmp_path: Path):
result = _run_cleanup(tmp_path, first_usage=70, final_usage=70)

assert result.returncode == 0, result.stderr
docker_log = (tmp_path / "bin" / "docker.log").read_text(encoding="utf-8")
assert "image prune -a -f --filter until=72h" in docker_log
assert "builder prune" not in docker_log


def test_cleanup_fails_early_when_aggressive_pruning_cannot_recover_space(tmp_path: Path):
result = _run_cleanup(tmp_path, first_usage=91, final_usage=89)

assert result.returncode == 1
assert "Docker storage remains at 89%" in result.stderr


def test_cleanup_uses_docker_root_dir_when_default_storage_path_is_unavailable(tmp_path: Path):
result = _run_cleanup(
tmp_path,
first_usage=91,
final_usage=89,
failed_path="/var/lib/docker",
docker_root_dir="/mnt/docker-root",
)

assert result.returncode == 1
assert "Using Docker root from docker info: /mnt/docker-root" in result.stdout
assert "Docker storage remains at 89%" in result.stderr


def test_cleanup_fails_early_when_docker_storage_usage_cannot_be_measured(tmp_path: Path):
result = _run_cleanup(
tmp_path,
first_usage=91,
final_usage=89,
failed_path="/var/lib/docker",
docker_root_dir="",
)

assert result.returncode == 1
assert "Could not determine Docker storage usage after cleanup" in result.stderr


def test_run_package_tests_prepares_docker_space_before_image_pull():
action_text = _ACTION_PATH.read_text(encoding="utf-8")

cleanup_index = action_text.index("name: Prepare Docker disk space")
pull_start_index = action_text.index("name: Record pull start time")
pull_index = action_text.index("name: Pull image from ECR")

assert cleanup_index < pull_start_index < pull_index
assert "cleanup_docker_storage.sh" in action_text
Loading
Loading