Skip to content

[no-ci] Mention mostly the ability to automatically update submodules - #3105

Merged
rwgk merged 3 commits into
NVIDIA:mainfrom
seberg:submodule-recurse-doc
Oct 15, 2026
Merged

rwgk merged 3 commits into
NVIDIA:mainfrom
seberg:submodule-recurse-doc

Conversation

@seberg

@seberg seberg commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Expand docs slightly to mention that you can set up your clone to automatically keep submodules up to date.

@rwgk is this roughly what you are looking for?

Expand docs slightly to mention that you can set up your clone to automatically
keep submodules up to date.
@seberg seberg added this to the cuda.core 1.3.0 milestone Oct 14, 2026
@seberg
seberg requested a review from rwgk October 14, 2026 12:02
@seberg seberg self-assigned this Oct 14, 2026
@seberg seberg added documentation Improvements or additions to documentation P2 Low priority - Nice to have cuda.core Everything related to the cuda.core module labels Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Updated clone instructions to enable recursive submodule updates during pulls, checkouts, and branch switches.
    • Added an “Updating your clone” section with steps for pulling changes and initializing submodules, including when the recursive pull option can be omitted.

CONTRIBUTING.md adds guidance for enabling recursive submodule updates and for pulling changes and initializing newly added submodules.

Changes: Clone submodule updates

Layer / File(s) Summary
Document submodule update methods
CONTRIBUTING.md
The table of contents links to the update guidance. The cloning instructions add a local setting for recursive submodule updates during pull, checkout, and switch. The update guidance covers pulling changes and initializing newly added submodules.

Priority: ⬇️ Low

Change: Other

Merge Risk: 🔵 Low · up to fb4a9

Contributors updating a clone may need an extra command if a submodule gains a nested submodule. The documentation fix is small; merge with that correction or explicit acceptance of the limitation.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 78a91f92-c74c-4dcc-9f43-4037f0a89fe7
📥 Commits

Reviewing files that changed from the base of the PR and between 1cd41ea and 31915ee.

📒 Files selected for processing: 1
  • CONTRIBUTING.md

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Comment thread CONTRIBUTING.md
Comment thread CONTRIBUTING.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

@rwgk rwgk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and added a commit to simplify/polish the new sections. The changes take the coderabbit suggestions into account.

@rwgk rwgk changed the title Mention mostly the ability to automatically update submodules [no-ci] Mention mostly the ability to automatically update submodules Oct 14, 2026
@rwgk

rwgk commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Closing / re-opening to re-trigger GHA after adding [no-ci].

@rwgk rwgk closed this Oct 14, 2026
@rwgk rwgk reopened this Oct 14, 2026
Comment thread CONTRIBUTING.md Outdated
Comment on lines +96 to +102

This setting can also make `git push` recurse into submodules. To keep
`git push` limited to this repository, also set this once per clone:

```console
$ git config --local push.recurseSubmodules no
```

@seberg seberg Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This setting can also make `git push` recurse into submodules. To keep
`git push` limited to this repository, also set this once per clone:
```console
$ git config --local push.recurseSubmodules no
```

I delete this again, but wait a bit so you have a chance to disagree if you like.

My understanding is: This setting is irrelevant unless you develope CCCL in-tree. That seems too niche information for CONTRIBUTING.md, IMO, even if it makes sense as such.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking deeper: I agree.

My conversation with codex:

Me: I wonder: won't that let people run into a trap? But then again, I'm not really sure what the situation will be. How could people get into the situation to unintentionally push to a submodule? They'd have to intentionally create a commit first? They'd also have to set up a tracking branch?

codex:

Fresh view: Sebastian removed the push warning in fb4a9dd. After checking the details, I think that’s reasonable. My earlier recommendation overstated the risk for ordinary contributors.

The key requirement is a CUDA Python commit being pushed that records an unpublished CCCL commit. Recursive push then attempts to publish that dependency first. Ordinary updates to already-published CCCL commits don’t require this. Git documentation

I verified these cases with isolated local repositories:

  • Editing or staging CCCL files does not publish them.
  • Creating a CCCL commit does not trigger a push if CUDA Python still records the old CCCL commit.
  • Committing the changed CCCL reference in CUDA Python can trigger the recursive push.

On your specific questions:

  • Must they create a CCCL commit? Usually, but they needn’t author it themselves; they could obtain someone else’s commit and record it in CUDA Python.
  • Must they configure a tracking branch? No. I successfully pushed both repositories using git push origin main with no tracking configured for the submodule branch. A suitable local branch and explicit refspec sufficed.
  • What about the usual detached HEAD? In my test, an unpublished detached commit without a suitable branch caused the parent push to fail rather than publish it.

So the possible surprise is automatic publication after someone has recorded an unpublished dependency commit—not accidentally publishing routine local edits. I’d accept Sebastian’s simpler instructions.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · important: Initialize nested submodules recursively. · CONTRIBUTING.md:123-134

CONTRIBUTING.md:123-134
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

important: Initialize nested submodules recursively.

When a pulled revision adds a submodule below an existing submodule, git submodule update --init does not descend into that existing submodule. The nested submodule remains uninitialized, despite the instruction claiming to initialize any newly added submodules. Add --recursive; this is a recursion-depth issue, not the top-level path-specific initialization issue.

Suggested fix
-$ git pull --recurse-submodules && git submodule update --init
+$ git pull --recurse-submodules && git submodule update --init --recursive

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 95645afb-7921-41e9-99b8-9834b90894f2
📥 Commits

Reviewing files that changed from the base of the PR and between 0f5f25e and fb4a9dd.

📒 Files selected for processing: 1
  • CONTRIBUTING.md
💤 Files with no reviewable changes: 1
  • CONTRIBUTING.md

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@rwgk
rwgk merged commit 38e274f into NVIDIA:main Oct 15, 2026
27 checks passed
@seberg
seberg deleted the submodule-recurse-doc branch October 15, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module documentation Improvements or additions to documentation P2 Low priority - Nice to have

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants