Repository navigation
Bake CI pytest deps into the built Docker image - #7193
AntoineRichard merged 5 commits into
Conversation
Every CI test run installed pytest, pytest-mock, junitparser, flaky and coverage from PyPI before it could start — once per test job, and again on each multi-GPU shard host. That put a network round-trip on the critical path of every lane and made runs fail on transient PyPI errors. Layer those packages onto the image in the docker-build action instead, immediately after a real build, so the install happens once per image and every cache hit inherits it. The layer runs as root and restores the image's own default user afterwards. The docker-build action file joins the deps-hash input set, so editing the package list invalidates the local deps-cache tag and forces a rebuild rather than silently reusing an image without the new packages. Drop the now-redundant installs from run_tests.sh and multi_gpu_shard_runner.sh. The retry wrapper stays in place for the remaining TEST_EXTRA_PIP_PACKAGES and TEST_EXTRA_UV_PACKAGES installs.
Greptile SummaryThis PR moves the common pytest harness installation from each test invocation into the freshly built CI image, while preserving per-run installation of optional test packages.
Confidence Score: 5/5The PR appears safe to merge because current test-image build and cache paths consistently provide the newly baked pytest dependencies. The dependency hash changes with the image-layer definition, newly built images are tagged only after the harness is installed, and current test runners consume those layered images with the same Python environment. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
H[Compute dependency hash] --> C{Matching CI image cache?}
C -->|Yes| U[Reuse layered image]
C -->|No| B[Build base CI image]
B --> P[Install pytest harness as root]
P --> R[Restore image default user]
R --> T[Tag layered image for dependency cache]
U --> S[Run standard or multi-GPU tests]
T --> S
S --> E[Install only optional per-run packages]
Reviews (1): Last reviewed commit: "Bake CI pytest deps into the built Docke..." | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The CI image-layering approach coherently moves the pytest harness ahead of the local dependency-cache tag and removes matching per-run installs. However, the new composite-action script contains an empty GitHub Actions expression that can prevent workflows from evaluating the step.
- Design and architecture: Baking CI-only test dependencies into the built image and including the build action in the dependency hash preserves the intended cache-hit behavior. The layer is added only after a real build and before the dependency-cache tag is created. Keying on the entire action is conservative but not a merge-blocking design problem.
- API: No public API is changed. The test runners continue using the image’s Isaac Sim Python environment, into which the same pytest dependencies are now installed during image construction.
- Implementation: The root installation, restoration of the image’s configured user, quoted heredoc, and removal of redundant runner installs are consistent. At
.github/actions/docker-build/action.yml:191, the literal${{ }}in therunscalar is still parsed by GitHub Actions despite appearing in a shell comment; as an empty expression, it can fail template evaluation. Reword the comment to avoid the expression delimiters.
Significant concerns. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
The comment above the layering step spelled the interpolation syntax literally. Inside a `run: |` block scalar a leading `#` is only a shell comment — the runner still parses the whole block as a template string, so it read the empty braces as an expression and failed to load the action with "An expression was expected", taking the base and cuRobo image builds down before they started. Describe the substitution in prose instead.
## Summary Cherry-picks the following merged PRs from `develop` onto `release/3.0.0`, preserving each as an individual commit with `-x` provenance: - #7193 — Bake CI pytest deps into the built Docker image - #7077 — Add OVPhysX support to Franka deformable lift tasks - #7175 — Raise on unsupported camera renderer outputs - #7174 — Fix benchmark play inference scope - #7173 — Report resolved backend for play benchmarks - #7172 — Add video recording to play benchmarks - #7215 — Reduce GearAssembly default environment count - #7214 — Remove Kamino preset from open drawer - #7213 — Fix OvPhysX scene gravity randomization - #7212 — Fix OVPhysX material binding device selection - #7189 — Make preview surfaces renderer agnostic - #7206 — Fix OVPhysX benchmark articulation setup All cherry-picks and the final rebase onto the latest `release/3.0.0` tip completed without conflicts. ## Validation - Verified all 12 backported commits have patch IDs identical to their source squash commits and retain their `cherry picked from` footers. - `git diff --check upstream/release/3.0.0..HEAD` - Bash syntax validation for the modified CI shell scripts. - YAML parsing for the modified composite actions. - Changelog validation against `release/3.0.0`. - Targeted pytest coverage for benchmark APIs/play, video recording, GearAssembly defaults, OVPhysX presets and runtime semantics, and renderer-agnostic materials: **81 passed, 4 skipped, 1 deselected**. - The deselected case is an unchanged test that hard-codes a POSIX `/tmp` path and fails on Windows path normalization. - `uv run isaaclab -f` passed all hooks except the changelog hook's known release-branch baseline finding for `source/isaaclab/changelog.d/core-test-config-fixtures.skip`; the targeted release-base changelog check passed. --------- Co-authored-by: Matthew Taylor <[email protected]> Co-authored-by: Antoine RICHARD <[email protected]> Co-authored-by: Mike Yan Michelis <[email protected]> Co-authored-by: Maximilian Krause <[email protected]> Co-authored-by: Octi Zhang <[email protected]> Co-authored-by: Mustafa H <[email protected]>
Description
Every CI test run installed the pytest harness (
pytest,pytest-mock,junitparser,flaky,coverage>=7.6.1) from PyPI before it could start —once per test job in
run_tests.sh, and again on each multi-GPU shard host inmulti_gpu_shard_runner.sh. That puts a network round-trip on the criticalpath of every lane and makes runs fail on transient PyPI errors.
This bakes those packages into the image instead:
docker-build/action.ymlgains a step that layers the pytest deps ontothe freshly built image (
FROM <image-tag>on stdin, no build context). Itonly runs when a real build happened — cache hits already carry the layer.
The layer installs as
rootand restores the image's own defaultUSERafterwards, read back from
docker image inspect._lib/compute-deps-hash/action.ymlnow hashes.github/actions/docker-build/action.yml, so editing the package listinvalidates the local deps-cache tag and forces a rebuild instead of
silently reusing an image without the new packages.
run_tests.shandmulti_gpu_shard_runner.shdrop their now-redundantinstalls. The
with-python-package-retries.shwrapper added in [CI] Retry transient Python package downloads #7144 stays inplace for the remaining
TEST_EXTRA_PIP_PACKAGES/TEST_EXTRA_UV_PACKAGESinstalls, which are still per-run by design.
The deps stay out of the tracked
Dockerfile.*files on purpose: those buildthe local dev containers that ship via
publish-images.yaml, and the pytestharness is a CI-only concern.
Fixes # (issue)
Type of change
Validation
uv run isaaclab -fbash -non both modified shell scriptsuv run --no-project python tools/changelog/cli.py check developScreenshots
N/A — CI-only change.
Checklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package — N/A, nosource/<pkg>/files are touched;tools/changelog/cli.py check developpassesCONTRIBUTORS.mdor my name already exists there