Skip to content

Commit 21152a5

Browse files
kellyguo11isaaclab-bot[bot]
authored andcommitted
Source US asset root from Kit configuration (#7595)
# Description Uses the shipped Kit experience as the single source of truth for the `us` Asset Region Profile instead of duplicating the production asset URL in Python. All six shipped `.kit` experiences now use the production asset root for their `default`, `cloud`, and `nvidia` settings. Focused regression coverage verifies that `_US_ASSET_ROOT` is initialized by the Kit parser, the `us` profile keeps its existing resolution path, and every shipped experience remains aligned with the canonical production root. Follow-up to #7549. No additional dependencies are required. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) on the changed files - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there ## Validation - The two focused regression checks fail against the pre-fix #7549 head and pass with this change. - `13 passed, 48 deselected` for the asset-root and Kit-experience subset of `test_assets.py`. - All pre-commit hooks passed on the changed files, including Ruff, formatting, codespell, changelog validation, and Git LFS pointer validation. - Python compilation and `git diff --check` passed. - Full `uv run isaaclab -f` was unavailable locally because the project lockfile does not support macOS; the equivalent changed-file pre-commit suite passed. (cherry picked from commit f754f29)
1 parent 73cea42 commit 21152a5

9 files changed

Lines changed: 58 additions & 42 deletions

apps/isaaclab.python.headless.kit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,6 @@ enabled=true # Enable this for DLSS
203203
# set the S3 directory manually to the latest published S3
204204
# note: this is done to ensure prior versions of Isaac Sim still use the latest assets
205205
[settings]
206-
persistent.isaac.asset_root.default = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
207-
persistent.isaac.asset_root.cloud = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
208-
persistent.isaac.asset_root.nvidia = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
206+
persistent.isaac.asset_root.default = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
207+
persistent.isaac.asset_root.cloud = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
208+
persistent.isaac.asset_root.nvidia = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"

apps/isaaclab.python.headless.rendering.kit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,6 @@ UJITSO.enabled = true
171171
# set the S3 directory manually to the latest published S3
172172
# note: this is done to ensure prior versions of Isaac Sim still use the latest assets
173173
[settings]
174-
persistent.isaac.asset_root.default = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
175-
persistent.isaac.asset_root.cloud = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
176-
persistent.isaac.asset_root.nvidia = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
174+
persistent.isaac.asset_root.default = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
175+
persistent.isaac.asset_root.cloud = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
176+
persistent.isaac.asset_root.nvidia = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"

apps/isaaclab.python.kit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,6 @@ fabricUseGPUInterop = true
273273
# set the S3 directory manually to the latest published S3
274274
# note: this is done to ensure prior versions of Isaac Sim still use the latest assets
275275
[settings]
276-
persistent.isaac.asset_root.default = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
277-
persistent.isaac.asset_root.cloud = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
278-
persistent.isaac.asset_root.nvidia = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
276+
persistent.isaac.asset_root.default = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
277+
persistent.isaac.asset_root.cloud = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
278+
persistent.isaac.asset_root.nvidia = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"

apps/isaaclab.python.rendering.kit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,6 @@ UJITSO.enabled = true
151151
# set the S3 directory manually to the latest published S3
152152
# note: this is done to ensure prior versions of Isaac Sim still use the latest assets
153153
[settings]
154-
persistent.isaac.asset_root.default = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
155-
persistent.isaac.asset_root.cloud = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
156-
persistent.isaac.asset_root.nvidia = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
154+
persistent.isaac.asset_root.default = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
155+
persistent.isaac.asset_root.cloud = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
156+
persistent.isaac.asset_root.nvidia = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"

apps/isaaclab.python.xr.openxr.headless.kit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ UJITSO.geometry = true
7272
UJITSO.enabled = true
7373

7474
[settings]
75-
persistent.isaac.asset_root.default = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
76-
persistent.isaac.asset_root.cloud = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
77-
persistent.isaac.asset_root.nvidia = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
75+
persistent.isaac.asset_root.default = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
76+
persistent.isaac.asset_root.cloud = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
77+
persistent.isaac.asset_root.nvidia = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"

apps/isaaclab.python.xr.openxr.kit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,6 @@ UJITSO.enabled = true
112112
# set the S3 directory manually to the latest published S3
113113
# note: this is done to ensure prior versions of Isaac Sim still use the latest assets
114114
[settings]
115-
persistent.isaac.asset_root.default = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
116-
persistent.isaac.asset_root.cloud = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
117-
persistent.isaac.asset_root.nvidia = "https://omniverse-content-staging.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
115+
persistent.isaac.asset_root.default = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
116+
persistent.isaac.asset_root.cloud = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
117+
persistent.isaac.asset_root.nvidia = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fixed
2+
^^^^^
3+
4+
* Fixed the ``us`` Asset Region Profile and all shipped Kit experiences to share the production asset root.

source/isaaclab/isaaclab/utils/assets.py

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,30 @@
5050
# legacy ``cloud`` setting is only consulted for experience files that predate it.
5151
_KIT_ASSET_ROOT_SETTINGS = ("default", "cloud")
5252

53+
54+
def _parse_kit_asset_root() -> str:
55+
"""Parse the configured Isaac asset root.
56+
57+
Returns:
58+
Value of ``persistent.isaac.asset_root.default``, or of the legacy
59+
``persistent.isaac.asset_root.cloud``, from ``isaaclab.python.kit``.
60+
"""
61+
with open(_KIT_EXPERIENCE_PATH) as f:
62+
lines = f.readlines()
63+
for setting in _KIT_ASSET_ROOT_SETTINGS:
64+
pattern = re.compile(rf'\s*persistent\.isaac\.asset_root\.{setting}\s*=\s*"([^"]*)"')
65+
for line in reversed(lines): # read from the last line since it's the last setting defined
66+
m = pattern.match(line)
67+
if m:
68+
return m.group(1)
69+
return ""
70+
71+
5372
_ASSET_REGION_PROFILE_ENV_VAR = "ISAACSIM_ASSET_REGION_PROFILE"
5473
# Update this value when the China mirror moves to a new Isaac Sim asset release.
5574
_ISAAC_SIM_ASSET_RELEASE = "6.1"
5675
_CHINA_ASSET_ENDPOINT = "simready-cn.s3.oss-cn-shanghai.aliyuncs.com"
57-
_US_ASSET_ROOT = (
58-
f"https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/{_ISAAC_SIM_ASSET_RELEASE}"
59-
)
76+
_US_ASSET_ROOT = _parse_kit_asset_root()
6077

6178

6279
class _StorageProfile(TypedDict):
@@ -162,24 +179,6 @@ def _get_omni_client() -> ModuleType:
162179
return omni.client
163180

164181

165-
def _parse_kit_asset_root() -> str:
166-
"""Parse the configured Isaac asset root.
167-
168-
Returns:
169-
Value of ``persistent.isaac.asset_root.default``, or of the legacy
170-
``persistent.isaac.asset_root.cloud``, from ``isaaclab.python.kit``.
171-
"""
172-
with open(_KIT_EXPERIENCE_PATH) as f:
173-
lines = f.readlines()
174-
for setting in _KIT_ASSET_ROOT_SETTINGS:
175-
pattern = re.compile(rf'\s*persistent\.isaac\.asset_root\.{setting}\s*=\s*"([^"]*)"')
176-
for line in reversed(lines): # read from the last line since it's the last setting defined
177-
m = pattern.match(line)
178-
if m:
179-
return m.group(1)
180-
return ""
181-
182-
183182
def _resolve_asset_root() -> str:
184183
"""Resolve the configured Isaac asset root.
185184

source/isaaclab/test/utils/test_assets.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ def test_asset_root_uses_china_storage_profile(monkeypatch):
5454
assert assets_utils._resolve_asset_root() == expected_root
5555

5656

57-
def test_asset_root_uses_us_asset_region_profile(monkeypatch):
58-
"""Test the US asset region profile uses the same public bucket root as Isaac Sim."""
57+
def test_us_asset_root_is_parsed_from_kit_file(monkeypatch):
58+
"""Test the US asset region profile initializes its root from the shipped experience."""
5959
monkeypatch.delenv("ISAACSIM_ASSET_ROOT", raising=False)
6060
monkeypatch.setenv("ISAACSIM_ASSET_REGION_PROFILE", "us")
61-
monkeypatch.setattr(assets_utils, "_parse_kit_asset_root", lambda: "https://example.com/kit-assets")
6261

62+
assert assets_utils._parse_kit_asset_root() == assets_utils._US_ASSET_ROOT
6363
assert assets_utils._resolve_asset_root() == assets_utils._US_ASSET_ROOT
6464

6565

@@ -184,6 +184,19 @@ def test_kit_experience_path_resolves_to_the_shipped_experience():
184184
assert assets_utils._parse_kit_asset_root()
185185

186186

187+
def test_kit_experience_asset_roots_use_production():
188+
"""Test every shipped experience uses the canonical production asset root."""
189+
kit_directory = Path(assets_utils._KIT_EXPERIENCE_PATH).parent
190+
production_root = assets_utils._parse_kit_asset_root()
191+
192+
assert "omniverse-content-production" in production_root
193+
for kit_path in kit_directory.glob("*.kit"):
194+
kit_config = kit_path.read_text(encoding="utf-8")
195+
assert "omniverse-content-staging" not in kit_config
196+
for setting in ("default", "cloud", "nvidia"):
197+
assert f'persistent.isaac.asset_root.{setting} = "{production_root}"' in kit_config
198+
199+
187200
def test_kit_asset_root_prefers_default_setting(tmp_path, monkeypatch):
188201
"""Test the experience-file fallback reads the setting that Isaac Sim resolves."""
189202
kit_file = tmp_path / "isaaclab.python.kit"

0 commit comments

Comments
 (0)