Skip to content

Adds unused Docker volumes pruning - #7220

Merged
myurasov-nv merged 3 commits into
isaac-sim:developfrom
myurasov-nv:myurasov/prune-unused-docker-volumes
Aug 25, 2026
Merged

myurasov-nv merged 3 commits into
isaac-sim:developfrom
myurasov-nv:myurasov/prune-unused-docker-volumes

Conversation

@myurasov-nv

@myurasov-nv myurasov-nv commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Description

The package-test runner cleanup prunes images, containers, and build cache, but never volumes, so anonymous volumes from test containers accumulate for the life of the runner. On an idle GPU runner, docker system df reported 39.58 GB of local volumes, fully reclaimable with no containers attached. This adds a volume prune after the existing cleanup, so volumes released when a stopped container is removed are reclaimed in the same run.

Before After
Unused volumes are never pruned, so 39.58 GB stayed on disk with no containers attached Unused volumes are pruned on both cleanup paths, after stopped containers are removed and before the storage check

Reproduction

  1. On a runner that has finished the package tests, check what Docker is holding:

    docker system df
    

    Observed: Local Volumes 2 0 39.58GB 39.58GB (100%), so every volume was unused.

  2. Confirm nothing in the cleanup reclaims them:

    grep -n volume .github/actions/run-package-tests/cleanup_docker_storage.sh
    

    Observed before this change: no matches. The script prunes images, containers, and build cache only.

  3. Run the action's tests:

    python -m pytest .github/actions/run-package-tests/test_cleanup_docker_storage.py
    

    Observed: 10 passed. The volume tests fail if the prune or its position is removed.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Not applicable; the change has no rendered output.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format: not run locally; this change touches only .github/actions/, and the repository's own pre-commit check passes on this branch
  • I have made corresponding changes to the documentation: not applicable; the script's log output describes the new step
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works: 4 tests in test_cleanup_docker_storage.py cover the conservative path, the aggressive path, the ordering against container pruning, and the unmeasurable-usage path; all 10 tests in that file pass
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump extension.toml — CI handles that): not applicable; no package under source/ is touched
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@myurasov-nv
myurasov-nv requested a review from a team August 20, 2026 17:01
@greptile-apps

greptile-apps Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds unused Docker-volume pruning to each storage-cleanup path after the applicable image, container, and build-cache cleanup.

  • Adds a shared run_volume_cleanup helper.
  • Runs volume pruning before final storage measurement, including when Docker storage usage cannot initially be measured.
  • Adds tests for both threshold branches, the unmeasurable path, and aggressive container-before-volume ordering.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/actions/run-package-tests/cleanup_docker_storage.sh Adds volume pruning after cleanup selection; the aggressive path now removes stopped containers before pruning their released volumes.
.github/actions/run-package-tests/test_cleanup_docker_storage.py Adds coverage for volume pruning across cleanup branches and verifies the ordering required by the previous finding.

Reviews (2): Last reviewed commit: "Prune Docker volumes after stopped conta..." | Re-trigger Greptile

@myurasov-nv myurasov-nv changed the title Prune unused Docker volumes during runner storage cleanup Fixes unused Docker volumes pruning Aug 20, 2026
@myurasov-nv myurasov-nv changed the title Fixes unused Docker volumes pruning Adds unused Docker volumes pruning Aug 20, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

The volume-pruning addition follows the existing cleanup structure, but its placement leaves two concrete gaps: volumes released by aggressive container pruning are not reclaimed in the same run, and volume cleanup is skipped entirely when storage usage cannot be measured.

  • Design and architecture: The helper is appropriately scoped and follows existing logging conventions. However, placing its only call after the unknown-usage early-return means it is not shared across all cleanup lifecycles; the fallback conservative path never invokes it.
  • API: No public API, workflow input, environment variable, or documented compatibility surface changes. This is isolated to the CI runner cleanup implementation.
  • Implementation: docker volume prune -f || true matches the script's non-fatal cleanup behavior. It should run after the selected cleanup branch so volumes made unused by docker container prune are reclaimed before final usage is checked, and it must also be reached by the unknown-usage fallback path.

Minor fixes needed. Posted 2 actionable findings inline.

Automated review; human maintainers own approval decisions.

@myurasov-nv
myurasov-nv force-pushed the myurasov/prune-unused-docker-volumes branch from bc0d032 to 8402ae6 Compare August 20, 2026 18:30
@myurasov-nv
myurasov-nv changed the base branch from release/3.0.0-beta2 to release/3.0.0 August 20, 2026 18:31
@myurasov-nv
myurasov-nv requested a review from hujc7 as a code owner August 20, 2026 18:31
@myurasov-nv
myurasov-nv force-pushed the myurasov/prune-unused-docker-volumes branch from 6443a29 to 4400f3b Compare August 20, 2026 18:33
@myurasov-nv
myurasov-nv changed the base branch from release/3.0.0 to develop August 20, 2026 22:44
@myurasov-nv
myurasov-nv force-pushed the myurasov/prune-unused-docker-volumes branch from 4400f3b to df51d7e Compare August 20, 2026 22:44
@github-actions github-actions Bot added the asset New asset feature or request label Aug 20, 2026
@myurasov-nv
myurasov-nv force-pushed the myurasov/prune-unused-docker-volumes branch from df51d7e to 83d57f5 Compare August 20, 2026 22:50
@myurasov-nv

Copy link
Copy Markdown
Member Author

Dear Greptile!

Fixed in 5b2eae3, the way you asked: run_volume_cleanup moved after the conservative/aggressive branch, so a stopped container removed by docker container prune releases its anonymous volumes in time for the volume prune and the storage-threshold check that follows.

What this does not cover: the container prune keeps its until=24h filter, so containers younger than that keep their volumes until a later run.

test_cleanup_prunes_unused_volumes_after_stopped_containers_are_removed asserts both the ordering against the container prune and that the volume prune happens before the final measurement. It fails if either is reverted.

@myurasov-nv

Copy link
Copy Markdown
Member Author

@greptile-apps

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wasn't there already a docker cleanup? I remember adding something that prunes when storage gets too large? In any case this looks good!

@myurasov-nv
myurasov-nv merged commit 2b739e3 into isaac-sim:develop Aug 25, 2026
73 of 77 checks passed
kellyguo11 added a commit that referenced this pull request Sep 4, 2026
# Description

Backports the following merged `develop` PRs to `release/3.0.0`:

- #7220 — prune unused Docker volumes on package-test runners
- #7169 — cache the resolved OVRTX Warp device
- #6889 — move the OVPhysX collider cache out of the Python interpreter
directory
- #7345 — document the registered XR camera PiP tasks
- #7050 — update and reorganize the LEAPP documentation
- #7473 — register external RSL-RL tasks before agent discovery
- #7467 — update the China storage profile to Isaac Sim 6.1
- #7385 — accept legal float scale values when seeding Fabric frame
views from USD
- #7517 — use lazy exports in `isaaclab_rl`

The duplicate #7517 in the original request is included once.

Seven source commits replayed cleanly. Two required release-specific
reconciliation:

- #7169 retains the release branch's mapped OVRTX write path, which was
removed separately on `develop`, while resolving and caching one Warp
device for render-product IDs, mappings, and CUDA streams.
- #7050 preserves the #7494 export-backend clarification that is already
present on the release branch while applying the broader LEAPP
documentation overhaul.

No new dependencies are added.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Performance improvement
- Documentation update
- CI/infrastructure update

## Release backport

- [ ] <!-- backport-active-release --> This PR already targets the
active release branch; do not backport it again.

## Validation

- `uv run --no-project --with pytest python -m pytest -q
.github/actions/run-package-tests/test_cleanup_docker_storage.py` — 10
passed
- Nine isolated `isaaclab_rl` namespace/lazy-import regression cases
passed
- Resolved-device OVRTX mapping behavior check passed with Warp 1.16.0
- `uv run --no-project python -m compileall -q` on all changed Python
modules and tests
- `uv run --no-project python tools/changelog/cli.py check` against the
exact `upstream/release/3.0.0` base
- `pre-commit==4.6.2 run --all-files` passed all available hooks
- `git diff --check upstream/release/3.0.0..HEAD`

The full project test environment and documentation build cannot resolve
on this macOS/arm64 host because the release lockfile supports Linux and
Windows only. The Git LFS hook was also unavailable because `git-lfs` is
not installed; none of the changed paths are LFS-tracked. Linux CI
remains authoritative for simulator, OVRTX, Fabric, and full
documentation validation.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the available formatting and static checks
- [x] I have included the corresponding documentation changes
- [x] Each touched source package includes its original changelog
fragment
- [x] Every backported commit records its source commit with `cherry
picked from commit`
- [x] The original contributors are preserved as commit authors

---------

Signed-off-by: Zeng Qingcheng <[email protected]>
Co-authored-by: myurasov-nv <[email protected]>
Co-authored-by: Peter Verswyvelen <[email protected]>
Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: hujc <[email protected]>
Co-authored-by: hougantc-nvda <[email protected]>
Co-authored-by: Frank Lai NV <[email protected]>
Co-authored-by: peterd-NV <[email protected]>
Co-authored-by: Sheikh Dawood <[email protected]>
Co-authored-by: Zeng Qingcheng <[email protected]>
Co-authored-by: Antoine RICHARD <[email protected]>
Co-authored-by: Mustafa H <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants