Skip to content

Commit ef82ce3

Browse files
authored
[release/3.1.0] Backport standalone CI fix and defer wheel URL validation (#9228)
## Description Backport #9210 to `release/3.1.0` and temporarily unblock release wheel builds while Newton still requires GitHub-pinned dependencies. The first commit is a clean, exact cherry-pick of `76b6530954689623e272021263a2fcc1741b7bc2`. A separate follow-up commit disables the release wheel direct-URL metadata gate, with a TODO to restore it once Newton is released on a package index. Wheel build, dependency resolution, and installation checks remain enabled. Restore four pytest workers for standalone smoke tests within the existing CI slot budgets. Kit smoke-test children use a test-only bootstrap to flush Python and native stdout/stderr without Isaac Sim's global `fflush(NULL)`, which was observed hanging on an unrelated native file lock. The existing launch cases, assertions, and timeouts are preserved. ## Validation - All repository pre-commit hooks passed against `upstream/release/3.1.0`: `ISAACLAB_CHANGELOG_BASE_REF=upstream/release/3.1.0 uv run --no-project --with pre-commit python -m pre_commit run --all-files`. - Verified the cherry-pick commit exactly matches #9210; the relevant test runner inputs on the release branch also match the source commit's parent. - `git diff --check` passed before committing. Full pre-commit checks were rerun successfully after the workflow change. - Reused the [original passing GPU CI](https://github.com/isaac-sim/IsaacLab/actions/runs/45684084621/attempts/1) and its repeat results recorded in #9210. GPU tests were not rerun locally. The project lockfile excludes macOS, so `uv run isaaclab --format` could not run; the same pre-commit hooks were run directly through uv instead. As noted in #9210, native RTX destruction can still approach the existing 300-second timeout under concurrent load; this backport does not address that separate delay.
1 parent 28b6f1f commit ef82ce3

5 files changed

Lines changed: 62 additions & 4 deletions

File tree

‎.github/workflows/wheel.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,11 @@ jobs:
182182
WHEEL_SHA: ${{ github.sha }}
183183
run: bash tools/wheel_builder/build.sh
184184

185-
# The development branch may temporarily use Git-pinned dependencies. Release
186-
# branches must remain publishable to PyPI and therefore reject direct URLs.
185+
# TODO: Re-enable once Newton is released on a package index. Release wheels
186+
# still need GitHub-pinned dependencies until then.
187187
- name: Validate PyPI metadata
188188
if: >-
189+
false &&
189190
steps.changes.outputs.run_build == 'true' &&
190191
(startsWith(github.ref, 'refs/heads/release/') ||
191192
startsWith(github.base_ref, 'release/'))

‎source/isaaclab/changelog.d/concurrent-standalone-smoke.skip‎

Whitespace-only changes.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
2+
# All rights reserved.
3+
#
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
6+
"""Run Kit smoke-test children without globally flushing background workers' native files."""
7+
8+
import ctypes
9+
import os
10+
import runpy
11+
import sys
12+
from pathlib import Path
13+
14+
15+
def flush_stdio() -> None:
16+
"""Flush Python and native stdout/stderr before Kit's fast shutdown exits the process.
17+
18+
Flushing every C stream with ``fflush(NULL)`` can wait forever for a file lock held by a
19+
background thread. Only the two standard output streams need flushing before ``_exit``.
20+
"""
21+
for stream in (sys.stdout, sys.stderr):
22+
try:
23+
stream.flush()
24+
except (ValueError, OSError, AttributeError):
25+
pass
26+
try:
27+
libc = ctypes.CDLL("ucrtbase" if os.name == "nt" else None)
28+
libc.fflush.argtypes = [ctypes.c_void_p]
29+
libc.fflush.restype = ctypes.c_int
30+
if os.name == "nt":
31+
libc.__acrt_iob_func.argtypes = [ctypes.c_uint]
32+
libc.__acrt_iob_func.restype = ctypes.c_void_p
33+
streams = (libc.__acrt_iob_func(1), libc.__acrt_iob_func(2))
34+
else:
35+
names = ("__stdoutp", "__stderrp") if sys.platform == "darwin" else ("stdout", "stderr")
36+
streams = tuple(ctypes.c_void_p.in_dll(libc, name) for name in names)
37+
for stream in streams:
38+
libc.fflush(stream)
39+
except (ImportError, OSError, AttributeError, TypeError, ValueError):
40+
pass
41+
42+
43+
if __name__ == "__main__":
44+
from isaacsim.simulation_app import SimulationApp
45+
46+
# Isaac Sim 6.3's fflush(NULL) can block on an unrelated background stream lock.
47+
# Limit this workaround to the smoke-test child; normal Kit cleanup still runs.
48+
SimulationApp._flush_stdio = staticmethod(flush_stdio)
49+
sys.argv.pop(0)
50+
if sys.argv[0] == "-m":
51+
sys.argv.pop(0)
52+
runpy.run_module(sys.argv[0], run_name="__main__", alter_sys=True)
53+
else:
54+
sys.path[0] = str(Path(sys.argv[0]).resolve().parent)
55+
runpy.run_path(sys.argv[0], run_name="__main__")

‎source/isaaclab/test/app/standalone_script_cases.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ def command(self) -> list[str]:
176176
command.extend((self.renderer_option, self.renderer_backend))
177177
if self.visualizer is not None:
178178
command.extend((self.spec.visualizer_option, self.visualizer))
179+
if self.physics_backend == "isaacsim_physx" or self.renderer_backend == "isaac_rtx" or self.visualizer == "kit":
180+
command.insert(5, str(Path(__file__).with_name("_standalone_kit.py")))
179181
return command
180182

181183

‎tools/test_settings.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
"""Per-test startup timeouts for cold external asset downloads."""
7272

7373
PYTEST_WORKERS = {
74-
# Overlapping standalone RTX apps can stall in native renderer destruction on a shared GPU.
75-
"test_standalone_scripts.py": 1,
74+
# Keep standalone launches concurrent within the CI job's existing slot budget.
75+
"test_standalone_scripts.py": 4,
7676
# Contributed-environment smoke tests: environment runs of several seconds to 2 min each. The camera file
7777
# stays whole: its workers would each start the RTX renderer, and one environment dominates it.
7878
"test_contrib_environments_kit.py": 2,

0 commit comments

Comments
 (0)