Skip to content

fix: add Gym submodule to git safe.directory in CI#2186

Merged
terrykong merged 1 commit intomainfrom
fix/gym-submodule-safe-directory
Apr 1, 2026
Merged

fix: add Gym submodule to git safe.directory in CI#2186
terrykong merged 1 commit intomainfrom
fix/gym-submodule-safe-directory

Conversation

@kajalj22
Copy link
Copy Markdown
Contributor

@kajalj22 kajalj22 commented Apr 1, 2026

Summary

Fixes git ownership issue when building nemo-gym in CI containers for external contributors.

Problem

Since January 2026 (PR #1773), the Gym submodule uses setuptools-scm which requires git access during package builds. In CI Docker containers:

  • Container runs as root
  • Repository files are mounted with different ownership
  • Git 2.35.2+ blocks access to repos with ownership mismatch (security feature)
  • Build fails: fatal: detected dubious ownership in repository at '/opt/nemo-rl/3rdparty/Gym-workspace/Gym'

Solution

Add the Gym submodule directory to git's safe.directory config, consistent with the existing pattern for the main repo (line 142).

Risk Assessment

Low Risk:

  • CI runs in isolated, ephemeral Docker containers
  • Submodule updates go through PR review process
  • Consistent with existing pattern for main repo
  • Only affects read-only git operations for versioning

Testing

Related Issues

Resolves build failures in functional tests that use nemo-gym.

🤖 Generated with Claude Code

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 1, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the CI Relating to CI label Apr 1, 2026
Fixes git ownership issue when building nemo-gym in CI containers.

Since January 2026, the Gym submodule uses setuptools-scm which
requires git access during package builds. In CI Docker containers,
git blocks access due to ownership mismatch (security feature in
Git 2.35.2+).

This adds the Gym submodule directory to safe.directory, consistent
with the existing pattern for the main repo.

Resolves build failures in grpo_async_gym and other tests that
build nemo-gym from the submodule.

Co-Authored-By: Kajal Jain <kajalj@nvidia.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22 kajalj22 force-pushed the fix/gym-submodule-safe-directory branch from 88411d6 to 03b4fa0 Compare April 1, 2026 17:36
@kajalj22 kajalj22 requested a review from a team as a code owner April 1, 2026 17:36
@kajalj22
Copy link
Copy Markdown
Contributor Author

kajalj22 commented Apr 1, 2026

/ok to test 03b4fa0

@kajalj22 kajalj22 added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Apr 1, 2026
@terrykong terrykong merged commit 846a882 into main Apr 1, 2026
60 of 62 checks passed
@terrykong terrykong deleted the fix/gym-submodule-safe-directory branch April 1, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) CI Relating to CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants