Skip to content

[CI] Faster CI image builds and pulls, and hardened, modernized workflows - #9354

Draft
StafaH wants to merge 4 commits into
isaac-sim:mainfrom
StafaH:ci/faster-images-modern-workflows
Draft

StafaH wants to merge 4 commits into
isaac-sim:mainfrom
StafaH:ci/faster-images-modern-workflows

Conversation

@StafaH

@StafaH StafaH commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Description

Makes the CI image build and pull faster, then hardens and modernizes the CI workflows. Opened as a draft to try the changes in CI: nothing here has run in CI yet.

Depends on 01640ae ("[CI] Overhaul test infrastructure and tier CI into PR, post-merge and nightly"). That commit is not on main and has no PR of its own, so it is part of this diff too. Review the last two commits:

1. Push CI images straight from BuildKit and verify them inside the build

  • No load-then-push: a full rebuild used to spend about 9.4 minutes compressing the image and loading it into Docker (--load), only to push it again. BuildKit now pushes it straight to ECR, so that step should take about 10 minutes less.
  • zstd layers: the image is pushed as zstd layers, Isaac Sim base included, to speed up the unpack that dominates every cold pull (about 6 of a job's 8.5 minutes). This is unproven: if the runners' disks are the bottleneck, it won't help.
  • Checks inside the build: the image invariants run in a verify stage of Dockerfile.base before the push, so a broken image is never published. They now also check that the image doesn't run as root.
  • Warm images kept: the pre-job cleanup deleted any image older than 72 hours. On reused runners, that threw away still-valid cached images that the job then had to pull again in full. Storage is now pruned only when it is over 80% full, and the job's own image is kept.

2. Harden and modernize the CI workflows

  • Actions pinned: every action is pinned to a commit SHA. All workflows use setup-uv v10.4.1; v6.8.0 already crashed on the Windows runners.
  • No template injection: ${{ }} values reach scripts through env: instead of being expanded inside them.
  • Least-privilege tokens:
    • Every workflow now has a top-level permissions: block.
    • build.yaml no longer grants pull-requests: write or checks: write; nothing used them.
    • The reusable build.yaml call is given its three secrets explicitly instead of all of them.
    • Checkouts drop the token unless a later step fetches or pushes.
  • Caches off where output ships: dependency caches are off in the multi-version docs deploy and in wheel builds on push.
  • uv replaces setup-python and pip.
  • pre-commit workflow: runs pre-commit directly. The pre-commit/action it used is in maintenance-only mode.
  • publish-images.yaml: uses Docker's official build action. Its GitHub Actions cache never imported or exported anything, so it is removed.
  • Bugs fixed:
    • license-check and kitless-docker read an environment variable the ECR action no longer sets; the action now exposes the image as an output.
    • The build arguments that older release branches' Dockerfiles need are still passed.
  • Timeouts: every job has one, based on observed run times.
  • New linters: actionlint (with shellcheck) and zizmor run in pre-commit. Conventions are documented in .github/workflows/README.md.

Validation (local)

  • Tests: tool tests, Dockerfile contract tests and changelog tool tests pass.
  • Linters: actionlint and zizmor report nothing.
  • pre-commit: passes except codespell, which flags docker/test/test_carb_env_shim.py, a file this PR doesn't change.

What to check in CI

  • The first run is slower than baseline: every dependency hash changes, so all three images rebuild and the recompressed base layers are uploaded.
  • Judge the second rebuild against today's baseline:
    • export and push time, against the 9.4-minute load step;
    • the verify stage passing inside BuildKit;
    • cold pull time, against 8.5 minutes.
  • zstd layers need Docker 23 or newer on the runners.
  • Untested by PR CI: the nightly, publish, docs deploy and backport workflows only run on a schedule or a trigger.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump package versions — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

… nightly

- Add a one-process PR gate (pr marker) and duration-balanced sharding
  with per-file chunk splitting driven by tools/test_durations.json.
- Replace per-package Docker test jobs with one sharded matrix job; keep
  the required check names through an alias job.
- Add the postmerge tier for full environment sweeps and heavy renderers;
  move benchmarks and the performance-regression job to nightly.
- Remove dead test infrastructure and code, rewrite slow or redundant
  tests to target regressions.
… build

The ECR action loaded every freshly built image into the Docker store (a multi-GB
tarball export, about 9 minutes) only to push it again. BuildKit now pushes the
image itself, as zstd layers that also decompress faster on every pull, and the
registry cache reuses the image's blobs. A deps-cache hit is aliased to the
commit tag registry-side, with nothing downloaded.

The image invariants run as a Dockerfile verify stage before the push, so a broken
image is never published, and they now also assert a non-root runtime user. Jobs
that run the image ask for it with pull: 'true', and the action exposes the ECR
reference as an output instead of exporting environment variables.

The pre-job cleanup deleted any image older than 72 hours, which threw away a
still-valid deps-cache image on reused runners. Docker storage is now pruned only
when it is over 80% full, keeping the job's own image.
- Pin every third-party action to a commit SHA, and move all workflows to
  setup-uv v10.4.1 (v6.8.0 already crashed on the Windows runners).
- Pass expression values to run scripts through env instead of expanding them
  in the script, give every workflow a top-level permissions block, drop
  build.yaml's unused pull-requests and checks write grants, pass the reusable
  build.yaml call its three secrets explicitly, and check out without persisted
  credentials unless a later step fetches or pushes.
- Disable dependency caches in jobs whose output is deployed or published.
- Use uv instead of setup-python and pip, run pre-commit directly instead of the
  maintenance-only pre-commit/action, and build the published images with
  docker/build-push-action. The publish job's GitHub Actions cache never
  imported or exported anything and is removed.
- Fix license-check and kitless-docker, which read an ECR_IMAGE variable the
  ECR action no longer exports, and keep passing the build arguments that older
  release branches' Dockerfiles declare without defaults.
- Set timeout-minutes on every job, compute the OVPhysX wheelhouse selection
  once, and remove a debug step and comments that restated the code.
- Run actionlint (with shellcheck) and zizmor in pre-commit, configured in
  .github/actionlint.yaml and .github/zizmor.yml, and document the conventions
  in .github/workflows/README.md.
Conflicts were all between the test overhaul's edits and tests main changed:

- test_ovrtx_renderer_contract.py: the overhaul moved the conflicting tests to
  test_ovrtx_renderer_unit.py, so main's rendering-dt fixture and assertions and
  its render-var changes are applied there.
- test_dict.py, test_string.py, test_tensor_processors.py: keep the overhaul's
  merged and trimmed tests and add main's new tests beside them.
- test_runtime_compatibility.py: keep the overhaul's removal of the Kit
  visualizer test and main's new render-settings assertion.
- test_cartpole_camera_presets.py: take main's per-selector rows, each covering
  a different render mode.
- test_ovrtx_usd.py, rendering_runner.py: take main's imports, minus the one
  helper the overhaul no longer tests.
- OVXR_ADAPTER.md: keep the overhaul's skip sentence and main's new sections.
@StafaH

StafaH commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@github-actions github-actions Bot added documentation Improvements or additions to documentation asset New asset feature or request isaac-mimic Related to Isaac Mimic team infrastructure labels Dec 2, 2026

This branch has not been deployed

No deployments
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 documentation Improvements or additions to documentation infrastructure isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant