Improve Docker multi-user isolation and document suffix behavior#4683
Improve Docker multi-user isolation and document suffix behavior#4683zhexulong wants to merge 11 commits intoisaac-sim:developfrom
Conversation
Greptile SummaryThis PR successfully implements multi-user Docker isolation by defaulting omitted Key changes:
The implementation is well-structured with proper error handling and fallback logic. Previous reviewer performance concerns about N+1 docker inspect calls in the fallback path are valid but not critical since the primary path uses efficient label filtering. Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Start[User runs container.py start] --> ParseSuffix{Parse --suffix argument}
ParseSuffix -->|Omitted| DefaultUser[Generate suffix from username]
ParseSuffix -->|Empty string ''| LegacyMode[Use empty suffix - legacy mode]
ParseSuffix -->|Custom value| CustomSuffix[Use custom suffix with hyphen]
DefaultUser --> SetProject[Set COMPOSE_PROJECT_NAME<br/>isaac-lab-username]
LegacyMode --> SetProjectLegacy[Set COMPOSE_PROJECT_NAME<br/>isaac-lab]
CustomSuffix --> SetProjectCustom[Set COMPOSE_PROJECT_NAME<br/>isaac-lab-custom]
SetProject --> CheckConflicts
SetProjectLegacy --> CheckConflicts
SetProjectCustom --> CheckConflicts
CheckConflicts[Detect conflicting containers] --> TryFilter{Try docker ps<br/>with label filter}
TryFilter -->|Success| FilterResults[Return containers in<br/>same project]
TryFilter -->|Fails| Fallback[Fallback: inspect<br/>all containers]
Fallback --> InspectLoop[Loop through containers<br/>check project labels]
InspectLoop --> FilterResults
FilterResults --> HasConflicts{Found conflicts?}
HasConflicts -->|No| StartContainer[Build and start container]
HasConflicts -->|Yes| ShowError[Show conflict error<br/>with resolution options]
ShowError --> ForceCheck{ISAACLAB_FORCE_START=1?}
ForceCheck -->|Yes| StartContainer
ForceCheck -->|No| AbortStart[Abort with RuntimeError]
StartContainer --> End[Container running]
AbortStart --> End
Last reviewed commit: e44fcbd |
|
@greptile |
…aces Defaults omitted --suffix to a user-derived suffix, sets COMPOSE_PROJECT_NAME to isolate compose projects, and adds conflict detection before start while preserving legacy behavior with --suffix ''. Signed-off-by: prosumer <prosumerlong@gmail.com>
…olation Documents default and explicit suffix semantics, adds conflict-check guidance, and aligns release bookkeeping for this Docker behavior change. Signed-off-by: prosumer <prosumerlong@gmail.com>
Handle empty or unavailable usernames with a stable fallback and normalize compose project names by collapsing repeated hyphens. Signed-off-by: prosumer <prosumerlong@gmail.com>
05c9e44 to
1790070
Compare
|
@greptile |
Remove accidental conflict markers in the 0.54.4/0.54.3 section and restore valid reStructuredText changelog structure. Signed-off-by: prosumer <prosumerlong@gmail.com>
|
@greptile |
Keeps the Docker multi-user isolation note in the active 4.2.0 section and drops the duplicate 0.54.4 entry to avoid version-line ambiguity. Signed-off-by: prosumer <prosumerlong@gmail.com>
|
@greptile |
Restore the 2026-02-04 heading to 0.54.4 to avoid duplicate 0.54.3 sections after conflict cleanup. Signed-off-by: prosumer <prosumerlong@gmail.com>
|
@greptile |
Additional Comments (1)
With
Since A user who types |
Signed-off-by: Guanpeng Long <prosumerlong@gmail.com>
Signed-off-by: Guanpeng Long <prosumerlong@gmail.com>
Signed-off-by: Guanpeng Long <prosumerlong@gmail.com>
|
@greptile |
Additional Comments (1)
The These test cases need to be updated to either:
|
Signed-off-by: Guanpeng Long <prosumerlong@gmail.com>
Signed-off-by: prosumer <prosumerlong@gmail.com>
|
@greptile |
Description
This PR improves Docker multi-user isolation for IsaacLab development environments.
When
--suffixis omitted, the container naming now defaults to a sanitized user-derived suffix. This suffix is also propagated toCOMPOSE_PROJECT_NAMEso each user gets an isolated Compose namespace. The startup flow now detects conflicting containers in the same Compose project before starting, while preserving legacy behavior when--suffix ''is explicitly used.This change reduces cross-user naming/project collisions on shared machines and keeps backward compatibility for existing no-suffix workflows.
In addition, this PR updates deployment documentation, adds a changelog entry, bumps the extension version, and updates the contributors list to align with checklist expectations.
Fixes # (issue)
Type of change
Screenshots
Not applicable (CLI/container orchestration behavior change).
Checklist
pre-commitchecks with./isaaclab.sh --format(equivalent check executed viapre-commit run --all-filesand targeted file runs in this environment)config/extension.tomlfile (maintained by the current develop branch)CONTRIBUTORS.mdor my name already exists thereValidation Notes
--suffix.COMPOSE_PROJECT_NAMEfollows suffix for user-level isolation.--suffix ''.pre-commit run --all-filespasses; docs/changelog/version/contributor updates were validated with targeted checks.